Re: RFC: fix PR 12707

Tom Tromey
2013-01-17T21:25:48Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Tom> Second, I had to change cmpd-minsyms.exp to account for the symtab.c
Tom> change, which in turn was required to align symbol_find_demangled_name
Tom> with what dwarf2read.c is doing.

Jan> Yes, this is a problem I faced when thinking about fixing this issue:

Jan> (gdb) b int GDB<char>::even_harder<int>(char)
Jan> Function "int GDB<char>::even_harder<int>(char)" not defined.
Jan> Make breakpoint pending on future shared library load? (y or [n])

Jan> I find "int GDB<char>::even_harder<int>(char)" to be a valid (or at
Jan> least also valid) demangled name for that function so I believe GDB
Jan> should know that name.

I agree in principle, but I think the current approach to doing this is
at least odd, and probably unintentional and incorrect.

Right now, minsyms have the return type in their demangled name, but
other symbols do not.

This means that the above could possibly work on an out-of-line
instance, but never on an inline instance. In a large program this
would mean missing some breakpoint locations.

Changing other symbols to include the return type also seems difficult.

The proposed change means that a breakpoint could still be set, just not
including the return type.

Tom