OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc1/] [gdb/] [testsuite/] [gdb.hp/] [gdb.base-hp/] [hwwatchbus.exp] - Blame information for rev 341

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 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
 
22
if { [skip_hp_tests] } then { continue }
23
 
24
if { ![istarget "hppa*-*-hpux11.*"] } {
25
    verbose "HPUX h/w watch test ignored for non-hppa or pre-HP/UX-10.30 targets."
26
    return 0
27
}
28
 
29
set testfile "hwwatchbus"
30
set srcfile ${testfile}.c
31
set binfile ${objdir}/${subdir}/${testfile}
32
 
33
# build the first test case
34
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
35
     untested hwwatchbus.exp
36
     return -1
37
}
38
 
39
if [get_compiler_info ${binfile}] {
40
    return -1
41
}
42
 
43
# Start with a fresh gdb
44
 
45
gdb_exit
46
remote_exec build "rm -f ${binfile}.bak"
47
gdb_start
48
gdb_reinitialize_dir $srcdir/$subdir
49
gdb_load ${binfile}
50
 
51
 
52
# We ought to be able to set a hardware watchpoint, step, and
53
# get a SIGBUS or SIGSEGV signal reported.
54
#
55
if ![runto_main] then {
56
  fail "can't run to main"
57
  return 0
58
}
59
 
60
send_gdb "watch bogus_p\n"
61
gdb_expect {
62
  -re "Hardware watchpoint \[0-9\]*: bogus_p.*$gdb_prompt $"\
63
          {pass "set h/w watchpoint"}
64
  -re "$gdb_prompt $"\
65
          {fail "set h/w watchpoint"}
66
  timeout {fail "(timeout) set h/w watchpoint"}
67
}
68
 
69
send_gdb "step\n"
70
gdb_expect {
71
  -re "Program received signal (SIGBUS|SIGSEGV), (Bus error|Segmentation fault).* in main .*${srcfile}:8.*$gdb_prompt $"\
72
          {pass "see real signal when h/w watchpoint set"}
73
  -re "$gdb_prompt $"\
74
          {fail "see real signal when h/w watchpoint set"}
75
  timeout {fail "(timeout) see real signal when h/w watchpoint set"}
76
}
77
 
78
remote_exec build "mv ${binfile} ${binfile}.bak"
79
return 0

powered by: WebSVN 2.1.0

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