From: Tom Tromey <tom@tromey.com>
To: Vacha Bhavsar via Gdb <gdb@sourceware.org>
Cc: Vacha Bhavsar <vacha.bhavsar@oss.qualcomm.com>
Subject: Re: Question Regarding Int Cast Error in GDB Python
Date: Fri, 29 Aug 2025 11:46:09 -0600 [thread overview]
Message-ID: <87o6ryt40u.fsf@tromey.com> (raw)
In-Reply-To: <CAEWVDmtoZet3B28Vm+c=-wZOQamAvnVnpxV0pQ-8xhH-TGoS1w@mail.gmail.com> (Vacha Bhavsar via Gdb's message of "Fri, 22 Aug 2025 14:21:33 -0400")
>>>>> ">" == Vacha Bhavsar via Gdb <gdb@sourceware.org> writes:
>> v = gdb.parse_and_eval(reg)
>> report(str(v.type) == "uint8_t", "size of %s" % (reg))
>> report(int(v) == 0x1, "%s is 0x%x" % (reg, 0x1))
>> This results in the following error:
>> Python Exception <class 'gdb.error'>: That operation is not available
>> on integers of more than 8 bytes.
I think this is just a bug. Would you mind filing it in bugzilla?
python/py-value.c:valpy_long uses value_as_long. However if it used
value_as_mpz instead, it could handle types wider than 64 bits.
Tom
next prev parent reply other threads:[~2025-08-29 17:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 18:21 Vacha Bhavsar via Gdb
2025-08-25 8:35 ` Luis via Gdb
2025-08-25 13:23 ` Vacha Bhavsar via Gdb
2025-08-25 13:29 ` Vacha Bhavsar via Gdb
2025-08-26 20:49 ` Luis via Gdb
2025-08-27 19:16 ` Vacha Bhavsar via Gdb
2025-08-29 17:46 ` Tom Tromey [this message]
2025-09-03 18:59 ` Vacha Bhavsar via Gdb
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=87o6ryt40u.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb@sourceware.org \
--cc=vacha.bhavsar@oss.qualcomm.com \
/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: link
Be 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