Re: Objective-C selector names in disassembly

2022-04-03 Thread Martin Wierschin via Cocoa-dev
I'm running my app's project in Xcode as normal, so that's a debug version. But 
I'm interested in selector names for system frameworks, which are naturally 
final release versions that are part of macOS.

~Martin

> On Apr 3, 2022, at 3:24 PM, Alex Zavatone  wrote:
> 
> Yes.  Are you disassembling a release version or a debug version?
> 
>> On Apr 3, 2022, at 2:36 PM, Martin Wierschin via Cocoa-dev 
>>  wrote:
>> 
>> 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 (Cocoa-dev@lists.apple.com)
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>> 
>> This email sent to z...@mac.com
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Objective-C selector names in disassembly

2022-04-03 Thread Martin Wierschin via Cocoa-dev
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/ 


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  wrote:
> 
> Hopper Disassembler ?
> 
> Envoyé de mon iPhone
> 
>> Le 3 avr. 2022 à 21:36, Martin Wierschin via Cocoa-dev 
>>  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 (Cocoa-dev@lists.apple.com)
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/dev.iceberg%40gmail.com
>> 
>> This email sent to dev.iceb...@gmail.com
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Objective-C selector names in disassembly

2022-04-03 Thread Alex Zavatone via Cocoa-dev
Yes.  Are you disassembling a release version or a debug version?

> On Apr 3, 2022, at 2:36 PM, Martin Wierschin via Cocoa-dev 
>  wrote:
> 
> 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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Objective-C selector names in disassembly

2022-04-03 Thread Martin Wierschin via Cocoa-dev
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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com