cl: switch debug symbols with LLGO_DEBUG

This commit is contained in:
Li Jie
2024-09-21 21:09:16 +08:00
parent 88b980ac17
commit dad22b1686
11 changed files with 43 additions and 68 deletions

View File

@@ -3,15 +3,17 @@
### Build with debug info
```shell
llgo build -o cl/_testdata/debug/out -dbg ./cl/_testdata/debug
LLGO_DEBUG=1 llgo build -o cl/_testdata/debug/out ./cl/_testdata/debug
```
### Debug with lldb
```shell
lldb -O "command script import _lldb/llgo_plugin.py" ./cl/_testdata/debug/out
_lldb/runlldb.sh ./cl/_testdata/debug/out
```
or
```shell
/opt/homebrew/bin/lldb -O "command script import _lldb/llgo_plugin.py" ./cl/_testdata/debug/out
# github.com/goplus/llgo/cl/_testdata/debug