aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-05-01 17:57:56 +0200
committerTom de Vries <tdevries@suse.de>2020-05-01 17:57:56 +0200
commit693196cba23b888d7014a3533b132b756e8d4e79 (patch)
treeb6e2f9a8adeb6b6acccab6f867516505646ed608 /gdb/testsuite
parent652fc23a30a1c04ff2ec67fa3c08f39bd28ad0d2 (diff)
downloadgdb-693196cba23b888d7014a3533b132b756e8d4e79.zip
gdb-693196cba23b888d7014a3533b132b756e8d4e79.tar.gz
gdb-693196cba23b888d7014a3533b132b756e8d4e79.tar.bz2
[gdb/testsuite] Fix gdb.ada/operator_bp.exp breakpoint location FAILs
When running test-case gdb.ada/operator_bp.exp with gcc-10, I run into: ... FAIL: gdb.ada/operator_bp.exp: break "+" FAIL: gdb.ada/operator_bp.exp: break "-" FAIL: gdb.ada/operator_bp.exp: break "<" FAIL: gdb.ada/operator_bp.exp: break "<=" FAIL: gdb.ada/operator_bp.exp: break ">" FAIL: gdb.ada/operator_bp.exp: break ">=" FAIL: gdb.ada/operator_bp.exp: break "=" FAIL: gdb.ada/operator_bp.exp: break "and" FAIL: gdb.ada/operator_bp.exp: break "or" FAIL: gdb.ada/operator_bp.exp: break "xor" FAIL: gdb.ada/operator_bp.exp: break "not" ... The first FAIL is because two breakpoint locations are expected, but there are more than 2: ... (gdb) break "+" Breakpoint 2 at 0x402c3c: "+". (6 locations) (gdb) info break Num Type Disp Enb Address What 2 breakpoint keep y <MULTIPLE> 2.1 y 0x0000000000402c3c in ops."+" at operator_bp/ops.adb:25 2.2 y 0x0000000000402e5b in ops."+" at operator_bp/ops.adb:119 2.3 y 0x0000000000414207 in system.storage_elements."+" at s-stoele.adb:82 2.4 y 0x0000000000414404 in system.storage_elements."+" at s-stoele.adb:87 2.5 y 0x0000000000414413 in system.storage_elements."+" at s-stoele.adb:87 2.6 y 0x0000000000414430 in system.storage_elements."+" at s-stoele.adb:81 ... This can be traced back to a extra debug info in the executable: ... $ readelf -w ops_test | grep system__storage_elements__Oadd <28104> DW_AT_name : system__storage_elements__Oadd__2 <2812e> DW_AT_name : system__storage_elements__Oadd ... Fix the FAILs by allowing more than the required amount of breakpoint locations. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-05-01 Tom de Vries <tdevries@suse.de> * gdb.ada/operator_bp.exp: Allow more than required amount of breakpoint.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.ada/operator_bp.exp14
2 files changed, 15 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 210499a..737caff 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2020-05-01 Tom de Vries <tdevries@suse.de>
+ * gdb.ada/operator_bp.exp: Allow more than required amount of
+ breakpoint.
+
+2020-05-01 Tom de Vries <tdevries@suse.de>
+
* gdb.reverse/until-reverse.c (main): Fix Wunused-result warning.
2020-04-30 Hannes Domani <ssbssa@yahoo.de>
diff --git a/gdb/testsuite/gdb.ada/operator_bp.exp b/gdb/testsuite/gdb.ada/operator_bp.exp
index 283d76a..c882c94 100644
--- a/gdb/testsuite/gdb.ada/operator_bp.exp
+++ b/gdb/testsuite/gdb.ada/operator_bp.exp
@@ -33,16 +33,22 @@ runto "ops_test.adb:$bp_location"
# Set breakpoints for all operators, using just the operator name in quotes.
+set bp_re "Breakpoint $decimal at $hex"
foreach op { "+" "-" } {
set op_re [string_to_regexp $op]
- gdb_test "break \"$op\"" \
- "Breakpoint $decimal at $hex: \"$op_re\"\. \\(2 locations\\)"
+ gdb_test "break \"$op\"" "$bp_re: \"$op_re\"\. \\($decimal locations\\).*"
}
foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
set op_re [string_to_regexp $op]
- gdb_test "break \"$op\"" \
- "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal."
+ gdb_test_multiple "break \"$op\"" "" {
+ -re -wrap "$bp_re: file .*ops.adb, line $decimal." {
+ pass $gdb_test_name
+ }
+ -re -wrap "$bp_re: \"$op_re\"\. \\($decimal locations\\).*" {
+ pass $gdb_test_name
+ }
+ }
}
# Make sure we stop correctly in each operator function.