[LLVMdev] llvm-dwarfdump and eh_frame

Eli Bendersky eliben at google.com
Tue Feb 19 08:32:02 PST 2013


On Mon, Feb 18, 2013 at 8:16 AM, Erik Verbruggen <erikjv at me.com> wrote:
>
> On Feb 11, 2013, at 18:13, Eli Bendersky <eliben at google.com> wrote:
>
>> On Thu, Feb 7, 2013 at 2:50 PM, Erik Verbruggen <erikjv at me.com> wrote:
>>> Hi,
>>>
>>> I noticed that llvm-dwarfdump does not show any information about the eh_frame section. While DWARFContext::getDebugAranges explicitly tries to parse it, it fails because the DWARFContextInMemory constructor does not check for that specific section name. A fix would be to check wether the name is "debug_frame" or "eh_frame". If this is correct, should I submit a smallish patch, or could somebody else fix it, or can I just commit the change to svn?
>>>
>>
>> Please submit a patch to llvm-commits, with a test case that exercises the fix.
>>
>> Eli
>
> Before I submit the patch, I was wondering if it would be better to add a -eh-frame option to llvm-dwarfdump, like in the dwarfdump utility. Otherwise the eh_frame section would be treaded as a debug_frame section. What do you think?
>

llvm-dwarfdump currently doesn't support the .eh_frame section. It
only has initial support for the .debug_frame section (headers of CIEs
and FDEs are read and decoded, but not the instructions). I was
planning to add .eh_frame support at some point, so please let me know
if you also plan to work on this so we could coordinate.
In any case, .debug_frame is dumped with -debug-dump=frames, so
dumpung .eh_frame would probably make sense with -debug-dump=eh_frames
or something similar. It's more important to have the functionality in
lib/DebugInfo and llvm-dwarfdump; we can bikeshed the option name
later.

Eli




More information about the llvm-dev mailing list