Commit a1f37c3f by Iain Sandoe Committed by Iain Sandoe

[Darwin] Clarify fix and continue support (NFC).

This updates the description of the support for fix and continue
debugging.

gcc/ChangeLog:

2019-10-15  Iain Sandoe  <iain@sandoe.co.uk>

	* config/darwin.c: Update description of fix and continue.

From-SVN: r277010
parent 6eee5151
2019-10-15 Iain Sandoe <iain@sandoe.co.uk> 2019-10-15 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c: Update description of fix and continue.
2019-10-15 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_binds_local_p): Update to call * config/darwin.c (darwin_binds_local_p): Update to call
default_binds_local_p_3 () directly. amend comments. default_binds_local_p_3 () directly. amend comments.
......
...@@ -49,18 +49,24 @@ along with GCC; see the file COPYING3. If not see ...@@ -49,18 +49,24 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h" #include "intl.h"
#include "optabs.h" #include "optabs.h"
/* Darwin supports a feature called fix-and-continue, which is used /* Fix and Continue.
for rapid turn around debugging. When code is compiled with the
-mfix-and-continue flag, two changes are made to the generated code NOTES:
that allow the system to do things that it would normally not be 1) this facility requires suitable support from a modified version
able to do easily. These changes allow gdb to load in of GDB, which is not provided on any system after MacOS 10.7/Darwin11.
recompilation of a translation unit that has been changed into a 2) There is no support for this in any X86 version of the FSF compiler.
running program and replace existing functions and methods of that
translation unit with versions of those functions and methods Fix and continue was used on some earlier MacOS systems for rapid turn
from the newly compiled translation unit. The new functions access around debugging. When code is compiled with the -mfix-and-continue
the existing static symbols from the old translation unit, if the flag, two changes are made to the generated code that allow the system
symbol existed in the unit to be replaced, and from the new to do things that it would normally not be able to do easily. These
translation unit, otherwise. changes allow gdb to load in recompilation of a translation unit that
has been changed into a running program and replace existing functions
and methods of that translation unit with versions of those functions
and methods from the newly compiled translation unit. The new functions
access the existing static symbols from the old translation unit, if the
symbol existed in the unit to be replaced, and from the new translation
unit, otherwise.
The changes are to insert 5 nops at the beginning of all functions The changes are to insert 5 nops at the beginning of all functions
and to use indirection to get at static symbols. The 5 nops and to use indirection to get at static symbols. The 5 nops
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment