[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-cvs
Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.ada/convvar_comp.exp with broken debug info
From: Tom de Vries via Gdb-cvs <gdb-cvs () sourceware ! org>
Date: 2022-07-29 14:12:58
Message-ID: 20220729141258.4EE3F3858C39 () sourceware ! org
[Download RAW message or body]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ec878132bb39fb43e081dcf53e42aca202b24d9
commit 5ec878132bb39fb43e081dcf53e42aca202b24d9
Author: Tom de Vries <tdevries@suse.de>
Date: Fri Jul 29 16:12:55 2022 +0200
[gdb/testsuite] Fix gdb.ada/convvar_comp.exp with broken debug info
On aarch64-linux I run into this failure with gcc 7.5.0:
...
(gdb) print $item.started^M
$1 = (-5312, 65535, 4202476)^M
(gdb) FAIL: gdb.ada/convvar_comp.exp: print $item.started
...
The test-case expects (0, 0, 0), but we're getting another value due to
incorrect location information.
Work around this by:
- first printing the value, and then
- verifying that the convenience variable matches the printed value.
I've verified that the test-case still checks what it should by disabling
the fix from commit cc0e770c0d0 ("memory error printing component of record
from convenience variable") and observing the test-case fail.
Tested on x86_64-linux and aarch64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29420
Diff:
---
gdb/testsuite/gdb.ada/convvar_comp.exp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.ada/convvar_comp.exp b/gdb/testsuite/gdb.ada/convvar_comp.exp
index ebc2659aeaa..1923bd785c7 100644
--- a/gdb/testsuite/gdb.ada/convvar_comp.exp
+++ b/gdb/testsuite/gdb.ada/convvar_comp.exp
@@ -30,7 +30,15 @@ if ![runto "break_me" ] then {
return
}
+set val ""
+gdb_test_multiple "print item.started" "" {
+ -re -wrap " = \\((.*)\\)" {
+ set val $expect_out(1,string)
+ pass $gdb_test_name
+ }
+}
+
gdb_test_no_output "set variable \$item := item"
gdb_test "print \$item.started" \
- " = \\(0, 0, 0\\)"
+ " = \\($val\\)"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic