This is the mail archive of the
mailing list for the GDB project.
RE: How do I patch my binary
On Thu, 25 Nov 2010, Jan Kratochvil wrote:
> On Wed, 24 Nov 2010 16:00:39 +0100, Marc Khouzam wrote:
> > So, if GDB can't do it on its own, can we involve the compiler/linker
> > to make this happen? Is there more complexity with C/C++ than with Java?
> /* APPLE LOCAL fix-and-continue */
> Howdy from Apple; Fix and Continue implemented Yet Again
This is awesome! Thanks Jan!
>From the email description, this seems to be exactly what I was looking for.
It allows the user to recompile a program, as any other compilation is done,
and ask GDB to patch it in.
The email mentions that this feature works with the IDE. But it also
gave me the impression that you could edit with emacs/vi, recompile with GCC
from a shell, and then give GDB the 'fix and continue' command. To me, that
fits very well with GDB and would have not outside dependencies.
(Of course, I would add this support in Eclipse, but that is not a requirement
From the email:
"Fix and continue is a feature implemented by many other debuggers:
[...] Sun Workshop, SGI ProDev WorkShop, Microsoft's Visual Studio,
HP's wdb, and Sun's Hotspot Java VM all provide this feature in one way or another"
I don't know enough about GDB to be able to port the feature myself.
I wonder if anyone else in the community would be interested in
porting this feature?
I think this would be a really nice addition to FSF GDB.
Here is the XCode doc about Fix and Continue which explains it nicely for a user: