From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF41C385DC06; Wed, 27 Mar 2024 12:45:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF41C385DC06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711543557; bh=ycOO8a6Gn4IX3q3E8hHHPCSUpI7R4I8LSoBKmqlnwjc=; h=From:To:Subject:Date:From; b=a/6FAkUzkWqqOzNH8qQRr5El2YCbOqN69dyZXjWVpn1rWfKyPU+vZpS/XtHGeMnqQ t7Rn49IOvyyBrQ80E9BqxSGKAT4VFUDLew5iJpD8tgbz0QOZeimcKCMOUKQ6slPBmV sn7pvDM9tl7Ml/FaytcC5fm+onE8ooJT3WPTXlec= From: "sourceware-bugzilla-24 at intrigus dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: rust X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sourceware-bugzilla-24 at intrigus dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31565 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=3D21185 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 surpris= ing 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 wou= ld 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=3Dbinutils-gdb.git;a=3Dcommit;h=3Dbb9a951fab7= a30cc1209c6b8b1716c13456e8b1a (master from 2024-03-26) --=20 You are receiving this mail because: You are on the CC list for the bug.=