search for: compileunit

Displaying 20 results from an estimated 115 matches for "compileunit".

Did you mean: compile_unit
2013 Sep 30
1
[LLVMdev] [patch] Prototype/proof-of-concept for DWARF type units
...mdat groups) I figured I'd throw it out there to have a bit of a chat about it. I've tested simple cases of a single type and they seem to work OK. Multiple types from the same translation unit won't work at the moment due to the MC issue. The practical details are fairly simple. When CompileUnit goes to create a type, first it hands it off to DwarfDebug to decide whether it's going to be in a type unit. If it is, DwarfDebug spins up a new CompileUnit that's really a type unit, emits the type into that unit (creating all dependent types and other paraphernalia), attaches the signatu...
2012 Oct 04
2
[LLVMdev] question
Here is the code. I am running on llvm 3.1 on Lion (Mac 10.7.4) *string getFileDirectory*(*const* Instruction &I){ MDNode *MD = I.getMetadata("dbg"); DICompileUnit compileUnit(MD); return compileUnit.getDirectory().str(); } George On Wed, Oct 3, 2012 at 12:40 PM, Eric Christopher <echristo at gmail.com>wrote: > Without knowing the code that you've written and the IR that you're > running on I'm > not sure what I can do to help...
2012 Oct 04
2
[LLVMdev] question
That's because instructions have a location associated with them, not a compile unit. -eric On Thu, Oct 4, 2012 at 12:46 PM, George Baah <georgebaah at gmail.com> wrote: > I used DILocation instead of DICompileUnit and it works. Hmmm, interesting. > > George > > On Thu, Oct 4, 2012 at 1:33 AM, George Baah <georgebaah at gmail.com> wrote: >> >> Here is the code. I am running on llvm 3.1 on Lion (Mac 10.7.4) >> >> string getFileDirectory(const Instruction &I){ >&...
2012 Oct 04
0
[LLVMdev] question
I used DILocation instead of DICompileUnit and it works. Hmmm, interesting. George On Thu, Oct 4, 2012 at 1:33 AM, George Baah <georgebaah at gmail.com> wrote: > Here is the code. I am running on llvm 3.1 on Lion (Mac 10.7.4) > > *string getFileDirectory*(*const* Instruction &I){ > > MDNode *MD = I.getMetadata(...
2012 Oct 03
2
[LLVMdev] question
...orge On Tue, Oct 2, 2012 at 2:10 PM, Eric Christopher <echristo at gmail.com> wrote: > On Tue, Oct 2, 2012 at 11:00 AM, George Baah <georgebaah at gmail.com> wrote: > > Hi Guys, > > How does one get the directory of the compilation unit in llvm? > > I am using DICompileUnit but for some reason I am getting blanks > > for the directory name. Here is my code ... > > > > MDNode *MD = I.getMetadata("dbg"); > > > > DICompileUnit compileUnit(MD); > > > > return compileUnit.getDirectory().str(); > > > > In gener...
2012 Mar 04
1
[LLVMdev] Debug info compileunit metadata strangeness..
Hi, I have a question regarding the metadata for compileunit debug info. I find a few things in it a bit strange, but maybe there it is a reason for it to be that way that I just don't understand (but if that is the case I guess the documentation needs to be clearer). Consider this C program: "int X;" Compiled with "clang -g" it deb...
2012 Oct 05
0
[LLVMdev] question
...hristopher <echristo at gmail.com> wrote: > That's because instructions have a location associated with them, not > a compile unit. > > -eric > > On Thu, Oct 4, 2012 at 12:46 PM, George Baah <georgebaah at gmail.com> wrote: > > I used DILocation instead of DICompileUnit and it works. Hmmm, > interesting. > > > > George > > > > On Thu, Oct 4, 2012 at 1:33 AM, George Baah <georgebaah at gmail.com> > wrote: > >> > >> Here is the code. I am running on llvm 3.1 on Lion (Mac 10.7.4) > >> > >> string...
2012 Oct 02
2
[LLVMdev] question
Hi Guys, How does one get the directory of the compilation unit in llvm? I am using DICompileUnit but for some reason I am getting blanks for the directory name. Here is my code ... MDNode *MD = I.getMetadata("dbg"); DICompileUnit compileUnit(MD); *return* compileUnit.getDirectory().str(); Thanks George -------------- next part -------------- An HTML attachment was scrubbed......
2012 Oct 03
0
[LLVMdev] question
...2 at 2:10 PM, Eric Christopher <echristo at gmail.com> wrote: >> >> On Tue, Oct 2, 2012 at 11:00 AM, George Baah <georgebaah at gmail.com> wrote: >> > Hi Guys, >> > How does one get the directory of the compilation unit in llvm? >> > I am using DICompileUnit but for some reason I am getting blanks >> > for the directory name. Here is my code ... >> > >> > MDNode *MD = I.getMetadata("dbg"); >> > >> > DICompileUnit compileUnit(MD); >> > >> > return compileUnit.getDirectory().str();...
2012 Oct 05
1
[LLVMdev] question
You should probably think of the DIFooBar constructors like reinterpret-casts, not "go find the thing I actually want" functions. If you hand DICompileUnit() a node that is not a compile-unit metadata node, it's not going to tell you that you goofed. If you _did_ have a CU metadata node, then DICompileUnit's getDirectory() would work just fine. But you don't. --paulr ________________________________ From: llvmdev-bounces at cs.uiu...
2008 May 23
1
[LLVMdev] DebugInfoBuilder?
...horType() const; /// Set the reference to the module where we will insert debugging information. /// Also defines the debug info types for the module and creates the initial anchors. void SetModule(Module * m); /// Emit a compile unit descriptor. GlobalVariable * CreateCompileUnitDescriptor( unsigned langId, const sys::Path & srcPath, const std::string & producer); /// Emit a subprogram descriptor. GlobalVariable * CreateSubProgramDescriptor( GlobalVariable * compileUnit, /// Compile unit in which it is defined...
2011 Mar 28
3
[LLVMdev] Accessing metadata & creating DIVariable
...e a symbol twice!"' failed. I can't figure out what is wrong, there are no obvious duplicate entries. The original CU entry got replaced by the CU I created with DIBuilder. Not sure, if changing the CU is the cause of error. What is the right way to get a handle on the MDNode of the CompileUnit in a Module ? bye, Vyas
2012 Oct 02
0
[LLVMdev] question
On Tue, Oct 2, 2012 at 11:00 AM, George Baah <georgebaah at gmail.com> wrote: > Hi Guys, > How does one get the directory of the compilation unit in llvm? > I am using DICompileUnit but for some reason I am getting blanks > for the directory name. Here is my code ... > > MDNode *MD = I.getMetadata("dbg"); > > DICompileUnit compileUnit(MD); > > return compileUnit.getDirectory().str(); > In general for these questions it's easier to look at...
2013 Oct 11
2
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
...f the whole CU DIE. SecOffset is >>> the offset from the Debug Info section, so we can update it by adding the >>> CU size. >>> >>> // Offset from the beginning of debug info section. >>> unsigned SecOffset = 0; >>> for (SmallVectorImpl<CompileUnit *>::iterator I = CUs.begin(), >>> E = CUs.end(); I != E; ++I) { >>> (*I)->setDebugInfoOffset(SecOffset); >>> unsigned Offset = >>> sizeof(int32_t) + // Length of Compilation Unit Info >>> sizeof(int16_t) + // DWARF ver...
2009 Dec 02
0
[LLVMdev] A few more source level debugging questions
...m Devang, I was able to solve the > problem with the duplicate assembly symbols, although I still don't quite > understand why it was generating erroneous metadata in the first place. For > example, through trial and error I discovered that the problem disappeared > if I passed my DICompileUnit to CreateLocation() rather than my > DISubprogram, but I don't know why. The immediate lexical scope covering the location is the right answer. Is your DISubprogram describing correct function ? > The new API introduces a number of new parameters in DIFactory where I am > not sure wh...
2013 Oct 10
4
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
...IE. > We can think of EndOffset as the size of the whole CU DIE. SecOffset is > the offset from the Debug Info section, so we can update it by adding the > CU size. > > // Offset from the beginning of debug info section. > unsigned SecOffset = 0; > for (SmallVectorImpl<CompileUnit *>::iterator I = CUs.begin(), > E = CUs.end(); I != E; ++I) { > (*I)->setDebugInfoOffset(SecOffset); > unsigned Offset = > sizeof(int32_t) + // Length of Compilation Unit Info > sizeof(int16_t) + // DWARF version number > sizeof(int32_t) +...
2013 Oct 11
0
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
...EndOffset as the size of the whole CU DIE. SecOffset is >> the offset from the Debug Info section, so we can update it by adding the >> CU size. >> >> // Offset from the beginning of debug info section. >> unsigned SecOffset = 0; >> for (SmallVectorImpl<CompileUnit *>::iterator I = CUs.begin(), >> E = CUs.end(); I != E; ++I) { >> (*I)->setDebugInfoOffset(SecOffset); >> unsigned Offset = >> sizeof(int32_t) + // Length of Compilation Unit Info >> sizeof(int16_t) + // DWARF version number >>...
2009 Dec 02
3
[LLVMdev] A few more source level debugging questions
...info that I got from Devang, I was able to solve the problem with the duplicate assembly symbols, although I still don't quite understand why it was generating erroneous metadata in the first place. For example, through trial and error I discovered that the problem disappeared if I passed my DICompileUnit to CreateLocation() rather than my DISubprogram, but I don't know why. The new API introduces a number of new parameters in DIFactory where I am not sure what the correct value to pass is. CreateLocation() is one example - I don't know if the context should be the compile unit, or the subp...
2009 Sep 23
2
[LLVMdev] DebugFactory
.... Now all I need is for the methods of DIFactory to take a > Constant* instead of uint64. ok. Feel free to add /// CreateBasicType - Create a basic type like int, float, etc. DIBasicType CreateBasicType(DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, unsigned Encoding); variants that take Constant*, for example, /// CreateBasicTyp...
2013 Oct 15
2
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
...f the whole CU DIE. SecOffset is >>> the offset from the Debug Info section, so we can update it by adding the >>> CU size. >>> >>> // Offset from the beginning of debug info section. >>> unsigned SecOffset = 0; >>> for (SmallVectorImpl<CompileUnit *>::iterator I = CUs.begin(), >>> E = CUs.end(); I != E; ++I) { >>> (*I)->setDebugInfoOffset(SecOffset); >>> unsigned Offset = >>> sizeof(int32_t) + // Length of Compilation Unit Info >>> sizeof(int16_t) + // DWARF ver...