This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] List actual code around more than one location
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 22 Aug 2017 11:44:02 -0400
- Subject: [binutils-gdb] List actual code around more than one location
- Authentication-results: sourceware.org; auth=none
*** 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.