Say, I have two adjacent functions subfunc()
and main()
in the Mach-O executable and want to disassemble all instructions from subfunc()
to main()+0x10.
I know I can cast functions to addresses using `(void(*)())subfunc`
- isn't there an easier way?
My attempt is as follows, but I get the error message below:
dis -s `(void(*)())subfunc` -e `(void(*)())main+0x10`
error: error: arithmetic on a pointer to the function type 'void ()'
How can I fix this?