This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Handling language trampoline


On 12/07/2017 05:58 PM, Pedro Alves wrote:

I don't offhand see how can GDB know which is the right
language for the current PC the program just stopped at, and
if the program stopped inside a trampoline.  That's part of
each language's skip_trampoline's job, so seems reasonable
that GDB has to try them all.

I'm not an expert in this area too, but, in theory, what's the
problem if we have (presumably valid) DWARF info? Looking through
DWARF4 specs, each CU should have DW_AT_low_pc and DW_AT_high_pc;
so, if CU->DW_AT_low_pc <= current PC <= CU->DW_AT_high_pc, then
CU->DW_AT_language is the language in question, isn't it?

Dmitry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]