Question Regarding Int Cast Error in GDB Python

Vacha Bhavsar vacha.bhavsar@oss.qualcomm.com
Wed Sep 3 18:59:03 GMT 2025


I have filed this in bugzilla.

Thanks,
Vacha

On Fri, Aug 29, 2025 at 1:46 PM Tom Tromey <tom@tromey.com> wrote:

> >>>>> ">" == 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
>


More information about the Gdb mailing list