Opened 4 years ago

Last modified 4 years ago

#12294 new enhancement

[Debugger] Implement DW_OP_gnu_entry_value support

Reported by: anevilyak Owned by: anevilyak
Priority: low Milestone: Unscheduled
Component: Applications/Debugger Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

For optimized release binaries with debug information, gcc4.x has started emitting expression opcode DW_OP_gnu_entry_value (0xf3). This one needs to be handled at some point in order to resolve values in such a circumstance. From the vague documentation located so far, it'd appear to also require more complete handling of DW_TAG_gnu_call_site, which we currently parse but otherwise ignore.

Change History (3)

comment:1 Changed 4 years ago by anevilyak

Type: bugenhancement

comment:2 Changed 4 years ago by simonsouth

To help anyone else searching for this issue:

The symptom is the debugger appearing to hang with "Retrieving stack trace for thread..." in the status bar after being attached to an affected team. If the debugger is started from the command line, the terminal window will fill with these messages repeated over and over:

DwarfExpressionEvaluator::EvaluateLocation(): failed to get register
DwarfExpressionEvaluator::_Evaluate(): unsupported opcode: 243
DwarfExpressionEvaluator::EvaluateLocation(): failed to get register
DwarfExpressionEvaluator::_Evaluate(): unsupported opcode: 243
DwarfExpressionEvaluator::EvaluateLocation(): failed to get register
DwarfExpressionEvaluator::_Evaluate(): unsupported opcode: 243
...

The only thing to do at this point is to exit the debugger.

Note gcc will emit this unsupported opcode even when the -Og ("optimize for debugging") setting is used. The workaround is to recompile with -O0 and continue debugging happily.

comment:3 Changed 4 years ago by anevilyak

For reference, -gstrict-dwarf should likewise disable these extensions regardless of optimization level.

Note: See TracTickets for help on using tickets.