Displaying 12 results from an estimated 12 matches for "dw_op_reg0".
Did you mean:
dw_op_regn
2011 Jan 18
2
[LLVMdev] Dwarf info for byref register variables
...9;s location.
const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
unsigned Reg = RI->getDwarfRegNum(Location.getReg(), false);
DIEBlock *Block = new (DIEValueAllocator) DIEBlock();
if (Location.isReg()) {
if (Reg < 32)
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_reg0 + Reg);
else {
Reg = Reg - dwarf::DW_OP_reg0;
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_breg0 + Reg);
addUInt(Block, 0, dwarf::DW_FORM_udata, Reg);
}
} else {
if (Reg < 32)
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_breg0 + Reg);
els...
2018 Apr 27
2
[DbgInfo] Potential bug in location list address ranges
...AT_location : 0x0 (location list)
<40> DW_AT_name : (indirect string, offset: 0x9e): *bar*
<44> DW_AT_decl_file : 1
<45> DW_AT_decl_line : 34
<46> DW_AT_type : <0x153>
// *Its location list*
00000000 00008124 0000812a (DW_OP_reg0 (r0))
0000000b 0000812a 00008136 (DW_OP_reg4 (r4))
00000016 <End of list>
As you can see, it says that we can find *bar *in *r4* from *0x812a* to *0x8134
(poplt)*. However, this is only true when the *cmp *instruction at
*0x812e* yields
*less than (lt)*. So if the value in *r0 *is...
2018 Apr 27
0
[DbgInfo] Potential bug in location list address ranges
...list)
> <40> DW_AT_name : (indirect string, offset: 0x9e): bar
> <44> DW_AT_decl_file : 1
> <45> DW_AT_decl_line : 34
> <46> DW_AT_type : <0x153>
>
> // Its location list
> 00000000 00008124 0000812a (DW_OP_reg0 (r0))
> 0000000b 0000812a 00008136 (DW_OP_reg4 (r4))
> 00000016 <End of list>
>
> As you can see, it says that we can find bar in r4 from 0x812a to 0x8134 (poplt). However, this is only true when the cmp instruction at 0x812e yields less than (lt). So if the value in r0...
2018 Apr 27
2
[DbgInfo] Potential bug in location list address ranges
...DW_AT_location : 0x0 (location list)
<40> DW_AT_name : (indirect string, offset: 0x9e): bar
<44> DW_AT_decl_file : 1
<45> DW_AT_decl_line : 34
<46> DW_AT_type : <0x153>
// Its location list
00000000 00008124 0000812a (DW_OP_reg0 (r0))
0000000b 0000812a 00008136 (DW_OP_reg4 (r4))
00000016 <End of list>
As you can see, it says that we can find bar in r4 from 0x812a to 0x8134 (poplt). However, this is only true when the cmp instruction at 0x812e yields less than (lt). So if the value in r0 is greater than 1 (...
2020 Aug 25
3
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
...to the final DWARF representation. One potential downside is that using DW_OP_stack_value for a simple single-register DBG_VALUE (as in the example above) would currently lose information, as it would output the DWARF expression `DW_OP_breg0 RSP+0, DW_OP_stack_value` instead of the current output `DW_OP_reg0 RSP`. The former is larger and gives less information, as both expressions evaluate to the same value but only the latter gives a location for the variable that can be modified by a debugger. This can be fixed with some pattern matching in the DwarfExpression class to cover this specific (albeit co...
2018 May 07
2
[DbgInfo] Potential bug in location list address ranges
...*bar*
>>
>> <44> DW_AT_decl_file : 1
>>
>> <45> DW_AT_decl_line : 34
>>
>> <46> DW_AT_type : <0x153>
>>
>>
>>
>> // *Its location list*
>>
>> 00000000 00008124 0000812a (DW_OP_reg0 (r0))
>>
>> 0000000b 0000812a 00008136 (DW_OP_reg4 (r4))
>>
>> 00000016 <End of list>
>>
>>
>>
>> As you can see, it says that we can find *bar *in *r4* from *0x812a *to *0x8134
>> (poplt)*. However, this is only true when the *cm...
2018 Apr 27
0
[DbgInfo] Potential bug in location list address ranges
..._name : (indirect string, offset: 0x9e): *bar*
>
> <44> DW_AT_decl_file : 1
>
> <45> DW_AT_decl_line : 34
>
> <46> DW_AT_type : <0x153>
>
>
>
> // *Its location list*
>
> 00000000 00008124 0000812a (DW_OP_reg0 (r0))
>
> 0000000b 0000812a 00008136 (DW_OP_reg4 (r4))
>
> 00000016 <End of list>
>
>
>
> As you can see, it says that we can find *bar *in *r4* from *0x812a *to *0x8134
> (poplt)*. However, this is only true when the *cmp *instruction at
> *0x812e* yiel...
2020 Sep 16
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
...his wouldn't be particularly difficult to implement for simple arithmetic. Even with this improvement, the definition of DW_OP_stack_value explicitly forbids the expression from being a register location. If we instead used DW_OP_LLVM_direct, then we would be free to emit the register location (DW_OP_reg0 RAX).
// Compile with clang -O2 -g
int baz();
int bar2(int arg) {
return arg * 4;
}
int bar() {
return bar2(1);
}
int foo() {
int a = baz() + bar() - 4;
return a * 2;
}
; Eventually becomes the IR...
%call = call i32 @_Z3bazv(), !dbg !25
%call1 = call i32 @_Z3b...
2018 May 07
0
[DbgInfo] Potential bug in location list address ranges
...e : (indirect string, offset: 0x9e): bar
>
> <44> DW_AT_decl_file : 1
>
> <45> DW_AT_decl_line : 34
>
> <46> DW_AT_type : <0x153>
>
>
>
> // Its location list
>
> 00000000 00008124 0000812a (DW_OP_reg0 (r0))
>
> 0000000b 0000812a 00008136 (DW_OP_reg4 (r4))
>
> 00000016 <End of list>
>
>
>
> As you can see, it says that we can find bar in r4 from 0x812a to 0x8134 (poplt). However, this is only true when the cmp instruction at 0x812e yields less than (lt...
2020 Sep 15
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
Hi Adrian & Stephen,
One thought here:
But — not all memory locations are l-values. If we have a DWARF location list for variable "x" which points to a memory address for the first n instructions and the switches to a constant for the remainder of the scope, the memory address is not guaranteed to be an l-value, because writing the the memory address cannot affect the later part of
2020 Sep 02
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
...to the final DWARF representation. One potential downside is that using DW_OP_stack_value for a simple single-register DBG_VALUE (as in the example above) would currently lose information, as it would output the DWARF expression `DW_OP_breg0 RSP+0, DW_OP_stack_value` instead of the current output `DW_OP_reg0 RSP`. The former is larger and gives less information, as both expressions evaluate to the same value but only the latter gives a location for the variable that can be modified by a debugger. This can be fixed with some pattern matching in the DwarfExpression class to cover this specific (albeit co...
2012 Mar 20
0
[LLVMdev] Runtime linker issue wtih X11R6 on i386 with -O3 optimization
...2-.Ltmp51 # Loc expr size
.short .Lset10
.Ltmp51:
.byte 81 # DW_OP_reg1
.Ltmp52:
.long 0
.long 0
.Ldebug_loc4:
.long .Lfunc_begin2
.long .Ltmp43
.Lset11 = .Ltmp54-.Ltmp53 # Loc expr size
.short .Lset11
.Ltmp53:
.byte 80 # DW_OP_reg0
.Ltmp54:
.long 0
.long 0
.Ldebug_loc6:
.long .Lfunc_begin2
.long .Ltmp44
.Lset12 = .Ltmp56-.Ltmp55 # Loc expr size
.short .Lset12
.Ltmp55:
.byte 87 # DW_OP_reg7
.Ltmp56:
.long 0
.long 0
.Ldebug_loc8:
.long .Ltmp41
.long .Ltmp44
.Lset13 = .Ltmp58-.Ltmp57...