search for: createsubprogram

Displaying 10 results from an estimated 10 matches for "createsubprogram".

2010 Sep 05
2
[LLVMdev] More DIFactory questions - still stumped
...ing problems like this is to start commenting out code until the problem goes away, but in this case I don't know where to even start. If I comment out *all* the DWARF-generating code, then obviously the problem goes away. :) I did in fact discover that if I comment out all calls to DIFactory::CreateSubprogram, the problem disappears - but then I don't have any debugging info. (Well, I still have all the DINodes for my data structures, just not functions.) I've also commented out all of the declarations of parameters and local variables, which doesn't prevent the problem from occurring. (Sinc...
2010 Sep 05
0
[LLVMdev] More DIFactory questions - still stumped
...ng a function type > descriptor contains only the bare types, not types wrapped in a formal > parameter DIE. Hi Talin, Like in CGDebugInfo, you have to use the Subprogram type only for the return type. What gives you the parameters is passing the Function* as the last parameter on DIFactory.CreateSubprogram(). I suppose DIFactory was done tailored to C-like languages using Clang as the primary driver for changes. I'd not be surprised if you could do things that it didn't expect and then it'd generate images with bad Dwarf (enough to cause segfault in dwarfdump). I'd try to mimic exac...
2010 Sep 06
2
[LLVMdev] More DIFactory questions - still stumped
...r contains only the bare types, not types wrapped in a formal > > parameter DIE. > > Hi Talin, > > Like in CGDebugInfo, you have to use the Subprogram type only for the > return type. What gives you the parameters is passing the Function* as > the last parameter on DIFactory.CreateSubprogram(). > I understand about passing the Function* as the last argument. I'm not sure I understand the first sentance ("You have to use the Subprogram type only for the return type"). Here's what my code for creating function descriptors currently looks like (note that some parts...
2010 Jul 14
3
[LLVMdev] DIFactory
.... The problem with that is that you can't do: DIDescriptor file = factory->CreateFile(...); You have to get the type of file to be DIFile. When creating a Subprogram, you can't pass a DIFile object, but only a DIDescriptor, so you have to: DIDescriptor* desc = &file; factory->CreateSubprogram(*desc, ...); Also, because they're not pointers, you can't use cast, as you would when passing arguments to IRBuilder. I understand that the objects are lightweight, thus the ability to pass them as objects, but some casting could be allowed, especially to DIDescriptor (copy ctor? new and...
2010 Sep 07
2
[LLVMdev] More DIFactory questions - still stumped
...out the code that pushes parameter types to the arg list. (Still push the return type however.) -- changed the call that creates the subroutine type to use DIFile rather than DICompileUnit as the context param. It still segfaults however. :( I should mention that I don't actually know if the CreateSubprogram call is even related to the problem. I know that when I comment out the call, the segfault goes away - however, that just might mean that the problem is still there but is not being triggered. I have to admit I am rather confused about the proper usage of DIFile and DICompileUnit. Both of these ar...
2010 Jul 14
0
[LLVMdev] DIFactory
On Wed, Jul 14, 2010 at 8:34 AM, Renato Golin <rengolin at systemcall.org> wrote: > Hi All, > > Is there any documentation on how to use DIFactory to generate basic debug info? Use Create* methods to create basic debug info. There is not any tutorial document explaining how to generated basic debug info. > > It seems similar enough to IRBuilder but working with objects
2010 Jul 14
0
[LLVMdev] DIFactory
...do: > > DIDescriptor file = factory->CreateFile(...); > > You have to get the type of file to be DIFile. > > When creating a Subprogram, you can't pass a DIFile object, but only a > DIDescriptor, so you have to: > > DIDescriptor* desc = &file; > factory->CreateSubprogram(*desc, ...); > > Also, because they're not pointers, you can't use cast, as you would > when passing arguments to IRBuilder. > > I understand that the objects are lightweight, thus the ability to > pass them as objects, but some casting could be allowed, especially to >...
2010 Sep 07
0
[LLVMdev] More DIFactory questions - still stumped
On 6 September 2010 01:05, Talin <viridia at gmail.com> wrote: > DISubprogram CodeGenerator::genDISubprogram(const FunctionDefn * fn, (...) >         false /* isDefinition */, (...) Hi Talin, The only difference from what I'm doing is that I only export debug symbols in definitions, not declarations. I may be doing wrong, though, for multi-file compilation (haven't tested
2010 Jul 14
2
[LLVMdev] DIFactory
Hi All, Is there any documentation on how to use DIFactory to generate basic debug info? It seems similar enough to IRBuilder but working with objects (rather than pointers) and that's raising some issues. Also, am I supposed to run the ModuleDebugInfoPrinterPass manually, or it gets printed automatically when I WriteBitcodeToFile? -- cheers, --renato http://systemcall.org/ Reclaim
2010 Sep 07
0
[LLVMdev] More DIFactory questions - still stumped
...parameter types to the arg list. (Still push the return type however.) > -- changed the call that creates the subroutine type to use DIFile rather than DICompileUnit as the context param. > > It still segfaults however. :( > > I should mention that I don't actually know if the CreateSubprogram call is even related to the problem. I know that when I comment out the call, the segfault goes away - however, that just might mean that the problem is still there but is not being triggered. > > I have to admit I am rather confused about the proper usage of DIFile and DICompileUnit. Both...