Re: [PATCH 2/2] gdb: add warning when no native target is available

Guinevere Larsen
2025-11-07T13:25:11Z

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.

--
Cheers,
Guinevere Larsen
It/she