Re: Question Regarding Int Cast Error in GDB Python
Vacha Bhavsar via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAEWVDmt94t+n+=+7upFk0y5ruDC_JmzdvZCMJ-jSWjWf2cs1_A@mail.gmail.com> |
I have filed this in bugzilla. Thanks, Vacha On Fri, Aug 29, 2025 at 1:46 PM Tom Tromey <[email protected]> wrote: > >>>>> ">" == Vacha Bhavsar via Gdb <[email protected]> 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 >