在Android 11 上使用 LLDV 调试原生程序

手机端 PUSH 调试服务器到手机 adb push lldb-server /data/local/tmp chmod 755 /data/local/tmp/lldb-server 启动调试器服务 /data/local/tmp/lldb-server platform --listen "*:8888" --server 电脑端 端口转发 adb forward tcp:8888 tcp:8888 启动 LLDB .\lldb.exe 查看支持平台 platform list 选 ANDROID 平台 platform select remote-android 连接到手机 手机序列号: 9643e0ec0604 要换成当前调试的手机,使用 adb devices 查看序列号 platform connect connect://9643e0ec0604:8888 查看当前正在运行的进程 platform process list 附加上去 attach 9053 下断点 b send 跑起来 c 查看线程列表 thread list 查看调用栈 bt

September 28, 2024 · 1 min · xgDebug

Debugging native applications with LLDV on Android 11

Mobile PUSH debug server to mobile adb push lldb-server /data/local/tmp chmod 755 /data/local/tmp/lldb-server Start the debugger service /data/local/tmp/lldb-server platform --listen "*:8888" --server +++ Computer side Port forwarding adb forward tcp:8888 tcp:8888 Start LLDB . \lldb.exe View supported platforms platform list Select ANDROID platform platform select remote-android Connect to the phone Phone serial number: 9643e0ec0604 To change to the current debugging phone, use adb devices to check the serial number platform connect connect://9643e0ec0604:8888 View the currently running process platform process list Attach to attach 9053 Breakpoint b send Run up c View the list of threads thread list View the call stack bt

August 11, 2023 · 1 min · xgDebug