Reveal Lldb Integration method

Source: Internet
Author: User

In the previous article, I introduced the framework for configuring reveal, but this is cumbersome because you have to add a reveal framework and configure the other Linker Flags once each project is analyzed.

And when you pack your tests or pack your shelves, you'll have to tick out the reveal framework. Here to share a new way to play reveal integrated->lldb way, this way can avoid the above problems. Lldb integration sounds very heigher-bigger, in fact, is a very simple two-step: Configure the path, set the command.


First, configure the path

First start your reveal, to configure the path, first you have to find reveal path, mainly reveal in the Libreveal.dylib package path. I'll find you first. Download and install the reveal, right-click Display package Contents


Expand the contents file in the open path, locate the Libreveal.dylib destination file, and then right-click to display the profile to get the path to the destination file


Here I get the path is/users/apple/downloads/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib, save the path alternate. Then create a new Xcode project Lldbsetreveal.xcodeproj, and add whatever you want to the program (show effects). Start Xcode project, wait for Xcode to start and then pause the project into LLDB mode


Enter the first line of the command: expr (Class) nsclassfromstring (@ "ibarevealloader") = = nil? (void*) Dlopen ("/users/apple/downloads/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib", 0x2): (( void *) 0), and then enter the second command when there is a response expr (void) [(nsnotificationcenter*) [[Nsnotificationcenter Defaultcenter] postnotificationname:@ "Ibarevealrequeststart" object:nil];


occurs after the input command finishes info:reveal Server started (Protocol Version 25). That was the configuration .



Second, set the commandIf you have to enter these two commands each time more cumbersome, to solve this problem we have to set the alias in the. Lldbinit. Open terminal type Touch ~/.lldbinit command Enter, and then type the Open ~/.lldbinit command to enter the previous two-step command in the new text editor: Red is the command format, Blue is the command alias, the rest is the two command in the above step

Command alias lwq_reveal_load Expr (Class) nsclassfromstring (@ "ibarevealloader") = = nil? (void *) Dlopen ("/users/apple/downloads/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib", 0x2): (( void*) 0)


Command alias lwq_reveal_start expr (void) [(nsnotificationcenter*) [Nsnotificationcenter Defaultcenter] postnotificationname:@ "Ibarevealrequeststart" object:nil];


test it, reboot. Xcode Project, then pause into lldb mode, enter commands lwq_reveal_load and Lwq_reveal_start respectively






"/users/apple/downloads/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib"

"/users/apple/downloads/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib"

R

Reveal Lldb Integration method

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.