DerekSelander / LLDB

A collection of LLDB aliases/regexes and Python scripts to aid in your debugging sessions
GNU General Public License v2.0
1.77k stars 198 forks source link

sbt command not working #5

Open wimbledon opened 6 years ago

wimbledon commented 6 years ago

Thank you for providing wondering python scripts. However, I cannot get sbt command to work! I followed the installation instruction to the tee, but I get following error: ___lldb_unnamed_symbol33766$$... unresolved womp womp image

Please help!

DerekSelander commented 6 years ago

Hey @wimbledon , I am aware of that shortcoming on the sbt command. How it works is I grab all the start addresses of all ObjC functions and cross reference them with the starting address for all known functions from LLDB. The thing is in ARM (unlike x86), LLDB doesn't know where the starting address is for a stripped out executable. I think I can get around this shortcoming, but it isn't high on my TODO list at the moment.

wimbledon commented 6 years ago

Thanks @DerekSelander. I am using ARMv7.

Do you mean LLDB does not know the ASLR shift? I tried removing ASLR, but sbt still does not symbolicate.

Is there another way/command I can use instead? Can I manually add function addresses to LLDB?

Also, I get following message on the lldb console

<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

Sorry, I'm new to this kind of debugging...

Alkenso commented 4 years ago

@DerekSelander , could you please provide any workaround of the issue? Maybe some manual job will do the trick?

reverseXiang commented 1 year ago

I think it is because sometimes method_getImplementation return the address of a thunk.


__text:000000010017DA28                               ; =============== S U B R O U T I N E =======================================
__text:000000010017DA28
__text:000000010017DA28                               ; Attributes: thunk
__text:000000010017DA28
__text:000000010017DA28                               ; void __cdecl -[AppDelegate setupAnalytics](_TtC3Hub11AppDelegate *self, SEL)
__text:000000010017DA28                               ___TtC3Hub11AppDelegate_setupAnalytics_
__text:000000010017DA28                                                             ; DATA XREF: __objc_methlist:00000001007C8B14↓o
__text:000000010017DA28 23 10 00 14                   B               ___TtC3Hub11AppDelegate_setupAnalytics__0 ; -[AppDelegate setupAnalytics]_0
__text:000000010017DA28
__text:000000010017DA28                               ; End of function -[AppDelegate setupAnalytics]
__text:000000010017DA28
__text:000000010017DA2C
__text:000000010017DA2C                               ; =============== S U B R O U T I N E =======================================