binutils-gdb/gdb/cli
Guinevere Larsen e61c7092f7 gdb: Change "list ." command's error when no debuginfo is available
Currently, when a user tries to list the current location, there are 2
different error messages that can happen, either:

    (gdb) list .
    No symbol table is loaded.  Use the "file" command.
or
    (gdb) list .
    No debug information available to print source lines.

The difference here is if gdb can find any symtabs at all or not, which
is not something too important for end-users - and isn't informative at
all. This commit changes it so that the error always says that there
isn't debug information available, with these two variants:

    (gdb) list .
    Insufficient debug info for showing source lines at current PC (0x55555555511d).
or
    (gdb) list .
    Insufficient debug info for showing source lines at default location.

The difference now is if the inferior has started already, which is
controlled by the user and may be useful.

Unfortunately, it isn't as easy to differentiate if the symtab found for
other list parameters is correct, so other invocations, such as "list +"
still retain their original error message.

Co-Authored-By: Simon Marchi <simark@simark.ca>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
2024-05-08 14:08:16 -03:00
..
cli-cmds.c gdb: Change "list ." command's error when no debuginfo is available 2024-05-08 14:08:16 -03:00
cli-cmds.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
cli-decode.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-decode.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
cli-dump.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-interp.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-interp.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
cli-logging.c gdb: remove gdbcmd.h 2024-04-25 12:59:02 -04:00
cli-option.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-option.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
cli-script.c gdb: remove gdbcmd.h 2024-04-25 12:59:02 -04:00
cli-script.h gdb: move enum compile_i_scope_types to compile/compile.h 2024-04-22 21:34:19 -04:00
cli-setshow.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-setshow.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
cli-style.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-style.h gdb: move style_set_list/style_show_list declarations to cli/cli-style.h 2024-04-25 12:58:58 -04:00
cli-utils.c gdb, gdbserver, gdbsupport: remove includes of early headers 2024-03-26 21:13:22 -04:00
cli-utils.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00