Open IOVOVHS opened 2 months ago
@llvm/issue-subscribers-lldb
Author: None (IOVOVHS)
May I ask which specific version of LLDB will receive faster confirmation? Is the version of LLDB/LLVM I am using too old? Or did I not submit the report correctly?I may need to do test case reduction. This issue is about the debugger printing an incorrect value, which should actually print the initialization value of the variable instead of 0. Is this type of error acceptable? Or should I switch to another version for testing?Or rather, I should confirm if the compiler was unable to provide the correct debugging information.
Hi, this got buried didn't it, sorry about that.
I would first reduce the reproducer, perhaps creduce could help you. Otherwise by hand. As we're not gonna know which of those variables is at fault.
It would then be good to know if GDB is able to report correctly, because that either means clang is correct or if it isn't, GDB has some workaround we don't know about.
If the issue still reprodces with a build of lldb from the main
branch it may get fixed. Otherwise, the 18.x
branches and older are now closed to new changes.
llvm-dwarfdump
is a useful tool to inspect the dwarf, but as I said, try swapping compilers and debuggers first, see what happens.
Thank you for your reply. I will submit the reduced test cases in the future. If this is confirmed as a bug, I will also try to reduce this test case and use tools like llvm dwarfdump.
This program is generated by csmith. Using clang-15 to compile the program at the optimization level of O1, the breakpoint can be stopped at line 128.This line is used to update the variable g_400.
The program compiled with O0 printed the correct values.
It is worth noting that, GDB shows here that the variable l_55 has been optimized, but in reality, llvm-dwarfdump is used to print dwarf information, and the variable l_55 has a location attribute.
clang random_69.c -I $csmith_h -O1 -o random_69_1_clang.o -g -w
lldb version 15.0.7 clang version 15.0.7 GNU gdb (GDB) 13.2 test_case.zip