Re: GDB Focus Group at the 2008 GCC Summit

Jim Ingham
2008-06-23T17:35:03Z

The actual mechanism was not that hard to work from the gdb side, you
just need the fix bundle and what it is replacing. The part the IDE
was most useful for was coordinating building the new fix bundle
appropriately, and remembering what it was replacing.

From what I remember, there were two things that were a real pain
(though Jason can tell in more detail...)

One was the part where you try to validate that the change you are
about to make is safe (for instance you aren't changing the size of a
structure, etc...) You don't need to do this, but it seems really
unfriendly to let people do stuff that you know is going to cause
their program to crash, so we felt it was a necessary part of a
complete implementation. This is not particularly hard, but it is
tedious. There's a bunch of that in our version that might be useful.

The other really painful part is figuring out how to play nice with
the various runtimes that you're adding methods into. I don't
remember all the details, but we had to add hacks to both the C++ and
the ObjC runtimes to make them like doing surgery on classes on the
fly. That's hard because you have to coordinate it with the system
runtime libraries. It was also the most fragile part.

We still have some people who use fix and continue but IMHO it was
never really worth the effort, given how fragile it ended up being.

Jim

On Jun 23, 2008, at 8:17 AM, Tom Tromey wrote:

>>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
>
>>> | * Fix and continue:
>>> |
>>> | Perhaps try to implement this feature through the use of
>>> Python.
>>> | For instance, use python to build a return value, and return
>>> that.
>
> Nick> Apple GDB already has fix and continue. Couldn't that be used
> Nick> as a reference implementaton?
>
> I didn't take notes on this, but apparently fix-and-continue is kind
> of a pain to implement, and AFAICS needs IDE integration to work
> properly anyhow. The Python idea is more of a cute hack than a really
> serious thing.
>
> Tom