• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Starting GDB on a stripped Mach-o file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Starting GDB on a stripped Mach-o file
      • From: Mark Dalrymple <email@hidden>
  • Prev by Date: Re: How to create a custom project template?
  • Next by Date: dead-code stripping, is it possible?
  • Previous by thread: Re: How to create a custom project template?
  • Next by thread: Re: Starting GDB on a stripped Mach-o file
  • Index(es):
    • Date
    • Thread