From: Guinevere Larsen <guinevere@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb: add warning when no native target is available
Date: Thu, 27 Nov 2025 17:15:56 -0300 [thread overview]
Message-ID: <1e9baea6-7d12-4ca8-a094-d4bdef64727c@redhat.com> (raw)
In-Reply-To: <86frapapp4.fsf@gnu.org>
On 11/7/25 11:21 AM, Eli Zaretskii wrote:
>> Date: Fri, 7 Nov 2025 10:24:15 -0300
>> Cc: gdb-patches@sourceware.org
>> From: Guinevere Larsen <guinevere@redhat.com>
>>
>> On 11/7/25 4:48 AM, Eli Zaretskii wrote:
>>>> From: Guinevere Larsen <guinevere@redhat.com>
>>>> Cc: Guinevere Larsen <guinevere@redhat.com>
>>>> Date: Thu, 6 Nov 2025 16:45:14 -0300
>>>>
>>>> + if (get_native_target () == nullptr)
>>>> + warning (_("No native target, only remote debugging is supported.\n"
>>>> + "Use \"%ps\" to check which architectures are supported."),
>>>> + styled_string (command_style.style (), "info architecture"));
>>> Would we also say "Native debugging is supported" in the opposite
>>> case?
>>>
>>> Thanks.
>>>
>> When you debug an inferior without connecting to a gdbserver, you are
>> doing native debugging, but I don't think it makes sense to warn the
>> user that native debugging is supported since that is the default
>> behavior of GDB, if that is what you mean with this email.
> Then perhaps I don't understand the purpose of the patch. I thought
> it was part of showing the information about GDB at the start of a
> session. In that case, I think it's good to let user know that this
> GDB supports native debugging, and also tell them if it doesn't.
> Apologies if I misunderstood.
>
The purpose of this patch is to make the user aware that GDB will not
work as they likely expect.
Most of the GDB usage and explanations that I've seen so far barely
mention gdbserver, and basically never mention debugging a different
architecture, so if a user just fires up GDB and it isn't able to debug
anything natively, that will be highly unexpected, hence emitting a warning.
--
Cheers,
Guinevere Larsen
It/she
prev parent reply other threads:[~2025-11-27 20:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 19:45 [PATCH 0/2] Add warning if the native target is not supported Guinevere Larsen
2025-11-06 19:45 ` [PATCH 1/2] gdb: introduce command "info architecture" Guinevere Larsen
2025-11-06 23:24 ` Maciej W. Rozycki
2025-11-07 13:10 ` Guinevere Larsen
2025-11-07 15:51 ` Maciej W. Rozycki
2025-11-07 16:05 ` Hannes Domani
2025-11-08 2:02 ` Maciej W. Rozycki
2025-11-27 19:51 ` Guinevere Larsen
2025-11-27 20:00 ` Maciej W. Rozycki
2025-11-27 20:09 ` Guinevere Larsen
2025-11-28 9:20 ` Maciej W. Rozycki
2025-12-01 16:49 ` Guinevere Larsen
2025-11-07 7:46 ` Eli Zaretskii
2025-11-07 13:41 ` Guinevere Larsen
2025-11-07 14:23 ` Eli Zaretskii
2025-11-08 2:25 ` Maciej W. Rozycki
2025-11-27 20:01 ` Guinevere Larsen
2025-11-28 9:20 ` Maciej W. Rozycki
2025-11-06 19:45 ` [PATCH 2/2] gdb: add warning when no native target is available Guinevere Larsen
2025-11-07 7:48 ` Eli Zaretskii
2025-11-07 13:24 ` Guinevere Larsen
2025-11-07 14:21 ` Eli Zaretskii
2025-11-27 20:15 ` Guinevere Larsen [this message]
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=1e9baea6-7d12-4ca8-a094-d4bdef64727c@redhat.com \
--to=guinevere@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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