[LLVMdev] llvm-dwarfdump and eh_frame

Benjamin Kramer benny.kra at gmail.com
Mon Feb 18 08:24:43 PST 2013


On 18.02.2013, at 17:16, 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?
> 
> Also, how can I do a partial match on the output of dwarfdump/FileCheck? For example:
> 	pc=00527a01...08598611
> .. is in the output, but the exact pc addresses do not matter when checking whether a line is in the output or not.

You can use FileCheck's regex support to match values of a specific format or leave out the check for the offending line. FileCheck will skip to the next match in that case.

- Ben



More information about the llvm-dev mailing list