GithubHelp home page GithubHelp logo

lldb-debug's Introduction

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

lldb-debug's People

Stargazers

h4ck avatar

Watchers

James Cloos avatar  avatar

Forkers

sung3r

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.