This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

How do I patch my binary


Hi,

There is doc section "Patching Programs".  This got me hoping I could somehow 
patch my binary while I was debugging.

My hope was that I could modify the source code (outside of GDB), recompile 
the binary and have GDB load and use the new binary, without having to restart 
the program.  I couldn't get this to work (using 'set write on' and reloading
the new binary).

When the doc says "Patching" does it mean I actually have to modify the memory
where the code is written, using GDB commands?  Or can I do it high-level
like I originally hoped.

Thanks

Marc





 


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