public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.ibm.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't print symbol definition's line number in rbreak output
Date: Tue, 17 Apr 2018 12:28:00 -0000	[thread overview]
Message-ID: <m3k1t63tla.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <e527a164-3aae-8b83-7671-067c5a02eff7@redhat.com> (Pedro Alves's	message of "Mon, 16 Apr 2018 20:01:10 +0100")

On Mon, Apr 16 2018, Pedro Alves wrote:

> On 04/16/2018 07:44 PM, Andreas Arnez wrote:
>> This commit:
>> 
>>   b744723f57 -- Show line numbers in output for "info var/func/type"
>> 
>> added the symbol definition's line number to the output of certain GDB
>> commands.  It also changes the `rbreak' command's output, although it
>> shouldn't.  This is fixed.
>
> Could you update this to include an example of before/after gdb
> output in the commit log?

Sure.  How about the updated commit message below?

>
> Is this a regression in 8.1?

No, I just caused the regression myself on Friday with the commit above.
For some reason I had not noticed the impact on the `rbreak' command
before.

--
Andreas

-- >8 --
Subject: [PATCH] Don't print symbol definition's line number in rbreak output

This commit:

  b744723f57 -- Show line numbers in output for "info var/func/type"

added the symbol declaration's line number to the output of certain GDB
commands.  It also changes the `rbreak' command's output, like this:

  (gdb) rbreak foo
  Breakpoint 1 at 0x40049b: file rbreak.c, line 6.
  4:      static int foo1(void);
  Breakpoint 2 at 0x4004b1: file rbreak.c, line 12.
  10:     static int foo2(void);
  (gdb)

where the function declaration is now prefixed by its source line number,
followed by a colon.  But without showing the declaration's file name, the
line number is useless and can possibly cause severe confusion.

No declaration line number was shown before.  Instead, the function
declaration started at the first column.  This old behavior is restored.

In order to distinguish when to print location information, the meaning of
print_symbol_info()'s parameter `last' is changed.  Now NULL means to skip
any filename or line number information.  Previously NULL meant to always
print the filename.

  reply	other threads:[~2018-04-17 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 18:44 Andreas Arnez
2018-04-16 19:01 ` Pedro Alves
2018-04-17 12:28   ` Andreas Arnez [this message]
2018-04-17 15:18     ` Pedro Alves
2018-04-17 16:39       ` Andreas Arnez
2018-04-17 16:56         ` Pedro Alves
2018-04-17 17:33           ` Andreas Arnez

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=m3k1t63tla.fsf@oc1027705133.ibm.com \
    --to=arnez@linux.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /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).