Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lldb has an error parsing dwarf information #121569

Open
IOVOVHS opened this issue Jan 3, 2025 · 1 comment
Open

lldb has an error parsing dwarf information #121569

IOVOVHS opened this issue Jan 3, 2025 · 1 comment
Labels

Comments

@IOVOVHS
Copy link

IOVOVHS commented Jan 3, 2025

(lldb) target create "./test_case"
Current executable set to '/Users/lain/codeFiles/gitClone/test_cases/1735837458_IuQuWMTj/test_case' (arm64).
(lldb) b main
Breakpoint 1: where = test_case`main at test_case.cpp:65:1, address = 0x0000000100003fc0
(lldb) r
Process 3460 launched: '/Users/lain/codeFiles/gitClone/test_cases/1735837458_IuQuWMTj/test_case' (arm64)
Process 3460 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100003fc0 test_case`main at test_case.cpp:65:1
   62  	        // Declare a variable 'unsigned int var456' and initialize it with variables 'var453, var448'.
   63  	        unsigned int var456 = var453 + static_cast<unsigned int>(var448.member_1);
   64  	    }
-> 65  	}
error: test_case 0x0000000000000298: DW_TAG_variable (DW_TAG_variable) has an invalid location: DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_piece 0x58
error: test_case 0x000000000000022a: DW_TAG_variable (DW_TAG_variable) has an invalid location: DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_piece 0x58
(lldb) fr v
(Container_2) var448 = <no location, value may have been optimized out>

(Container_2) var449 = <no location, value may have been optimized out>

(Container_2) var450 = <failed to read memory DW_OP_piece(8) from host address 0x6000038e0f30>

/opt/homebrew/bin/g++-14 test_case.cpp -O3 -o test_case -g
Target: arm64-apple-darwin24.1.0
lldb version 19.1.6
g++-14 (Homebrew GCC 14.2.0_1) 14.2.0

I also got this error when using lldb-19 with gcc-9.2 on Ubuntu. gdb shows "optimized out" for var450.

test_case.zip

@llvmbot
Copy link
Member

llvmbot commented Jan 3, 2025

@llvm/issue-subscribers-lldb

Author: None (IOVOVHS)

``` c (lldb) target create "./test_case" Current executable set to '/Users/lain/codeFiles/gitClone/test_cases/1735837458_IuQuWMTj/test_case' (arm64). (lldb) b main Breakpoint 1: where = test_case`main at test_case.cpp:65:1, address = 0x0000000100003fc0 (lldb) r Process 3460 launched: '/Users/lain/codeFiles/gitClone/test_cases/1735837458_IuQuWMTj/test_case' (arm64) Process 3460 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x0000000100003fc0 test_case`main at test_case.cpp:65:1 62 // Declare a variable 'unsigned int var456' and initialize it with variables 'var453, var448'. 63 unsigned int var456 = var453 + static_cast<unsigned int>(var448.member_1); 64 } -> 65 } error: test_case 0x0000000000000298: DW_TAG_variable (DW_TAG_variable) has an invalid location: DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_piece 0x58 error: test_case 0x000000000000022a: DW_TAG_variable (DW_TAG_variable) has an invalid location: DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_implicit_value 0x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, DW_OP_piece 0x8, DW_OP_piece 0x58 (lldb) fr v (Container_2) var448 = <no location, value may have been optimized out>

(Container_2) var449 = <no location, value may have been optimized out>

(Container_2) var450 = <failed to read memory DW_OP_piece(8) from host address 0x6000038e0f30>


/opt/homebrew/bin/g++-14 test_case.cpp -O3 -o test_case -g
Target: arm64-apple-darwin24.1.0
lldb version 19.1.6
g++-14 (Homebrew GCC 14.2.0_1) 14.2.0

I also got this error when using lldb-19 with gcc-9.2 on Ubuntu. gdb shows "optimized out" for var450.

[test_case.zip](https://github.com/user-attachments/files/18300105/test_case.zip)

</details>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants