This is the mail archive of the gdb-testers@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]

[binutils-gdb] Don't print symbol declaration's line number in rbreak output


*** TEST RESULTS FOR COMMIT c7dcbf88c6557f35d9e75ae6223a3e61e1f70578 ***

Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: c7dcbf88c6557f35d9e75ae6223a3e61e1f70578

Don't print symbol declaration's line number in rbreak output

This commit:

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

adds the symbol declaration's line number to the output of certain GDB
commands.  It also (inadvertently) 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:

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

This old behavior is restored, fixing some FAILs in fullpath-expand.exp,
realname-expand.exp, and pr10179.exp.

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.

gdb/ChangeLog:

	* symtab.c (print_symbol_info): Skip printing filename and line
	number when `last' is NULL.
	(symtab_symbol_info): Use empty string instead of NULL for first
	invocation of print_symbol_info.
	(rbreak_command): Pass NULL to `last' parameter of
	print_symbol_info.


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