RE: Easiest way to get function name/offset from a hex address?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AcmDGUnVAyiaktC9Tc+IAcc1ZNMqGACF67GA Thread-topic: Easiest way to get function name/offset from a hex address? Terry Lambert wrote on Friday, January 30, 2009 3:28 PM
On Jan 29, 2009, at 6:29 AM, Karan, Cem (Civ, ARL/CISD) wrote:
Terry Lambert wrote on Wednesday, January 28, 2009 4:37 PM
Within the program itself:
man dladdr
Outside the program itself:
man atos
The debugger, gdb, also has multiple modes in which it operates, two of which can be programmatically controlled (to permit things like GUIs that still use gdb internally). You could open the binary with gdb in one of these modes and interactively query gdb for the information.
Can you tell me what these modes are? Or at least what to look for in the manual?
The GDB/MI Interface
<http://sourceware.org/gdb/current/onlinedocs/gdb_26.html#SEC260>
Thank you, I'll spend some time reading through it all.
My first choice is GDB, if I can get it to launch GUI apps correctly. However, for alpha/beta testing, the dladdr trick is probably what I'll need. Crash reports just don't give enough info on how I got into the state I'm currently in.
You can attach GUI apps after they are already launched.
My crash happens before the run loop starts, so I don't have time to attach... :-/ Oh well, I guess its back to using sleep() for a long while in main, and trying to attach before I get out of sleep. Thanks for the help! Thanks, Cem Karan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Karan, Cem (Civ, ARL/CISD)