This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix-n-continue


On Friday, July 30, 2004, at 05:33 PM, Zack Weinberg wrote:
Mike Stump <mrs@apple.com> writes:

Here are some patches to support fast turn around debugging for
darwin...

Ya gonna hafta explain what it does in considerably more detail than that.

What would you like to know? A google reveals http://developer.apple.com/documentation/DeveloperTools/Conceptual/ XcodeQuickTour/qt_fix/chapter_5_section_1.html which has the user perspective. Microsoft has a corresponding feature, if you want to go see what they do.


-ffix-and-continue arranges for functions to be able to overridden at run time by gdb, and -findirect-data arranges for data to be be indirected; there two items are enough to gain fairly standardized debugging functionality whereby one can recompile units and load those recompilations into their running program with gdb and it all just works as expected.

The indirection for data is a preexisting darwin technique, we just use it more often. Did you want me to explain the existing technique? One layer of indirection that is exposed to the dynamic linker to ensure that there is just one instance would be a quick explanation.

We arrange for functions to be overridden by reserving 4 nops worth of space at the front of the function so that gdb can use this as a patch area to forward to the overriding function. This allows forwarding even for preexisting callbacks, function pointers, virtual methods and so on...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]