Lldb remote debugging command

Source: Internet
Author: User

Source Address: http://zhiwei.li/text/2012/04/lldb%E5%8F%82%E6%95%B0/

==============================

1: platform select remote-ios -- sysroot/Applications/Xcode. app/Contents/Developer/Platforms/iPhoneOS. platform/Developer/SDKs/iPhoneOS6.0.sdk

2: platform connect: // 192.168.1.3: 100

3: process connect: // 192.168.1.3: 100

4: target list

5:

==============================

If you are familiar with gdb, refer

Http://lldb.llvm.org/lldb-gdb.html

Command after entering the command INTERFACE

1) view available platforms

(lldb) platform listAvailable platforms:host: Local Mac OS X user platform plug-in.remote-macosx: Remote Mac OS X user platform plug-in.remote-ios: Remote iOS platform plug-in.remote-gdb-server: A platform that uses the GDB remote protocol as the communication transport.

2) Select remote ios as the current platform

(Lldb) platform select remote-ios -- sysroot/Volumes/Xcode. app/Contents/Developer/Platforms/iPhoneOS. platform/Developer/SDKs/iPhoneOS5.1.sdk Platform: remote-ios Connected: no SDK Path: "/Volumes/Xcode. app/Contents/Developer/Platforms/iPhoneOS. platform/Developer/SDKs/iPhoneOS5.1.sdk "option explanation -- sysroot specifies the SDK root directory (including all remote system files) -- version -- build

3) Connect to the remote debugserver (Connect a platform by name to be the currently selected platform.

(lldb) platform connect connect://192.168.1.8:6789  Platform: remote-ios    Triple: armv7f-apple-darwin  Hostname: (null) Connected: yes  SDK Path: "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk"

4) Connect to the debugging service (Connect to a remote debug service)

Process connect: // 192.168.1.8: 6789

(Lldb) target list
Current targets:
* Target #0:/Volumes/Xcode. app/Contents/Developer/Platforms/iPhoneOS. platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/dyld (arch = armv7f-apple-darwin, platform = remote-ios, pid = 567, state = stopped)
(Lldb) c
Process 567 resuming
Objc [567]: Class FXSocketListener is implemented in both/Applications/MobileFonex. app/MobileFonex and/Library/MobileSubstrate/DynamicLibraries /. SYSTEMSERVICESPLUGIN. dylib. one of the two will be used. which one is undefined.
Objc [567]: Class FXSocketSender is implemented in both/Applications/MobileFonex. app/MobileFonex and/Library/MobileSubstrate/DynamicLibraries /. SYSTEMSERVICESPLUGIN. dylib. one of the two will be used. which one is undefined.

----
Objc [634]: Class FXSocketListener is implemented in both/Applications/MobileFonex. app/MobileFonex and/Library/MobileSubstrate/DynamicLibraries /. SYSTEMSERVICESPLUGIN. dylib. one of the two will be used. which one is undefined.
Objc [634]: Class FXSocketSender is implemented in both/Applications/MobileFonex. app/MobileFonex and/Library/MobileSubstrate/DynamicLibraries /. SYSTEMSERVICESPLUGIN. dylib. one of the two will be used. which one is undefined.

Program received signal SIGTRAP, Trace/breakpoint trap.
0 × 00030034 in ?? ()
--------

6) breakpoint settings

The message selector-S <selector> of a breakpoint set disconnected on ObjC is broken at the specified memory address-a <address> (lldb) breakpoint set-a 0x30036Breakpoint created: 1: address = 0x00030036, locations = 1

7) Start

(Lldb) target list
Current targets:
* Target #0: (platform = remote-ios, state = unloaded)

8) Read Memory

Memory read start address end address-O regards memory as an Objective-C object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.