This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] [gdb/testsuite/ada] Fix number-of-bp test in bp_inlined_func.exp
- From: Tom de Vries <vries at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 18 Jun 2018 07:05:45 -0000
- Subject: [binutils-gdb] [gdb/testsuite/ada] Fix number-of-bp test in bp_inlined_func.exp
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0fe3a558306ba4792c96e7258bd7209a206e2867
commit 0fe3a558306ba4792c96e7258bd7209a206e2867
Author: Tom de Vries <tdevries@suse.de>
Date: Mon Jun 11 13:34:57 2018 +0200
[gdb/testsuite/ada] Fix number-of-bp test in bp_inlined_func.exp
At the moment, bp_inlined_func.exp passes for a combined current gcc and
gdb-binutils repos build but fails for a build with system gcc (7.3.1) and
ld (2.29.1).
It checks for 4 breakpoints on read_small:
...
gdb_test "break read_small" \
"Breakpoint $decimal at $hex: read_small\\. \\(4 locations\\)" \
"set breakpoint at read_small"
...
and fails because it gets 5 breakpoint locations instead:
...
(gdb) break read_small
Breakpoint 2 at 0x401f9a: read_small. (5 locations)
(gdb) FAIL: gdb.ada/bp_inlined_func.exp: set breakpoint at read_small
...
The 4 expected breakpoint locations are inlined versions of read_small, and
the 5th breakpoint location has this address:
...
(gdb) info breakpoint
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x0000000000401f9a in b.read_small
at bp_inlined_func/b.adb:20
...
which is the read_small function itself:
...
(gdb) x 0x0000000000401f9a
0x401f9a <b__read_small+4>: 0x22f8058b
...
This patch updates the test to allow 5 breakpoint locations.
Tested on the configurations mentioned above, on x86_64.
2018-06-18 Tom de Vries <tdevries@suse.de>
* gdb.ada/bp_inlined_func.exp: Allow 5 breakpoint locations.
Diff:
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.ada/bp_inlined_func.exp | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c7fee80..173ee2b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-18 Tom de Vries <tdevries@suse.de>
+
+ * gdb.ada/bp_inlined_func.exp: Allow 5 breakpoint locations.
+
2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
Richard Bunt <Richard.Bunt@arm.com>
diff --git a/gdb/testsuite/gdb.ada/bp_inlined_func.exp b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
index 0f615f5..2013e6b 100644
--- a/gdb/testsuite/gdb.ada/bp_inlined_func.exp
+++ b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
@@ -29,10 +29,10 @@ if ![runto_main] then {
}
# Check that inserting breakpoint on read_small inlined function inserts
-# 4 breakpoints.
+# 4 breakpoints (or possibly 5, including the read_small function itself).
gdb_test "break read_small" \
- "Breakpoint $decimal at $hex: read_small\\. \\(4 locations\\)" \
+ "Breakpoint $decimal at $hex: read_small\\. \\(\[45\] locations\\)" \
"set breakpoint at read_small"
# We do not verify each breakpoint info, but use continue commands instead