vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.43k stars 237 forks source link

Could not hit breakpoint in c++ of dlopen library #950

Closed SplitGemini closed 1 year ago

SplitGemini commented 1 year ago

OS: Ubuntu 20.04 VSCode version: 1.79.2 CodeLLDB version: 1.9.2 Compiler: g++ Debuggee: x86_64-linux-gnu

I have checked this Breakpoints-are-not-getting-hit,

My debug path is all right (via debug_info show), but there is no the 'so' path of dlopen, I have not moved my program and source code.

And I can't set a breakpoint on dlopen's 'so' source code.

Verbose log
  
SplitGemini commented 1 year ago

Microsoft C/C++ works

SplitGemini commented 1 year ago

https://github.com/vadimcn/codelldb/issues/793 https://github.com/vadimcn/codelldb/issues/445

vadimcn commented 1 year ago

Does this work in CLI lldb? If not, this is a LLDB issue.
I'd try add-dsym command to load symbols manually.

SplitGemini commented 1 year ago

I solved it, 2 ways: