Open edumoot opened 7 months ago
@llvm/issue-subscribers-debuginfo
Author: Yachao Zhu (edumoot)
Could you please try 18 or main
branch?
These two results also can be reproduced by
opt -passes='function(sroa),ipsccp'
For result 1, we can get the following information through parsing further details:
0x000000be: DW_TAG_variable
DW_AT_location (indexed (0x1) loclist = 0x00000022:
[0x0000000000001184, 0x000000000000119f): DW_OP_consts +8888, DW_OP_stack_value)
DW_AT_name ("b")
DW_AT_decl_file ("/home/ad/Downloads/lldb/reproduce_bugs/case.c")
DW_AT_decl_line (19)
DW_AT_type (0x000000eb "int")
comparing with generated debug information from one of binaries by applying a different sequence of optimization passes
0x000000ae: DW_TAG_variable
DW_AT_location (indexed (0x4) loclist = 0x00000058:
[0x0000000000001174, 0x000000000000119c): DW_OP_consts +8888, DW_OP_stack_value
[0x000000000000119c, 0x000000000000119e): DW_OP_consts +1, DW_OP_stack_value)
We might infer that some location information is missing, due to this sequence of optimization passes.
LLVM 17.0.6 (commit, 6009fe18)
Reproduce with:
Result 1: variable b is optimized out (set a breakpoint on line 22 on case.c)
Result 2: a[4]=0 (set a breakpoint on line 8 on case.c)
cat case.c