Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dearlancer/LLDB-Debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

LLDB-Debug

通过USB直连手机,并可通过lldb进行调试,断点,查看修改寄存器信息的一站式配置。

安装配置文件

  1. 将lldb解释器改为python3,并增加lldbinit文件
defaults write com.apple.dt.lldb DefaultPythonVersion 3
touch ~/.lldbinit
  1. 安装issh,具体参考github项目
git clone https://github.com/4ch12dy/issh.git
cd issh
./install.sh
  1. 安装lldb-python-script,并加入lldb启动配置中
git clone https://github.com/dearlancer/lldb-python-script.git
cd lldb-python-script
./install.sh
echo 'command script import /Users/xxx/github/lldb-python-script/xlldb.py' >> ~/.lldbinit
echo 'command alias freshxlldb command script import /Users/xxx/github/lldb-python-script/xlldb.py' >> ~/.lldbinit
  1. 配置sbr,脚本链接
mkdir ~/.lldb
cp ./python/sbr.py ~/.lldb
echo 'command script import /Users/xxx/.lldb/sbr.py' >> ~/.lldbinit
  1. 安装voltron,加入lldb启动配置中
git clone https://github.com/dearlancer/voltron.git
cd voltron && ./install.sh
echo 'command script import /Users/xxx/Library/Python/3.7/lib/python/site-packages/voltron/entry.py' >> ~/.lldbinit

Enjoy it now〜

使用

  1. 通过usb连接手机,启动待debug的应用targetApp
  2. 通过issh进行连接 issh debug -a targetApp
  3. 在新窗口中执行lldb,附加进程
  4. 新开一个窗口执行voltron view register观察寄存器信息 效果图如下:

lldb

Api

在lldb中执行的一些api,lldb自身的api参考文档

  • rr 读取所有寄存器内容,用法:rr x
  • sbr 设置断点,用法:sbr addr module
  • sread 读取内存内容,用法sread addr

About

LLDB一站式调试配置工具

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /