public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Guinevere Larsen <blarsen@redhat.com>
Cc: gdb-patches@sourceware.org, simark@simark.ca
Subject: Re: [PATCH v2] gdb: Change "list ." command's error when no debuginfo is available
Date: Wed, 17 Apr 2024 14:58:57 +0300	[thread overview]
Message-ID: <867cgwi4ji.fsf@gnu.org> (raw)
In-Reply-To: <20240416200058.1300296-2-blarsen@redhat.com> (message from Guinevere Larsen on Tue, 16 Apr 2024 17:00:59 -0300)

> From: Guinevere Larsen <blarsen@redhat.com>
> Cc: Simon Marchi <simark@simark.ca>
> Date: Tue, 16 Apr 2024 17:00:59 -0300
> 
> From: Simon Marchi <simark@simark.ca>
> 
> 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 .
>     No debug information available to print source lines at current PC (0x55555555511d).
> or
>     (gdb) list .
>     No debug information available to print 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.

How about this text instead:

  Insufficient debug info for showing source lines at current PC (0x55555555511d).

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -36,6 +36,12 @@ set unwindonsignal on|off
>  show unwindonsignal
>    These commands are now aliases for the new set/show unwind-on-signal.
>  
> +list .
> +  When using the command "list ." in a location that has no debug information
> +  or no file loaded, GDB now says that there is no debug information to print
> +  lines.  This makes it more obvious that there is no information, as opposed
> +  to implying there is no inferior loaded.

This part is okay.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

  reply	other threads:[~2024-04-17 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 20:00 Guinevere Larsen
2024-04-17 11:58 ` Eli Zaretskii [this message]
2024-04-17 19:20   ` Guinevere Larsen
2024-04-17 19:26     ` Eli Zaretskii
2024-04-17 19:57       ` Guinevere Larsen
2024-04-18  5:10         ` Eli Zaretskii

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=867cgwi4ji.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=blarsen@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).