[LLVMdev] More DWARF problems

Devang Patel dpatel at apple.com
Mon Apr 4 13:11:05 PDT 2011


You're developing your own language and tool sets, it brings fresh perspective in our predominately C orientated environment, which is good.

On Apr 1, 2011, at 8:12 PM, Talin wrote:

> Is this a limitation of DWARF or of the LLVM generator?

Neither, IMO. My own reading of DWARF did not find clear wording on this subject. I am not even sure if it is just a darwin gdb implementation decision or not.  

> I ask because it seems somewhat C++-centric - many languages (mine included) don't have separate definitions and declarations for functions.
> I'd say that if this is required, then there should be a note in the debugging doc about it - or better yet, a helper method in DIBuilder that automatically creates both the definition and the declaration.

Right now, DIBuilder's view is based on clang's needs. However, it is OK if you want to add new helper method in DIBuilder for your needs. All you need to do is create two MDNodes, one for definition one for declaration, with appropriate contexts.


More information about the llvm-dev mailing list