Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 4, 2006, 03:54 PM   #1
satans_banjo
macrumors regular
 
Join Date: Sep 2005
Location: SE London
Send a message via AIM to satans_banjo Send a message via MSN to satans_banjo Send a message via Yahoo to satans_banjo
Mac OS X x86 Disassembler

Hi

I'm trying my hand at a bit of reverse engineering (purely for the challenge of it all) and I was wondering if there was a reliable x86 disassembler for Mac OS X (command line or otherwise, preferably free)

Thanks
satans_banjo is offline   0 Reply With Quote
Old Sep 4, 2006, 04:25 PM   #2
caveman_uk
Guest
 
caveman_uk's Avatar
 
Join Date: Feb 2003
Location: Hitchin, Herts, UK
You could try using gdb (only if you really want to become a gibbering wreck). I did read IDA Pro now ran on the mac but there's not much sign of it on their website (and it's not free). I guess you could check out fink for anything useful?
caveman_uk is offline   0 Reply With Quote
Old Sep 4, 2006, 04:33 PM   #3
savar
macrumors 68000
 
savar's Avatar
 
Join Date: Jun 2003
Location: District of Columbia
Send a message via AIM to savar
Quote:
Originally Posted by satans_banjo
Hi

I'm trying my hand at a bit of reverse engineering (purely for the challenge of it all) and I was wondering if there was a reliable x86 disassembler for Mac OS X (command line or otherwise, preferably free)

Thanks
gdb, definitely
__________________
Mehce
savar is offline   0 Reply With Quote
Old Sep 5, 2006, 04:16 PM   #4
satans_banjo
Thread Starter
macrumors regular
 
Join Date: Sep 2005
Location: SE London
Send a message via AIM to satans_banjo Send a message via MSN to satans_banjo Send a message via Yahoo to satans_banjo
Thanks - I've got GDB installed, but how do I create a text output file with the assembly code? I can only seem to find out how to use it as a debugger
satans_banjo is offline   0 Reply With Quote
Old Sep 5, 2006, 09:44 PM   #5
savar
macrumors 68000
 
savar's Avatar
 
Join Date: Jun 2003
Location: District of Columbia
Send a message via AIM to savar
Quote:
Originally Posted by satans_banjo
Thanks - I've got GDB installed, but how do I create a text output file with the assembly code? I can only seem to find out how to use it as a debugger
i dont think you can disassemable the entire executable, but you can disassemble ranges of memory. i forget the exact command, i think "disassemble" works but so does "d" or "da" or something like that. gdb probably has help to teach you the mnemonics.

if you're interested in reverse engineering, it probably makes more sense to reverse engineer from gdb than to just dump an entire .asm file, because you can disassemble a particular function that you're interested in or even disassemble the instructions about to execute "disassemble pc pc+10" i think.

its been a while since i used gdb..there's a learning curve but its quite powerful. you can set actions to execute whenever a particular breakpoint is hit. this is real handy for "stubbing out" function calls. set a breakpoint on that function and then set the action to return to pc.

hope this helps
__________________
Mehce
savar is offline   0 Reply With Quote
Old Sep 7, 2006, 05:22 AM   #6
demallien
macrumors regular
 
Join Date: Oct 2005
Try XCode!

This may help...
http://lists.apple.com/archives/xcod.../msg00794.html
demallien is offline   0 Reply With Quote
Old Sep 8, 2006, 02:55 PM   #7
pip11
macrumors member
 
Join Date: Apr 2005
There aren't many options for disassemblers:

1) use otool, included with the dev tools. otool -tV will give you a pretty standard disassembly

2) ht editor--open source and supports OS X and mach-o. you have to compile and install it manually. Its interface can be confusing--use function keys to get to the main features, like F6 to change into the disassembly mode or hex editor.

3) IDA Pro--should work under wine/crossover, although maybe not perfectly. definitely not free, but it is the best. it supports x86 mach-o, and its graphing features are great, especially if you aren't too familiar with disassembly/x86 assembly (like me).
pip11 is offline   0 Reply With Quote
Old Oct 4, 2006, 07:58 AM   #8
harlock59
macrumors newbie
 
Join Date: Mar 2006
Location: france, europe
i am also looking for a disassembler (or debugging) program but not for x86, for powerpc under panther. thanks for any reply. or send me a message at: harlock59[at]gmail[dot]com .thanx a lot.

ps: if possible, not a line-command-only software, but with a graphical user interface (GUI).
harlock59 is offline   0 Reply With Quote
Old Oct 24, 2006, 11:49 PM   #9
Vanya
macrumors newbie
 
Join Date: Oct 2006
Not sure if this will help, but I wrote a "GDB Tutorial for Beginners" awhile back if you're interested-very beginner stuff but lots of information. I wrote it when I used a PowerPC Mac, so the code listings are for PowerPC primarily (with some intel bits thrown in). I'm updating it to reflect the intel cpu of my MacBook Pro.

Here it is.
Cheers!
John
Vanya is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Any good kids games to run on an iMac G3 running Mac OS 10.1-10.4? alexreich PowerPC Macs 10 Feb 10, 2012 02:09 AM
Mac OS X 10.8 Nyan Cat Vasileios Wasteland 6 Jul 22, 2011 08:45 AM
Can Mac OS 10.5 disc repair a 10.4 installation (PowerPC)) Chadder OS X 3 Jun 4, 2011 09:46 PM
Mac OS Lion Developer 3 Bug -BigMac- Mac OS X 10.7 Lion 2 May 31, 2011 07:53 AM
Mac OS X 10.6.7 frequent crashing nikhilkas MacBook Pro 1 May 3, 2011 07:05 PM


All times are GMT -5. The time now is 04:00 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC