Bug 29055 - [gdb/testsuite] FAIL: gdb.ada/ghost.exp: print value (timeout)
Summary: [gdb/testsuite] FAIL: gdb.ada/ghost.exp: print value (timeout)
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 13.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-13 05:44 UTC by Tom de Vries
Modified: 2022-06-10 06:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2022-04-13 05:44:26 UTC
On openSUSE Tumbleweed I run into:
...
(gdb) print value^M
Multiple matches for value^M
[0] cancel^M
[1] ada.strings.maps.value (<ref> ada.strings.maps.character_mapping; character) return character at a-strmap.adb:317^M
[2] pck.value at /data/vries/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/ghost/pck.ads:17^M
[3] system.object_reader.value (<ref> system.object_reader.object_symbol) return system.object_reader.uint64 at s-objrea.adb:2274^M
[4] system.traceback.symbolic.value (system.address) return string at s-trasym.adb:200^M
> FAIL: gdb.ada/ghost.exp: print value (timeout)
...
Comment 1 Tom Tromey 2022-04-14 19:09:38 UTC
We should probably just rename the "value" in the test to 
something that's never going to clash with libgnat.
Comment 2 Tom de Vries 2022-06-09 09:32:56 UTC
How about prefixing with the package name:
...
diff --git a/gdb/testsuite/gdb.ada/ghost.exp b/gdb/testsuite/gdb.ada/ghost.exp
index 7f92b130eff..ece03dbe2f8 100644
--- a/gdb/testsuite/gdb.ada/ghost.exp
+++ b/gdb/testsuite/gdb.ada/ghost.exp
@@ -32,6 +32,6 @@ if ![runto "main.adb:$bp_location" ] then {
   return
 }
 
-gdb_test "print value" " = 64 '@'"
-gdb_test "print ghost_value" " = 64 '@'"
-gdb_test "print value2" " = 33 '!'"
+gdb_test "print pck.value" " = 64 '@'"
+gdb_test "print pck.ghost_value" " = 64 '@'"
+gdb_test "print gpck.value2" " = 33 '!'"
...
?

That looks like a more reliable way to get the names we want.
Comment 3 Tom Tromey 2022-06-09 22:01:10 UTC
Yeah, I think that would be fine.
Comment 4 Tom de Vries 2022-06-10 06:48:50 UTC
(In reply to Tom Tromey from comment #3)
> Yeah, I think that would be fine.

Fixed like that: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=84860e85919f7f09328ae1f84303435ff2e6ee64