Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tcf-dev] No registers setup in Frame setup from DWARF info

Hi,

I’m having problem generating a stack frame longer than one.

The problem I’m seeing is in stack_trace.c:trace_stack() where get_next_stack_frame() returns success,

but doesn’t set down.has_reg_data, which leads to only one frame being produced.

If I change the code so that stack crawler (crawl_stack_frame()) is always used to setup ‘down´, I get a full stack.

 

I’m not sure why this happens and have been debugging symbols.elf:get_stack_tracing_info() without

understanding why the number of registers (info->reg_cnt) is zero for the frame.

No exceptions are thrown during the call to get_stack_tracing_info().

 

It seems that the number of registers in the frame are copied from dwarf_stack_trace_regs_cnt,

but this is always zero for me, and when trying to identify where dwarf_stack_trace_regs_cnt could

be set to non-zero, I find the function dwarfframe.c:generate_command(), where calling

functions that can increase dwarf_stack_trace_regs_cnt is never called because reg->rule for

return address register is always zero.

 

    reg = get_reg(&frame_regs, rules.return_address_register);

    if (reg->rule != 0) {

 

Sorry about the imprecise description, but any pointers or suggestions are very welcome.

 

Thanks,

Claes

 

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


Back to the top