vadimcn / codelldb

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

VSCODE cross platform debuging (x64 in local and aarch64 in remote) #989

Closed dionysus1016 closed 9 months ago

dionysus1016 commented 9 months ago

OS: ubuntu 18.04 VSCode version: 1.80.2 CodeLLDB version: v1.10.0 Compiler: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Debuggee: aarch64, C++ binary

VSCODE runs in x64 environment, and the remote host is aarch64 environment. Breakpoints works very well, however, after the program hit breakpoints, I can't step into/step over, and the callstack showed in vscode is also wrong.

My launch settings: { "name": "Attach to lldb-server", "type": "lldb", "request": "custom", "targetCreateCommands": [ "target create ${workspaceFolder}/aarch64/mytest" ], "processCreateCommands": [ "gdb-remote 10.0.20.101:65001", "target stop-hook add -n _start -o continue", "breakpoint set --name main" ], "breakpointMode":"file", "sourceMap": { "/proc/self/cwd/external":"/workspaces/external", }, },

Is this multiarch debugging supported in VSCODE? like gdb-multiarch?

BTW, I did the same test in two machine with same arch (both x64), which is pretty good. Not sure whether I miss some settings for cross-platform debugging.

If I switch to assemble view, I can "step over" the assemble code line, but still can't step over the function ( seems looping forever in the function)

dionysus1016 commented 9 months ago

This issue is gone today, not sure what happened yesterday.... Maybe this issue only happens when I use VSCODE to open a remote ssh session and use dev container in remote..