Re: [RFC] While processing a struct die, store the method's address in its fn_field

Doug Evans
2014-11-26T21:11:36Z

On Tue, Nov 25, 2014 at 11:31 PM, Siva Chandra <sivachandra@google.com> wrote:
> Phew...
>
> On Tue, Nov 25, 2014 at 7:22 PM, Doug Evans <dje@google.com> wrote:
>> fwiw, GDB is bad enough that I often can't trust just reading the code.
>> I often punt on that and actually single step through
>> the relevant code to REALLY see what is happening.
>
> I single stepped through the code and now see everything that you said here!
>
> I believed this in gdbtypes.h:
>
> 889 /* * If is_stub is clear, this is the mangled name which
> 890 we can look up to find the address of the method
> 891 (FIXME: it would be cleaner to have a pointer to the
> 892 struct symbol here instead).
> 893
> 894 If is_stub is set, this is the portion of the mangled
> 895 name which specifies the arguments. For example, "ii",
> 896 if there are two int arguments, or "" if there are no
> 897 arguments. See gdb_mangle_name for the conversion from
> 898 this format to the one used if is_stub is clear. */
> 899
> 900 const char *physname;
>
> Rest of what I thought I understood fell out from this belief! And the
> names look so enticing.
>
> Resetting my mind ...

Zoinks! Yeah, that comment needs some TLC.

[btw, the term "physname" is in a transition mode.
In some places it means "mangled name".
In other places it means "demangled name".
It's not clear to me what we want to transition to though.]