search for: dbgkind

Displaying 8 results from an estimated 8 matches for "dbgkind".

2010 Mar 16
4
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Török Edwin wrote: > [snip] > > Ah, the method got moved to the instruction itself! > > dbgKind = Context->getMDKindID("dbg"); > if (MDNode *Dbg = I->getMetadata(dbgKind)) { > ... > Thanks! This appears to work. I also have code that looks up debug information for GlobalVariables and regular LLVM Value *'s. For the former, I think I can look up their debu...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Török Edwin wrote: > [snip] >>> Something like this (you can of course cache TheMetadata and MDDbgKind) >>> >>> llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); >>> MDDbgKind = TheMetadata->getMDKind("dbg"); >>> if (MDDbgKind) { >>> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >>> DILocatio...
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 05:30 PM, John Criswell wrote: > Török Edwin wrote: >> [snip] >>>> Something like this (you can of course cache TheMetadata and MDDbgKind) >>>> >>>> llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); >>>> MDDbgKind = TheMetadata->getMDKind("dbg"); >>>> if (MDDbgKind) { >>>> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >>&g...
2009 Nov 05
0
[LLVMdev] Debug Information for LLVM 2.6 and TOT
..., + Instruction *TheCall) { assert(NameSuffix && "NameSuffix cannot be null!"); #ifndef NDEBUG @@ -411,8 +434,22 @@ } // Otherwise, remap the rest of the instructions normally. - for (; I != NewBB->end(); ++I) + unsigned DbgKind = 0; + MDNode *TheCallMD = NULL; + SmallVector<Value *, 4> MDVs; + LLVMContext &Context = OldFunc->getContext(); + if (TheCall && TheCall->hasMetadata()) { + DbgKind = Context.getMetadata().getMDKind("dbg"); + TheCallMD = Context.getMetadata()...
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 06:52 PM, John Criswell wrote: > Török Edwin wrote: >> [snip] >> >> Ah, the method got moved to the instruction itself! >> >> dbgKind = Context->getMDKindID("dbg"); >> if (MDNode *Dbg = I->getMetadata(dbgKind)) { >> ... >> > > Thanks! This appears to work. Ok. > > I also have code that looks up debug information for GlobalVariables and > regular LLVM Value *'s. For the...
2014 Jan 23
2
[LLVMdev] How to read v3.3 dbg metadata using v3.4 LLVM
...However, llvm-dis v3.4 seemed to have problems grabbing the dbg info [3]. Any idea how I can modify the code [0] to solve the problem? Attached is the bitcode file used as an example in this mail. It was complied with clang v3.3 -g -O0. Thanks, James [0] llvm::LLVMContext llvmContext; unsigned dbgKind = llvmContext.getMDKindID("dbg"); if (MDNode *N = instruction.getMetadata(dbgKind)){ DILocation location(N); fileDirectoryName = location.getDirectory(); fileName = location.getFilename(); lineNumber = location.getLineNumber(); columnNumber = location.getColumnNu...
2009 Nov 05
2
[LLVMdev] Debug Information for LLVM 2.6 and TOT
Devang Patel wrote: > Hi John, > > On Wed, Nov 4, 2009 at 12:04 PM, John Criswell <criswell at uiuc.edu> wrote: > >> Dear All, >> >> 1) I recall reading somewhere that a few optimizations in LLVM 2.6 strip >> away debug information when such information interferes with >> optimization. Is this correct, >> > > Yes. > >
2014 Jan 24
2
[LLVMdev] How to read v3.3 dbg metadata using v3.4 LLVM
...odify the code [0] to solve the problem? Attached is >> the bitcode file used as an example in this mail. It was complied with >> clang v3.3 -g -O0. >> >> Thanks, >> James >> >> [0] >> >> llvm::LLVMContext llvmContext; >> >> unsigned dbgKind = llvmContext.getMDKindID("dbg"); >> >> if (MDNode *N = instruction.getMetadata(dbgKind)){ >> >> DILocation location(N); >> >> fileDirectoryName = location.getDirectory(); >> >> fileName = location.getFilename(); >> >&gt...