Commit graph

5 commits

Author SHA1 Message Date
Tom Tromey
6eb63917ce 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>
2024-06-20 10:45:05 -06:00
Tom Tromey
d4b508dd5c Remove extract_long_unsigned_integer
The function extract_long_unsigned_integer is unused, so remove it.
Tested by rebuilding.

Approved-By: Andrew Burgess <aburgess@redhat.com>
2024-06-11 09:07:19 -06:00
Simon Marchi
c527001f38 gdb: adjust copyright years of extract-store-integer.{c,h}
The contents of these files was copied from defs.h and findvar.  Copy
over the copyright years (1986-2024).

Change-Id: Idfb0f255fbcfda7e107e9a82804cece3d81ed5fc
2024-04-23 16:16:37 -04:00
Simon Marchi
6e7c49c2dd gdb: move RequireLongest to gdbsupport/traits.h
Move it out of defs.h.

Change-Id: Ie1743d41a57f81667650048563e66073c72230cf
Approved-By: John Baldwin <jhb@FreeBSD.org>
2024-04-22 21:34:19 -04:00
Simon Marchi
ec45252592 gdb: move store/extract integer functions to extract-store-integer.{c,h}
Move the declarations out of defs.h, and the implementations out of
findvar.c.

I opted for a new file, because this functionality of converting
integers to bytes and vice-versa seems a bit to generic to live in
findvar.c.

Change-Id: I524858fca33901ee2150c582bac16042148d2251
Approved-By: John Baldwin <jhb@FreeBSD.org>
2024-04-22 21:34:19 -04:00