aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.rust/simple.exp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-03-27 10:43:57 -0600
committerTom Tromey <tom@tromey.com>2024-06-20 10:45:05 -0600
commit6eb63917ce17236f0189e8d7ff4b60e24741770b (patch)
tree206081da38a1dac3e5166d55942ffa90061e2d15 /gdb/testsuite/gdb.rust/simple.exp
parent4429b54cc831e436d27ba6f0e3c417543c22f486 (diff)
downloadbinutils-6eb63917ce17236f0189e8d7ff4b60e24741770b.zip
binutils-6eb63917ce17236f0189e8d7ff4b60e24741770b.tar.gz
binutils-6eb63917ce17236f0189e8d7ff4b60e24741770b.tar.bz2
Handle "info symbol" in Rust language mode
When I changed the Rust parser to handle 128-bit ints, this inadvertently broke some other gdb commands. For example, "info symbol 0xffffffffffffffff" now fails, because the resulting value is 128 bits, but this is rejected by extract_integer. This patch fixes the problem by changing extract_integer to allow over-long integers as long as the high bytes are either 0, or (for signed types) 0xff. Regression tested on x86-64 Fedora 38. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31565 Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/testsuite/gdb.rust/simple.exp')
-rw-r--r--gdb/testsuite/gdb.rust/simple.exp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 1e6fc94..37a2e07 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -421,3 +421,6 @@ gdb_test "print 4 - 3 - 1" " = 0"
# Another operator precedence bug.
gdb_test "print \$one = \$two = 75" " = \\\(\\\)"
+
+gdb_test "info symbol 0xffffffffffffffff" \
+ "No symbol matches 0xffffffffffffffff."