aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-05-17 17:10:19 +0000
committerMichael Snyder <msnyder@vmware.com>2000-05-17 17:10:19 +0000
commit1a570b2f5fa09f3130d017b5d6daa6d26593ebd8 (patch)
tree3eab14d7bfa9704165dcb2c4fde8e6a0dadcae73 /gdb/testsuite
parentaca52a9bccedd1d8cbc5c03363eda5d7dcce6619 (diff)
downloadgdb-1a570b2f5fa09f3130d017b5d6daa6d26593ebd8.zip
gdb-1a570b2f5fa09f3130d017b5d6daa6d26593ebd8.tar.gz
gdb-1a570b2f5fa09f3130d017b5d6daa6d26593ebd8.tar.bz2
2000-05-12 Michael Snyder <msnyder@.cygnus.com>
* gdb.base/break.exp (bp on small function, optimized file): Add a second pass pattern. The behavior differs here between stabs and dwarf for one-line functions. Stabs preserves two line symbols (one before the prologue and one after) with the same line number, but dwarf regards these as duplicates and discards one of them. Therefore the address after the prologue (where the breakpoint is) has no exactly matching line symbol, and GDB reports the breakpoint as if it were in the middle of a line rather than at the beginning.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog11
-rw-r--r--gdb/testsuite/gdb.base/break.exp27
2 files changed, 36 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d2248a1..0f7d436 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -5,6 +5,17 @@
Instead, it is permissible for gdb to stop on the line of the
call itself.
+2000-05-12 Michael Snyder <msnyder@.cygnus.com>
+
+ * gdb.base/break.exp (bp on small function, optimized file):
+ Add a second pass pattern. The behavior differs here between stabs
+ and dwarf for one-line functions. Stabs preserves two line symbols
+ (one before the prologue and one after) with the same line number,
+ but dwarf regards these as duplicates and discards one of them.
+ Therefore the address after the prologue (where the breakpoint is)
+ has no exactly matching line symbol, and GDB reports the breakpoint
+ as if it were in the middle of a line rather than at the beginning.
+
2000-05-08 Michael Snyder <msnyder@seadog.cygnus.com>
* gdb.base/interrupt.exp: Make "pass" message say "send"
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index aaad20a..aa9fba5 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -872,8 +872,31 @@ if ![target_info exists use_gdb_stub] {
#
# run until the breakpoint at a small function
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile:51.*51\[\t \]+void.*marker4.*" \
- "run until breakpoint set at small function, optimized file"
+
+#
+# Add a second pass pattern. The behavior differs here between stabs
+# and dwarf for one-line functions. Stabs preserves two line symbols
+# (one before the prologue and one after) with the same line number,
+# but dwarf regards these as duplicates and discards one of them.
+# Therefore the address after the prologue (where the breakpoint is)
+# has no exactly matching line symbol, and GDB reports the breakpoint
+# as if it were in the middle of a line rather than at the beginning.
+
+send_gdb "continue\n"
+gdb_expect {
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+ pass "run until breakpoint set at small function, optimized file"
+ }
+ -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+ pass "run until breakpoint set at small function, optimized file"
+ }
+ -re ".*$gdb_prompt " {
+ fail "run until breakpoint set at small function, optimized file"
+ }
+ timeout {
+ fail "run until breakpoint set at small function, optimized file (timeout)"
+ }
+}
# Reset the default arguments for VxWorks