This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't print symbol definition's line number in rbreak output


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]