Starting GDB on a stripped Mach-o file
Starting GDB on a stripped Mach-o file
- Subject: Starting GDB on a stripped Mach-o file
- From: Eric Dahlman <email@hidden>
- Date: Tue, 1 Jun 2004 10:41:14 -0500
Howdy,
I am doing some work where I need to gather a precise execution trace
of a program. At the moment I am doing this with a simple gdb script
which loads the program, sets a breakpoint at main and then calls stepi
in a while loop to gather my data. It is a poor man's hardware
simulator ;-)
This approach fails in the case of binaries which have been stripped
since the symbol for main no longer exists. Is there an approach which
will work in this case. I have tried a couple of things but nothing
which really appeared to be promising. I think that I may have been
hooking into the dynamic loader too early because GDB would go for a
few (< 100) instructions and then just get stuck. Anyone have a
suggestion for how I could do this?
In case it helps I am recording the delta in the program counter and
then calculating some statistics based on that. I can't use a profiler
as it would only provide a sample of the states the program goes
through. But if there is a better and faster tool to accomplish my
task I would be more than happy to hear about it.
Thanks a bunch!
-Eric
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.