From: Yodel Eldar <yodel.eldar@gmail.com>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches@sourceware.org, Yodel Eldar <yodel.eldar@gmail.com>
Subject: Re: [PATCH 1/2] gdb/alpha: Add target description support
Date: Wed, 4 Jun 2025 08:44:20 -0500 [thread overview]
Message-ID: <9feb7348-1dde-40cc-b21d-97671b8b3e39@gmail.com> (raw)
In-Reply-To: <55cdf445-fee8-4e70-99c0-6d42eb68cd7d@simark.ca>
On 6/3/25 1:49 PM, Simon Marchi wrote:
> On 5/26/25 11:12 AM, Yodel Eldar wrote:
>> @@ -1715,11 +1696,39 @@ alpha_software_single_step (struct regcache *regcache)
>> static struct gdbarch *
>> alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
>> {
>> + tdesc_arch_data_up tdesc_data;
>> + const struct target_desc *tdesc = info.target_desc;
>> +
>> /* Find a candidate among extant architectures. */
>> arches = gdbarch_list_lookup_by_info (arches, &info);
>> if (arches != NULL)
>> return arches->gdbarch;
>>
>> + if (tdesc == nullptr)
>> + tdesc = tdesc_alpha;
>> +
>> + /* Validate target description. */
>> + if (tdesc_has_registers (tdesc))
>> + {
>> + const struct tdesc_feature *feature;
>> + bool valid_p;
>> +
>> + feature = tdesc_find_feature (tdesc, "org.gnu.gdb.alpha.core");
>> + if (feature == nullptr)
>> + return nullptr;
>> +
>> + tdesc_data = tdesc_data_alloc ();
>> + valid_p = true;
>> + for (int i = 0; i < ALPHA_NUM_REGS; ++i)
>> + valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), i,
>> + alpha_register_names[i]);
>> +
>> + if (!valid_p)
>> + return nullptr;
> Do we need to call tdesc_numbered_register for the register whose name
> is ""? I suppose that we do, for backwards compatibility, when
> debugging against a remote target that doesn't send a target
> description?
>
> Simon
Hi Simon and thanks for your time and question! I think we do, because
(IIUC) suppose an older remote target responds to, say, a 'p n' packet,
but the anonymous register is unaccounted for by the client, wouldn't
that break compatibility? Can't say for certain, so I defer to your and
the community's wisdom and err on the side of caution as I investigate
it.
Yodel
next prev parent reply other threads:[~2025-06-04 13:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 15:12 [PATCH 0/2] gdb/alpha: Add target description support and fpcr flags Yodel Eldar
2025-05-26 15:12 ` [PATCH 1/2] gdb/alpha: Add target description support Yodel Eldar
2025-05-26 16:13 ` Eli Zaretskii
2025-05-26 17:14 ` Yodel
2025-06-03 18:49 ` Simon Marchi
2025-06-04 13:44 ` Yodel Eldar [this message]
2025-06-04 14:49 ` Maciej W. Rozycki
2025-06-04 17:29 ` Yodel Eldar
2025-06-12 19:29 ` Yodel Eldar
2025-06-12 20:30 ` Simon Marchi
2025-06-12 20:33 ` Simon Marchi
2025-06-12 22:07 ` Yodel Eldar
2025-06-13 14:34 ` Simon Marchi
2025-06-30 0:08 ` Yodel Eldar
2025-07-02 17:14 ` Simon Marchi
2025-07-02 18:51 ` Yodel Eldar
2025-07-02 18:53 ` Maciej W. Rozycki
2025-07-02 19:02 ` Simon Marchi
2025-07-02 19:21 ` Maciej W. Rozycki
2025-07-02 20:52 ` Yodel Eldar
2025-07-02 21:12 ` Maciej W. Rozycki
2025-07-03 16:49 ` Yodel Eldar
2025-07-03 16:02 ` Simon Marchi
2025-07-02 18:48 ` Maciej W. Rozycki
2025-05-26 15:12 ` [PATCH 2/2] gdb/alpha: Redefine fpcr with fpcr_flags type Yodel Eldar
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=9feb7348-1dde-40cc-b21d-97671b8b3e39@gmail.com \
--to=yodel.eldar@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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