binutils-gdb/gdb/cli
Zhouyi Zhou 0d999a6ef0 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.
2017-08-22 15:32:19 +01:00
..
cli-cmds.c List actual code around more than one location 2017-08-22 15:32:19 +01:00
cli-cmds.h
cli-decode.c
cli-decode.h
cli-dump.c Use gdb::unique_xmalloc_ptr when calling tilde_expand 2017-08-05 15:52:49 -06:00
cli-interp.c
cli-interp.h
cli-logging.c
cli-script.c Replace do_restore_instream_cleanup with scoped_restore 2017-08-03 07:59:06 -06:00
cli-script.h
cli-setshow.c
cli-setshow.h
cli-utils.c
cli-utils.h