From: Vacha Bhavsar via Gdb <gdb@sourceware.org>
To: Luis <luis.machado.foss@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Question Regarding Int Cast Error in GDB Python
Date: Wed, 27 Aug 2025 15:16:40 -0400 [thread overview]
Message-ID: <CAEWVDmvAvH8WEAzBq7Bemh15aU5e_B2KUkdwVBNZ4D9coCF+Fw@mail.gmail.com> (raw)
In-Reply-To: <21e45c38-4240-4238-abcf-027ca05a36a1@gmail.com>
Hi,
We chose this particular cast just to stay aligned with the
existing method of testing in QEMU which also uses this cast
but for 64bit integers.
qemu/tests/tcg/aarch64/gdbstub/test-sve.py at
b86307ecef9222c335ebd0ed4da2b243e86f779e · qemu/qemu
<https://github.com/qemu/qemu/blob/b86307ecef9222c335ebd0ed4da2b243e86f779e/tests/tcg/aarch64/gdbstub/test-sve.py>
https://lists.gnu.org/archive/html/qemu-devel/2025-08/msg01815.html
However, since we have seen that this issue only occurs with the
specific indiciated version of gdb, and does not fail for example with
gdb16.3, we have implemented a workaround to avoid the
casting in the case of gdb-multiarch 15.0.50.20240403-0ubuntu1.
Thank you for confirming this is a known issue!
Thanks,
Vacha
On Tue, Aug 26, 2025 at 4:49 PM Luis <luis.machado.foss@gmail.com> wrote:
> Hi,
>
> On 8/25/25 14:29, Vacha Bhavsar wrote:
> > Hi,
> >
> > Apologies, it seems I pasted the wrong snippet in the original email.
> > The code in my reply just prior to this is the correct code. The snippet
> > that
> > should have been included in the first email, which causes the error, is
> > the one below:
> >
> > v = gdb.parse_and_eval(reg)
> > report(str(v.type) == "uint128_t", "size of %s" % (reg))
>
> Right, so gdb doesn't like casting integers to/from 8+ bytes. That's a
> limitation currently. But why are you considering this particular cast?
> To optimize the checks instead of using the byte vectors?
>
next prev parent reply other threads:[~2025-08-27 19:18 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 [this message]
2025-08-29 17:46 ` Tom Tromey
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=CAEWVDmvAvH8WEAzBq7Bemh15aU5e_B2KUkdwVBNZ4D9coCF+Fw@mail.gmail.com \
--to=gdb@sourceware.org \
--cc=luis.machado.foss@gmail.com \
--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