Re: Objective-C selector names in disassembly
Re: Objective-C selector names in disassembly
- Subject: Re: Objective-C selector names in disassembly
- From: Martin Wierschin via Cocoa-dev <email@hidden>
- Date: Sun, 3 Apr 2022 16:04:43 -0700
- Arc-authentication-results: i=1; rspamd-786f77c8d-5fqhc; auth=pass smtp.auth=dreamhost smtp.mailfrom=email@hidden
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1649027083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fbupF0zS5+YfMAj0PP5s8uV9nI7Pxb9b06BKUE6OSwM=; b=HkjGmmsS1arBOC6+PfrrAjyHq9w/ZGStleNFCYcmh8W6rrH1d7kTVjAozaY7TvUHQndmUy drg8/b8ULDLQEAPJm2iBQEpYQJ6EWM5Uyv3tTX1jmQM+PvzFO6iqGvGSGmrjaevD2hdzOg k+buh0g2bNhsg8AWuQH07spDPIyFadY1ilqG+EWN7maVaYXQpm6cDtBprpwbNB6Vt0e0DV AcRgoos4wSY6MqGW7ZeMj3vHKosxMv8598XJH2Xqs3CrSjCooz3oWZ1UaCKUavqB65UaT8 WTxtTB09mcgSvtQ84+BnvieLf7mWPy4N+f76B3bpM8xvHltD2k8ObbVxhsjR9Q==
- Arc-seal: i=1; s=arc-2022; d=mailchannels.net; t=1649027083; a=rsa-sha256; cv=none; b=05IrP3yB74ShxnF1daNMKteevjNheAf+f7Gfdef/cy/MsvnS7D/gebhHJoq/HKXtgtgXmN wAXohaZWrcW3b/pLuNaZJdHZNRFYjUWdUWBxfmbQiQXEr0kc4DXx/J2mQMeLNdIMoDJ74L tcaSHR/K8KZTrSqAwXC309251J4mzn1hWNOzNikzksrsPKre+Qzf4At3Ga6QciJ2WoMsx3 m8W9xs91ywBfmD/7krJB835iX88k4vR8tAHM0rWXb3HL0ZFMR4FpziWPAoVHLS9EVFbi7P C1WqTqkVTCu1OKGgESWTMiuexlUojjKle7z2z9tND+rjl2Kw4+WpuQGlm5kibA==
Thank you for the suggestion. It looks like Hopper does display selector names
correctly.
Initially I was confused as to what I should have Hopper load. It looks like
framework bundles (e.g. AppKit) don't have a binary file on disk like in former
times. This post help explain things:
https://mjtsai.com/blog/2020/06/26/reverse-engineering-macos-11-0/
<https://mjtsai.com/blog/2020/06/26/reverse-engineering-macos-11-0/>
I pointed Hopper at the dyld shared cache, which seems to lump in all
frameworks now, and the info I needed was parsed out. It's a shame Xcode can't
bother to do this during debugging. Oh well.
Thanks again!
~Martin Wierschin
> On Apr 3, 2022, at 1:55 PM, dev.iceberg <email@hidden> wrote:
>
> Hopper Disassembler ?
>
> Envoyé de mon iPhone
>
>> Le 3 avr. 2022 à 21:36, Martin Wierschin via Cocoa-dev
>> <email@hidden> a écrit :
>>
>> Hi everyone,
>>
>> I have a question that's been an irritating me for a long time. Is there any
>> way to get Xcode (or other tools) to show Objective-C selector names in
>> disassembled framework's code?
>>
>> Back in the good old days viewing assembly for any Obj-C method in Xcode
>> would automatically give you this information. Xcode would always show you
>> each selector's name (as a C string) alongside the SEL value in the assembly
>> listing, usually right before each call to objc_msgSend. This was incredibly
>> useful when you had to workaround Apple bugs, or just to poke around to see
>> how things were implemented.
>>
>> I forget when this changed. I know it was triggered by optimizations to the
>> Obj-C runtime. But not being able to see selector names is like being
>> blindfolded. Is there a good way to discover this information in the modern
>> runtime / toolchains?
>>
>> Thanks for any tips!
>>
>> ~Martin Wierschin
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden