« Tips for debugging opera plugins | Main | Install Ubuntu 7.04 on Parallels Desktop »

March 6, 2007

Debug ppc program with gdb on Macbook Pro

First, open a Terminal, and export OAH_GDB=YES (for bash)
Start your ppc program, if it's universal binary, use /usr/libexec/oah/translate <program_name_with_path>
Now you will see "Starting Unix GDB Session\n Listening"

Then you can start gdb with "gdb -oah" in another Terminal.
And attach the process of your program.

Can't it be simpler?

More information at
http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_exec_a/chapter_950_section_8.html#//apple_ref/doc/uid/TP40002217-CH210-235927
i.e.
ADC Home > Reference Library > Guides > Mac OS X > Universal Binary Programming Guidelines, Second Edition > Appendix A: Rosetta > Troubleshooting

It's hard to find, isn't it?

Posted by ginn at March 6, 2007 12:30 PM

Comments

Post a comment




Remember Me?