Re: [PATCH 2/2] Make "list ambiguous" show symbol names too

Keith Seitz
2017-09-06T18:43:03Z

On 09/04/2017 11:47 AM, Pedro Alves wrote:
>
> Fix that by storing a pointer to the symbol in the sal.

:-)

> gdb/ChangeLog:
> yyyy-mm-dd Pedro Alves <palves@redhat.com>
>
> * cli/cli-cmds.c (list_command): Use print_sal_location.
> (print_sal_location): New function.
> (ambiguous_line_spec): Use print_sal_location.
> * linespec.c (symbol_to_sal): Record the symbol in the sal.
> * symtab.c (find_function_start_sal): Likewise.
> * symtab.h (symtab_and_line::symbol): New field.
>
> gdb/testsuite/ChangeLog:
> yyyy-mm-dd Pedro Alves <palves@redhat.com>
>
> * gdb.base/list-ambiguous.exp (test_list_ambiguous_symbol): Expect
> symbol names in gdb's output.
> * gdb.cp/overload.exp ("list all overloads"): Likewise.

FWIW, I looked this over and didn't see any problems.

Keith