[binutils-gdb] List actual code around more than one location
sergiodj+buildbot@sergiodj.net
sergiodj+buildbot@sergiodj.net
Tue Aug 22 15:59:00 GMT 2017
*** 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.
More information about the Gdb-testers
mailing list