From: Sven Schnelle <svens@stackframe.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, Helge Deller <deller@gmx.de>,
John David Anglin <dave.anglin@bell.net>,
binutils@sourceware.org
Subject: Re: [PATCH RESEND] gdb/hppa: guess g packet size
Date: Mon, 03 Nov 2025 22:39:22 +0100 [thread overview]
Message-ID: <87tszapzhx.fsf@stackframe.org> (raw)
In-Reply-To: <87seeuak0z.fsf@tromey.com> (Tom Tromey's message of "Mon, 03 Nov 2025 14:22:36 -0700")
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Sven" == Sven Schnelle <svens@stackframe.org> writes:
>
> Sven> With qemu supporting 64 bit now, add some code to determine the
> Sven> register size of a hppa remote target.
>
> Thanks for the patch.
>
> Sven> +struct target_desc *hppa_tdesc32;
> Sven> +struct target_desc *hppa_tdesc64;
>
> These should be 'static'. They can also just be objects, not pointers,
> I think.
> Sven> + hppa_tdesc32 = allocate_target_description ().release ();
> Sven> + set_tdesc_property (hppa_tdesc32, PROPERTY_GP32, "");
> Sven> +
> Sven> + hppa_tdesc64 = allocate_target_description ().release ();
> Sven> + set_tdesc_property (hppa_tdesc64, PROPERTY_GP64, "");
>
> The reason I suggested using objects and not pointers is that, although
> we do have a number of calls to .release() in gdb, we somewhat try to
> avoid them.
I might of course be wrong because i don't know the code well, but
struct target_desc is declared in target-description.c and in the
tdep file it's only used as opaque type. So it can't be used as object
because the size isn't known. Is this correct, or am i misreading the
code?
Thanks
Sven
next prev parent reply other threads:[~2025-11-03 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 8:05 Sven Schnelle
2025-11-01 13:48 ` Helge Deller
2025-11-03 21:22 ` Tom Tromey
2025-11-03 21:39 ` Sven Schnelle [this message]
2025-11-03 22:59 ` Simon Marchi
2025-11-04 6:31 ` Sven Schnelle
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=87tszapzhx.fsf@stackframe.org \
--to=svens@stackframe.org \
--cc=binutils@sourceware.org \
--cc=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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