[LLVMdev] DWARF not being generated for local variable, though MD looks right(?)
Matt Pharr
matt.pharr at gmail.com
Sun May 1 15:42:16 PDT 2011
On Apr 30, 2011, at 10:00 AM, llvmdev-request at cs.uiuc.edu wrote:
> I'm running into a problem with generating debugging information that I'm not sure how to debug; I'd be happy to have some suggestions about where to start digging in.
>
> In short, I believe that I'm correctly generating debug info (with DIBuilder, which has so far been quite nice!), and a scan of the meta-data in the IR looks generally right. However, if I run dwarfdump on my object file, I'm not seeing any DIE information for the local variables. I'm wondering what might be going wrong along the way.
[...]
To follow up after some debugging and more digging, it turns out that I hadn't created a DILexicalBlock for my function and then the variables were getting silently dropped; I had assumed that the DISubprogram would be enough and that the DILexicalBlock was only necessary for inner scopes. With that, it all works swimmingly so far.
Thanks,
-matt
More information about the llvm-dev
mailing list