aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-09-08 17:39:22 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-09-08 17:39:22 +0000
commitb554e4bd5309b7a5bdfd36ab20c4c8f3edcb88d5 (patch)
treeb1226a5ee7b476be1699ffbdc549cbd454e1ab06 /gdb/testsuite
parent7e127222000a836f4a46e9cd2ef6ae156dcbc133 (diff)
downloadgdb-b554e4bd5309b7a5bdfd36ab20c4c8f3edcb88d5.zip
gdb-b554e4bd5309b7a5bdfd36ab20c4c8f3edcb88d5.tar.gz
gdb-b554e4bd5309b7a5bdfd36ab20c4c8f3edcb88d5.tar.bz2
gdb/
Fix ia64 shadowing of breakpoints in multiple slots of a single bundle. * ia64-tdep.c (ia64_memory_insert_breakpoint): New call of make_show_memory_breakpoints_cleanup with parameter 0. Move the reading of SHADOW_CONTENTS to this memory state point of code. Update comment for the memory re-read. gdb/testsuite/ * gdb.base/breakpoint-shadow.exp (Second breakpoint placed): Initialize $bpt2address. (Second breakpoint address is valid on ia64) (Third breakpoint on ia64 in the Second breakpoint's bundle): New.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/breakpoint-shadow.exp24
2 files changed, 30 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 824dfb7..f6ffeb9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/breakpoint-shadow.exp (Second breakpoint placed): Initialize
+ $bpt2address.
+ (Second breakpoint address is valid on ia64)
+ (Third breakpoint on ia64 in the Second breakpoint's bundle): New.
+
2009-09-03 Joseph Myers <joseph@codesourcery.com>
* gdb.base/ending-run.exp: Restrict regular expression matching
diff --git a/gdb/testsuite/gdb.base/breakpoint-shadow.exp b/gdb/testsuite/gdb.base/breakpoint-shadow.exp
index fcc50dd..7da032f 100644
--- a/gdb/testsuite/gdb.base/breakpoint-shadow.exp
+++ b/gdb/testsuite/gdb.base/breakpoint-shadow.exp
@@ -48,7 +48,29 @@ gdb_test_multiple "disass main" $test {
}
gdb_test "b [gdb_get_line_number "break-first"]" "Breakpoint \[0-9\] at .*" "First breakpoint placed"
-gdb_test "b [gdb_get_line_number "break-second"]" "Breakpoint \[0-9\] at .*" "Second breakpoint placed"
+set test "Second breakpoint placed"
+gdb_test_multiple "b [gdb_get_line_number "break-second"]" $test {
+ -re "Breakpoint \[0-9\] at (0x\[0-9a-f\]*):.*" {
+ pass $test
+ set bpt2address $expect_out(1,string)
+ }
+}
+
+if [istarget "ia64-*-*"] then {
+ # Unoptimized code should not use the 3rd slot for the first instruction of
+ # a source line. This is important for our test, because we want both
+ # breakpoints ("Second breakpoint" and the following one) to be in the same
+ # bundle.
+
+ set test "Second breakpoint address is valid on ia64"
+ if [string match "*\[01\]" $bpt2address] {
+ pass $test
+
+ gdb_test "b *($bpt2address + 1)" "Breakpoint \[0-9\] at .*" "Third breakpoint on ia64 in the Second breakpoint's bundle"
+ } else {
+ unresolved $test
+ }
+}
set test "disassembly with breakpoints"
gdb_test_multiple "disass main" $test {