Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break out a libChisel #62

Closed
kastiglione opened this issue Dec 10, 2014 · 13 comments
Closed

Break out a libChisel #62

kastiglione opened this issue Dec 10, 2014 · 13 comments
Milestone

Comments

@kastiglione
Copy link
Contributor

I mentioned this in a recent comment, but I'd like to get more feedback on this idea.

Many of the commands end up marshaling a bunch of expressions back and forth between LLDB's python interpreter and the target app, but this has proven to be slowish at times. For example the manual path pvc is a fair bit slower than the path that uses +[UIViewController _printHierarchy].

I believe there could be a solid usability and maintainability improvement if we divided the architecture into two halves:

  1. Code that interacts with LLDB's interfaces.
  2. Code that interacts with the app's objects and data.

I think we could bundle a dynamic library and have Chisel load that into the app via target modules addprocess load. This adds some complexity, but the benefits would be faster interaction & feedback with Chisel commands, and also I think this would smooth the path toward adding testing to the project. Plus not having to write objc encoded in python strings is an improvement.

cc @arigrant @mattjgalloway @mmmulani @dstnbrkr @KingOfBrian @kolinkrewinkel

@mmmulani
Copy link

this would be pretty interesting and I think useful overall. (My only concern is the increasing complexity in loading the two modules)

it would probably help with getting community involvement as well, as I expect most people are put off by the foreign python way of doing lldb stuff

@mattjgalloway
Copy link
Contributor

I like this idea a lot.

Huge +1 from me.

@kastiglione
Copy link
Contributor Author

My only concern is the increasing complexity in loading the two modules

Yep, that's my concern too. The good thing is there will be feedback sooner than later when attempting to implement this.

@kastiglione
Copy link
Contributor Author

help with getting community involvement as well, as I expect most people are put off by the foreign python way of doing lldb stuff

Yep, this too!

@kastiglione kastiglione changed the title Break out a libChisel? Break out a libChisel Dec 10, 2014
@kastiglione kastiglione added this to the libChisel milestone Dec 10, 2014
@KingOfBrian
Copy link

Great idea! Although I had fun figuring out how to use objective-c via python, it wasn't the most productive process.

I don't think the slowness of the commands is that big of a deal, but I bet developers would be more inclined to contribute if it wasn't so painful to develop for.

@kastiglione kastiglione mentioned this issue Dec 11, 2014
3 tasks
@kastiglione
Copy link
Contributor Author

@alloy raised a good (and obvious, yet missed) point on Twitter: this approach will be troublesome on device.

@mmmulani
Copy link

for iOS 7 and 8 or is this just a 7 problem?

I wonder if there's some way to hack it in

On 12 Dec 2014, at 18:00, Dave Lee [email protected] wrote:

@alloy raised a good (and obvious) point on Twitter: this approach will be troublesome on device.


Reply to this email directly or view it on GitHub.

@kastiglione
Copy link
Contributor Author

Some experimentation will be required. First hurdle is getting the library from the computer loaded into the process on the device.

@mrtom
Copy link

mrtom commented Dec 12, 2014

I wonder if Zack L (at FB) would be a good person to speak to about loading onto a device.

@zlandau
Copy link

zlandau commented Dec 12, 2014

Yeah you'll probably run into a copy issues loading onto a device. lldb in general would make it very easy, but that assumes you can have write+execute pages, so that method is probably out. The next method would be to save the library onto the device and then dlopen it (easiest way is probably have some code on the client side that knows how to download it from an endpoint). Or just always ship it as part of your debugging app.

But you'll have to sign the library with the same key that the main app was signed. The best way to do that is probably have a little script that looks at the key used to sign the main app, and try to sign the library with the same key.

@mmmulani
Copy link

sounds like way too much effort for a brittle mechanism that would run on every lldb start up.

could we fake this with lldb expressions and blocks to create the stuff at runtime/first use? (maybe only in the case of on device?)

On 12 Dec 2014, at 23:49, Zachary P. Landau [email protected] wrote:

Yeah you'll probably run into a copy issues loading onto a device. lldb in general would make it very easy, but that assumes you can have write+execute pages, so that method is probably out. The next method would be to save the library onto the device and then dlopen it (easiest way is probably have some code on the client side that knows how to download it from an endpoint). Or just always ship it as part of your debugging app.

But you'll have to sign the library with the same key that the main app was signed. The best way to do that is probably have a little script that looks at the key used to sign the main app, and try to sign the library with the same key.


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@kastiglione
Copy link
Contributor Author

This did happen in #197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants