Handling language trampoline

Dmitry Antipov dantipov@nvidia.com
Fri Dec 8 06:39:00 GMT 2017

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?


More information about the Gdb mailing list