dyld, debug and gdb
dyld, debug and gdb
- Subject: dyld, debug and gdb
- From: "Sigurd Lerstad" <email@hidden>
- Date: Fri, 4 Nov 2005 13:39:10 +0100
Hello,
I'm writing a debugger. My current problem is to
find out where in memory a file is mapped. I am looking into the mach-o file and
the vmaddr fields of segments, however, files could be mapped to other locations
in memory. The _dyld_debug apis seem perfect for finding the real location (I
haven't tried them yet). The docs say you subscribe and receive events when new
images are mapped into memory, and the "slide" of that image, which is the
difference between the preferred location given in the mach-o file and the real
location after mapping in memory.
But after looking in the gdb sources, I am
confused. It doesn't seem to use any of the _dyld_debug apis, instead I find
code that actually searches in memory for mach-o headers, and code that sets
breakpoints in memory for receiving events when a new image is mapped into
memory. Searching memory seems like a terrible hack. Is there any reason why gdb
isn't using the dyld_debug apis ? don't they work? are there limits to
them?
thanks,
--
Sigurd Lerstad
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden