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 04/17/2018 01:28 PM, Andreas Arnez wrote:
> 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?
> 

Thanks.

>>
>> 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.

Ahah, thanks, it's much clearer now.

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

IMHO it's always better to also paste the output after, so the
reader doesn't have to imagine it from the description.

>  /* Helper function for symtab_symbol_info, this function uses
>     the data returned from search_symbols() to print information
> -   regarding the match to gdb_stdout.  */
> +   regarding the match to gdb_stdout.  If LAST is not NULL,
> +   print file- and line number information for the symbol as
> +   well.  Skip printing the filename if it matches LAST.  */

Nit, I don't think use of suspense hyphen in this case is common
in English: <http://grammartips.homestead.com/hyphens3.html>.
I'd just write plain "file".

The patch looks fine to me.  However, I notice now that this doesn't
tweak any existing testcase or add any new one.  Was the problem
caught by some existing testcase?

Thanks,
Pedro Alves


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