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] List actual code around more than one location


*** TEST RESULTS FOR COMMIT 0d999a6ef0f98b22430d70951408869864c979e0 ***

Author: Zhouyi Zhou <zhouzhouyi@gmail.com>
Branch: master
Commit: 0d999a6ef0f98b22430d70951408869864c979e0

List actual code around more than one location

With the following C++ code:
 int bar() { return 0;}
 int bar(int) { return 0; }

GDB behaves as:
 (gdb) list bar
  file: "overload.cc", line number: 1
  file: "overload.cc", line number: 2

It would be better for GDB to list the actual code around those two
locations, not just print the location.  Like:

 (gdb) list bar
 file: "overload.cc", line number: 1
 1       int bar() { return 0;}
 2       int bar(int) { return 0; }
 file: "overload.cc", line number: 2
 1       int bar() { return 0;}
 2       int bar(int) { return 0; }

That's what this this commit implements.

Tested on x86-64 GNU/Linux.

gdb/ChangeLog:
2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>

	* cli-cmds.c (list_commands): List actual code around more than
	one location.


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