public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." @ 2024-03-27 12:45 sourceware-bugzilla-24 at intrigus dot org 2024-03-27 17:12 ` [Bug rust/31565] " tromey at sourceware dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: sourceware-bugzilla-24 at intrigus dot org @ 2024-03-27 12:45 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=31565 Bug ID: 31565 Summary: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." Product: gdb Version: 14.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rust Assignee: unassigned at sourceware dot org Reporter: sourceware-bugzilla-24 at intrigus dot org Target Milestone: --- After running "set language rust" and then executing "info symbol 0xffffffffffffffff" gdb fails with: "That operation is not available on integers of more than 8 bytes." This is indirectly caused by the fix for https://sourceware.org/bugzilla/show_bug.cgi?id=21185 Previously, gdb would parse "0xffffffffffffffff" as i64, while now "ptype 0xffffffffffffffff" returns i128 which "info symbol" apparently does not handle. Bad workaround: Instead of executing "info symbol 0xffffffffffffffff", execute this: "info symbol 0xffffffffffffffffi64" However this has the disadvantage that tools that are scripting gdb have to explicitly add a special-case when gdb is in rust mode. (E.g. pwndbg: https://github.com/pwndbg/pwndbg/issues/2080) This is because the "i64" suffix only works in rust mode and I am not aware of a suffix that works across all languages. Changing the parsing of numbers such that 0xffffffffffffffff is not parsed as a i128 but a u64 would probably not be a solution, because it is also surprising behavior. (This is because "ptype 0xffffffff" is currently parsed as i64 and for consistency this would need to be changed to return u32 or the behavior would be inconsistent). So I'd guess that the best solution might be to have "info symbol" support arguments that are either wider than 64 bit or it should check whether the 128 bit value fits into a 64 bit unsigned type. Versions tested: "GNU gdb (GDB; JetBrains IDE bundle; build 185) 14.1" https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bb9a951fab7a30cc1209c6b8b1716c13456e8b1a (master from 2024-03-26) -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rust/31565] "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." 2024-03-27 12:45 [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." sourceware-bugzilla-24 at intrigus dot org @ 2024-03-27 17:12 ` tromey at sourceware dot org 2024-05-02 15:33 ` tromey at sourceware dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: tromey at sourceware dot org @ 2024-03-27 17:12 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=31565 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at sourceware dot org |tromey at sourceware dot org Last reconfirmed| |2024-03-27 CC| |tromey at sourceware dot org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Tom Tromey <tromey at sourceware dot org> --- I am testing a patch. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rust/31565] "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." 2024-03-27 12:45 [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." sourceware-bugzilla-24 at intrigus dot org 2024-03-27 17:12 ` [Bug rust/31565] " tromey at sourceware dot org @ 2024-05-02 15:33 ` tromey at sourceware dot org 2024-05-08 18:40 ` tromey at sourceware dot org 2024-05-13 21:24 ` tromey at sourceware dot org 3 siblings, 0 replies; 5+ messages in thread From: tromey at sourceware dot org @ 2024-05-02 15:33 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=31565 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tsng.nullptr at outlook dot com --- Comment #2 from Tom Tromey <tromey at sourceware dot org> --- *** Bug 31691 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rust/31565] "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." 2024-03-27 12:45 [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." sourceware-bugzilla-24 at intrigus dot org 2024-03-27 17:12 ` [Bug rust/31565] " tromey at sourceware dot org 2024-05-02 15:33 ` tromey at sourceware dot org @ 2024-05-08 18:40 ` tromey at sourceware dot org 2024-05-13 21:24 ` tromey at sourceware dot org 3 siblings, 0 replies; 5+ messages in thread From: tromey at sourceware dot org @ 2024-05-08 18:40 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=31565 --- Comment #3 from Tom Tromey <tromey at sourceware dot org> --- My current patch works by changing the scalar-extraction code to handle over-long byte sequences as long as the resulting value fits. However I wonder if instead I should just change the rust parser to emit u64 in this scenario. That is a bit weird but maybe not fatally so. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rust/31565] "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." 2024-03-27 12:45 [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." sourceware-bugzilla-24 at intrigus dot org ` (2 preceding siblings ...) 2024-05-08 18:40 ` tromey at sourceware dot org @ 2024-05-13 21:24 ` tromey at sourceware dot org 3 siblings, 0 replies; 5+ messages in thread From: tromey at sourceware dot org @ 2024-05-13 21:24 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=31565 --- Comment #4 from Tom Tromey <tromey at sourceware dot org> --- Using u64 is weird though, because then using '-' on some big number will give the wrong answer. Feeling a bit stuck but probably should go back to the old approach. Or maybe just use i64 here. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-13 21:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-27 12:45 [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." sourceware-bugzilla-24 at intrigus dot org 2024-03-27 17:12 ` [Bug rust/31565] " tromey at sourceware dot org 2024-05-02 15:33 ` tromey at sourceware dot org 2024-05-08 18:40 ` tromey at sourceware dot org 2024-05-13 21:24 ` tromey at sourceware dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).