Re: Handling language trampoline

Dmitry Antipov <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.