[PATCH v5 0/2] Add warning if the native target is not supported

Guinevere Larsen
2026-03-10T14:25:03Z

Recently I was trying to conduct a new-user test, to figure out what
things were stumbling blocks, and one of the users had a macbook. The
user on their own would not have been able to understand what was the
reason that they couldn't execute the inferior to debug it.

This series aims to make it a little more obvious, by making the warning
about not being able to "run" more self-explanatory, and instructs the user
on how to get a list of supported architectures, to know what they'll be
able to remotely debug.

For v5, some tests were updated as Linaro CI correctly pointed out that
they were failing. The updates were just to expected output, no real
logic change was required.

v4 has minor cosmetic changes and a test for the help text changes.

For v3, the warning is now only emitted if the user tries to do
something that requires the native target, such as trying to run. And
the help text now emits a comma separated list instead of 1 item per
line.

For v2, instead of adding a new command, this series changes the help
command, to make it print all available options if a command only
accepts specific options.

Guinevere Larsen (2):
gdb: improve help text for set commands with limited options
gdb: Improve warning when no native target is available

gdb/cli/cli-decode.c | 12 ++++++++++++
gdb/inf-child.c | 7 ++++++-
gdb/target.c | 5 ++++-
.../gdb.base/auto-connect-native-target.exp | 6 ++++--
gdb/testsuite/gdb.base/help.exp | 9 +++++++++
gdb/testsuite/gdb.python/py-doc-reformat.exp | 2 +-
gdb/testsuite/gdb.python/py-parameter.exp | 17 +++++++++++++----
7 files changed, 49 insertions(+), 9 deletions(-)

base-commit: 1add703e09f0f8d073cde4af9d11cd59996e9763
--
2.53.0