search for: findstoppoint

Displaying 14 results from an estimated 14 matches for "findstoppoint".

2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Dear LLVMers, I'm updating some code to use the new LLVM 2.7 API. One piece of this code uses the findStopPoint() function to find the source filename and line number information of an instruction. What is the best way to do this under LLVM 2.7 now that the stop point intrinsic has been removed? It appears that the debug information is attached as metadata, but what is the easiest way to extract the fi...
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 05:00 PM, John Criswell wrote: > Dear LLVMers, > > I'm updating some code to use the new LLVM 2.7 API. One piece of this > code uses the findStopPoint() function to find the source filename and > line number information of an instruction. > > What is the best way to do this under LLVM 2.7 now that the stop point > intrinsic has been removed? It appears that the debug information is > attached as metadata, but what is the easie...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Török Edwin wrote: > On 03/16/2010 05:00 PM, John Criswell wrote: > >> Dear LLVMers, >> >> I'm updating some code to use the new LLVM 2.7 API. One piece of this >> code uses the findStopPoint() function to find the source filename and >> line number information of an instruction. >> >> What is the best way to do this under LLVM 2.7 now that the stop point >> intrinsic has been removed? It appears that the debug information is >> attached as metadata, bu...
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 05:21 PM, John Criswell wrote: > Török Edwin wrote: >> On 03/16/2010 05:00 PM, John Criswell wrote: >> >>> Dear LLVMers, >>> >>> I'm updating some code to use the new LLVM 2.7 API. One piece of >>> this code uses the findStopPoint() function to find the source >>> filename and line number information of an instruction. >>> >>> What is the best way to do this under LLVM 2.7 now that the stop >>> point intrinsic has been removed? It appears that the debug >>> information is attache...
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)) { >>>
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) {
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
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
2009 Jul 09
5
[LLVMdev] Source file information.
..., what you want to do is find the appropriate debug stop point intrinsic and then use it to look up the information for that instruction. Here is some sample code from SAFECode that finds the debug information associated with a CallInst (LLVM call instruction) held in the variable CI. It uses the findStopPoint() function in llvm/Analyis/DebugInfo.h: // // Get the line number and source file information for the call. // const DbgStopPointInst * StopPt = findStopPoint (CI); Value * LineNumber; Value * SourceFile; if (StopPt) { LineNumber = StopPt->getLineValue(); SourceFile = Stop...
2009 Jul 09
0
[LLVMdev] Source file information.
..., what you want to do is find the appropriate debug stop point intrinsic and then use it to look up the information for that instruction. Here is some sample code from SAFECode that finds the debug information associated with a CallInst (LLVM call instruction) held in the variable CI. It uses the findStopPoint() function in llvm/Analyis/DebugInfo.h: // // Get the line number and source file information for the call. // const DbgStopPointInst * StopPt = findStopPoint (CI); Value * LineNumber; Value * SourceFile; if (StopPt) { LineNumber = StopPt->getLineValue SourceFile = StopPt-...
2009 Jul 09
0
[LLVMdev] Source file information.
On 2009-07-09 11:17, Aaron Gray wrote: >>> -----Original Message----- >>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] >>> >> On >> >>> Behalf Of Saman Aliari Zonouz >>> Sent: Thursday, July 09, 2009 11:44 AM >>> To: llvmdev at cs.uiuc.edu >>> Subject: [LLVMdev] Source file
2009 Jul 09
3
[LLVMdev] Source file information.
>> -----Original Message----- >> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On >> Behalf Of Saman Aliari Zonouz >> Sent: Thursday, July 09, 2009 11:44 AM >> To: llvmdev at cs.uiuc.edu >> Subject: [LLVMdev] Source file information. >> >> Hi, >> >> I am new to LLVM, and need to find the line number
2009 Jul 09
3
[LLVMdev] Source file information.
...the appropriate debug stop > point intrinsic and then use it to look up the information for that > instruction. > > Here is some sample code from SAFECode that finds the debug information > associated with a CallInst (LLVM call instruction) held in the variable > CI. It uses the findStopPoint() function in llvm/Analyis/DebugInfo.h: > > // > // Get the line number and source file information for the call. > // > const DbgStopPointInst * StopPt = findStopPoint (CI); > Value * LineNumber; > Value * SourceFile; > if (StopPt) { > LineNumber = Stop...
2009 Jul 09
1
[LLVMdev] Source file information.
Thanks for your reply. Is it not possible to do with llvm-g++ -g? Yes and furthermore, where are SDNode and DebugLoc fields stored? They are probably classes in the Clang API are they in a file which I have to parse myself? if so, is there any way that I use a library to get the file/line information for each instruction? Yes Clang API :- http://clang.llvm.org/doxygen/classes.html