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


Mike Stump <mrs@apple.com> writes:

> 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.

What I want is a comprehensive design specification, explaining
exactly what happens at runtime and exactly what the compiler has to
do to accomodate that.  Also, this is a feature that would be useful
on any target; the specification, and the implementation, should be
factored appropriately so that someone can come along later and hook
it up for their favorite target.

I'm not going to bother looking at the code till I get this.  Nor will
I dig through Apple's online documentation.  It is your responsibility
to explain the patch to us.

> -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...

That's a start, but it is hardly a comprehensive specification.

zw


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