OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.hp/] [gdb.base-hp/] [hwwatchbus.exp] - Blame information for rev 231

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
#   Copyright (C) 1997, 1998, 2007, 2008, 2009, 2010
2
#   Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see .  */
16
 
17
if $tracelevel then {
18
        strace $tracelevel
19
        }
20
 
21
set prms_id 0
22
set bug_id 0
23
 
24
if { [skip_hp_tests] } then { continue }
25
 
26
if { ![istarget "hppa*-*-hpux11.*"] } {
27
    verbose "HPUX h/w watch test ignored for non-hppa or pre-HP/UX-10.30 targets."
28
    return 0
29
}
30
 
31
set testfile "hwwatchbus"
32
set srcfile ${testfile}.c
33
set binfile ${objdir}/${subdir}/${testfile}
34
 
35
# build the first test case
36
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
37
     untested hwwatchbus.exp
38
     return -1
39
}
40
 
41
if [get_compiler_info ${binfile}] {
42
    return -1
43
}
44
 
45
# Start with a fresh gdb
46
 
47
gdb_exit
48
remote_exec build "rm -f ${binfile}.bak"
49
gdb_start
50
gdb_reinitialize_dir $srcdir/$subdir
51
gdb_load ${binfile}
52
 
53
 
54
# We ought to be able to set a hardware watchpoint, step, and
55
# get a SIGBUS or SIGSEGV signal reported.
56
#
57
if ![runto_main] then {
58
  fail "can't run to main"
59
  return 0
60
}
61
 
62
send_gdb "watch bogus_p\n"
63
gdb_expect {
64
  -re "Hardware watchpoint \[0-9\]*: bogus_p.*$gdb_prompt $"\
65
          {pass "set h/w watchpoint"}
66
  -re "$gdb_prompt $"\
67
          {fail "set h/w watchpoint"}
68
  timeout {fail "(timeout) set h/w watchpoint"}
69
}
70
 
71
send_gdb "step\n"
72
gdb_expect {
73
  -re "Program received signal (SIGBUS|SIGSEGV), (Bus error|Segmentation fault).* in main .*${srcfile}:8.*$gdb_prompt $"\
74
          {pass "see real signal when h/w watchpoint set"}
75
  -re "$gdb_prompt $"\
76
          {fail "see real signal when h/w watchpoint set"}
77
  timeout {fail "(timeout) see real signal when h/w watchpoint set"}
78
}
79
 
80
remote_exec build "mv ${binfile} ${binfile}.bak"
81
return 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.