similar to: Line number without -Debug ?

Displaying 20 results from an estimated 3000 matches similar to: "Line number without -Debug ?"

2015 Dec 15
4
Line number without -Debug ?
Hi Eric and thanks for your answer, What I mean is that I want to find the number of line on the IR code of a specific instruction. I found out that I can use: DebugLoc Loc = CurrentInstruction->getDebugLoc(); unsigned Line = Loc.getLine(); But this works only if DEBUGFLAG is True. I'd like to be able to get the Line number without being on a 'Debug' mode. Is
2015 Oct 16
2
Break nested instructions?
On 16/10/15 12:59, David Chisnall wrote: > On 16 Oct 2015, at 10:44, Irini Stavrakantonaki via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Following call instruction contains a GEP instruction as its first operand > No it doesn’t. It contains a GEP constant expression. This is a bit confusing at first, especially when working with IRBuilder, which can sometimes give you
2015 Oct 16
3
Break nested instructions?
Is there any pass that breaks an expression out of an instruction's operand into its own instruction, so that such nested instructions become explicit and are thus easier to work with in? e.g Following|call|instruction contains a|GEP|instruction as its first operand. Is there any pass which allows me to break up this: | %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4
2015 Oct 16
2
Break nested instructions?
On 16/10/15 14:09, mats petersson wrote: > I think it's important to understand that this is not ALWAYS the case. > The operands can be either a constant expression or an instruction. > > For example: > > char *a; > int x; > > if(cond) a = "%d"; > else a = "%x"; > printf(a, x); > > In this case, the compiler
2015 Oct 16
2
Break nested instructions?
On 16/10/15 14:33, mats petersson wrote: > Interesting point, I'm not sure - but the operand on an "instruction" > is a Value, so I expect it can be any type that is within the Value > class hierarchy? I expected the same. That's why I was searching a way to "break" the inlined instructions, as nested instructions are not convenient for me. In case the
2015 May 13
2
[LLVMdev] Modifying debug information through llvm pass
Hi All, I want to change debug information of an llvm instruction so that the modified debug info is subsequently passed to executable binary. So if I use "addr2line" utility on the binary, it will return my modified debug information. I've tried to change by using the following code snippet: MDNode *N = Inst->getMetadata("dbg"); DebugLoc Loc =
2016 May 23
1
Andersens analysis ?
Hi all, I was trying to find the equivalent analysis of Andersens on LLVM. I found it only on LLVM 2.6 on 'Analysis/IPA' folder. Is it removed/renamed on later versions? I'm mostly interested in 3.4 version or later. Thank you in advance, -- Irini -------------- next part -------------- An HTML attachment was scrubbed... URL:
2020 Jul 08
2
Extracting the !dbg property from LLVM IR function calls
Hello, I am compiling a program with debugging information, and am attempting to extract !dbg numbers from function calls in LLVM IR. However, I've found a few inconsistencies. For example, this call exists in my module: %1 = tail call i1 @llvm.type.test(i8* bitcast (i32 (i32)* @_Z5otheri to i8*), metadata !"_ZTSFiiE") #5, *!dbg !69*, !nosanitize !2 I would like to extract the 69
2011 Oct 17
2
[LLVMdev] Variable name from metadata
Hi All,   Can we extract name of variable name from "MDNode" ?   1. Neither temp_MDNode->getName() nor temp_MDNode->getValueName() give me "global_int" which is name of a variable.   2. I tried below ways as well. DIVariable DV(mdnode1); Value *v = mdnode1->getOperand(0);//gives add 0x69   3. I have written below code to reach till variable name.        LLVMIname is
2016 Aug 17
2
CodeView and "line 0" ?
I mean, we just skip over instructions without a DebugLoc: void CodeViewDebug::beginInstruction(const MachineInstr *MI) { DebugHandlerBase::beginInstruction(MI); // Ignore DBG_VALUE locations and function prologue. if (!Asm || !CurFn || MI->isDebugValue() || MI->getFlag(MachineInstr::FrameSetup)) return; DebugLoc DL = MI->getDebugLoc(); if (DL == PrevInstLoc || !DL)
2015 Apr 23
2
[LLVMdev] Get precise line/column debug info from LLVM IR
I am trying to locate instructions in an LLVM Pass by line and column number (reported by an third-party tool) to instrument them. To achieve this, I am compiling my source files with `clang -g -O0 -emit-llvm` and looking for the information in the metadata using this code: const DebugLoc &location = instruction->getDebugLoc(); // location.getLine() // location.getCol()
2018 May 29
2
LLVM IR source line error
Hi I am using LLVM to help me do some code analysis. I wrote a LLVM Function Pass to help me to generate some information. I use the code below to get the source line information for every instruction. for (BasicBlock &BB : F){ for(Instruction &I: BB){ DILocation* Loc = I.getDebugLoc().get(); unsigned Line = Loc->getLine() } } I think the function's first
2009 Dec 21
0
[LLVMdev] [PATCH] Implement dbgs()
On 2009-12-21 18:06, David Greene wrote: > On Saturday 19 December 2009 00:16, Chris Lattner wrote: > > >>> Or I think I can just assume (Yikes!) that if the signal handler is >>> invoked it will really be a circular_raw_ostream since the handler >>> should (!) only be set up in debug mode. >>> >>> That scares me a bit, though. >>>
2009 Nov 18
1
getting the name of a single object in R for debugging output
I often use a debug flag (set to TRUE) to turn on various debugging print statements in my R scripts.  I was thinking I should create a function debugPrint(object,debugFlag), to print out the object name and contents if the debugFlag is set to TRUE.  Then I wouldn't have to make my script ugly(..er) than it already is by adding IF statements all over the place.  I've seen how ls() dumps
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
On Saturday 19 December 2009 00:16, Chris Lattner wrote: > > Or I think I can just assume (Yikes!) that if the signal handler is > > invoked it will really be a circular_raw_ostream since the handler > > should (!) only be set up in debug mode. > > > > That scares me a bit, though. > > Why don't you just check #ifndef NDEBUG like the code that sets it up?
2017 Jun 20
2
CloneFunctionInto produces invalid debug info
I was just going to say: With well-formed debug info it should create a deep copy up until the DISubprogram, but no further. But because the DISubprogram linked to the Function is missing the special handling of the DISubprogram (that would prohibit cloning the DICompileUnit is side-stepped). But then I remembered the discussion we had in
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
On Monday 21 December 2009 10:14, Török Edwin wrote: > On 2009-12-21 18:06, David Greene wrote: > > On Saturday 19 December 2009 00:16, Chris Lattner wrote: > >>> Or I think I can just assume (Yikes!) that if the signal handler is > >>> invoked it will really be a circular_raw_ostream since the handler > >>> should (!) only be set up in debug mode. >
2009 Jan 20
2
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
Chris Lattner wrote: > On Jan 19, 2009, at 7:55 AM, Andrew Haley wrote: > >> This is x86_64. I have a problem where an absolute memory load >> The current LLVM trunk does not have this bug. This seems quite a >> nasty >> bug; is there any chance of a bug-fix release for LLVM 2.4, or >> should I >> just use LLVM trunk until LLVM 2.5 ? > > As
2003 Jul 03
1
Use of PKG_FFLAGS on Windows
Dear all, After reading the manuals (especially R-exts) I haven't found an answer to the following question yet. I was compiling someone else's Fortran routines to make them available with R. Hear, I should not that I don't know anything about Fortran, and I only tried to built a shared library. Linux being my platform of choice when developing for R, I first got everything done
2014 Jan 24
2
[LLVMdev] How to read v3.3 dbg metadata using v3.4 LLVM
Thanks Eric, but could you give me a little bit more hints or pointers please? I looked into DebugInfo.h, but I'm still not sure how to start. It sounds like I'd have to somehow manually extract metadata nodes from an instruction. Thanks, JS On Wed, Jan 22, 2014 at 10:14 PM, Eric Christopher <echristo at gmail.com>wrote: > This is likely going to be difficult if possible. I