aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-10-15 20:28:02 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-10-15 20:28:02 +0000
commita1f37c3f62acf98aa2a44b1f5b3e6d574ef52670 (patch)
tree078076731ea90c0797ca07d431a163a5646c75df
parent6eee515142568bf25e0d99882bdf3cf5f49e97ec (diff)
downloadgcc-a1f37c3f62acf98aa2a44b1f5b3e6d574ef52670.zip
gcc-a1f37c3f62acf98aa2a44b1f5b3e6d574ef52670.tar.gz
gcc-a1f37c3f62acf98aa2a44b1f5b3e6d574ef52670.tar.bz2
[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
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/darwin.c30
2 files changed, 22 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6a9c2e0..2320abc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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
default_binds_local_p_3 () directly. amend comments.
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index d34b003..c0fafed 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -49,18 +49,24 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h"
#include "optabs.h"
-/* Darwin supports a feature called fix-and-continue, which is used
- for rapid turn around debugging. When code is compiled with the
- -mfix-and-continue flag, two changes are made to the generated code
- that allow the system to do things that it would normally not be
- able to do easily. These 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.
+/* Fix and Continue.
+
+ NOTES:
+ 1) this facility requires suitable support from a modified version
+ of GDB, which is not provided on any system after MacOS 10.7/Darwin11.
+ 2) There is no support for this in any X86 version of the FSF compiler.
+
+ Fix and continue was used on some earlier MacOS systems for rapid turn
+ around debugging. When code is compiled with the -mfix-and-continue
+ flag, two changes are made to the generated code that allow the system
+ to do things that it would normally not be able to do easily. These
+ 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
and to use indirection to get at static symbols. The 5 nops