public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "sourceware-bugzilla-24 at intrigus dot org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug rust/31565] New: "info symbol 0xffffffffffffffff" fails in rust mode with "That operation is not available on integers of more than 8 bytes." Date: Wed, 27 Mar 2024 12:45:56 +0000 [thread overview] Message-ID: <bug-31565-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2024-03-27 12:45 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-27 12:45 sourceware-bugzilla-24 at intrigus dot org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31565-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).