This is the mail archive of the gdb-patches@sources.redhat.com 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]

[commit] deprecate REMOTE_BREAKPOINT


To quote the comment I just added:

+/* NOTE: cagney/2003-06-08: This is silly.  A remote and simulator
+   target should use an identical BREAKPOINT_FROM_PC.  As for native,
+   the ARCH-OS-tdep.c code can override the default.  */

These macro's don't need to be added to the architecture vector.

committed,
Andrew
2003-06-08  Andrew Cagney  <cagney@redhat.com>

	Deprecate BIG_REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT and
	REMOTE_BREAKPOINT.
	* remote.c: Update.
	* config/sh/tm-sh.h (DEPRECATED_BIG_REMOTE_BREAKPOINT): Update.
	(DEPRECATED_LITTLE_REMOTE_BREAKPOINT): Update.
	* config/m68k/tm-sun3.h: Update.
	* config/m68k/tm-m68klynx.h: Update.
	* config/h8300/tm-h8300.h (DEPRECATED_REMOTE_BREAKPOINT): Update.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.103
diff -u -r1.103 remote.c
--- remote.c	8 Jun 2003 18:27:14 -0000	1.103
+++ remote.c	8 Jun 2003 22:49:12 -0000
@@ -4633,33 +4633,33 @@
 
 
 /* On some machines, e.g. 68k, we may use a different breakpoint
-   instruction than other targets; in those use REMOTE_BREAKPOINT
-   instead of just BREAKPOINT_FROM_PC.  Also, bi-endian targets may
-   define LITTLE_REMOTE_BREAKPOINT and BIG_REMOTE_BREAKPOINT.  If none
-   of these are defined, we just call the standard routines that are
-   in mem-break.c.  */
-
-/* FIXME, these ought to be done in a more dynamic fashion.  For instance,
-   the choice of breakpoint instruction affects target program design and
-   vice versa, and by making it user-tweakable, the special code here
-   goes away and we need fewer special GDB configurations.  */
+   instruction than other targets; in those use
+   DEPRECATED_REMOTE_BREAKPOINT instead of just BREAKPOINT_FROM_PC.
+   Also, bi-endian targets may define
+   DEPRECATED_LITTLE_REMOTE_BREAKPOINT and
+   DEPRECATED_BIG_REMOTE_BREAKPOINT.  If none of these are defined, we
+   just call the standard routines that are in mem-break.c.  */
+
+/* NOTE: cagney/2003-06-08: This is silly.  A remote and simulator
+   target should use an identical BREAKPOINT_FROM_PC.  As for native,
+   the ARCH-OS-tdep.c code can override the default.  */
 
-#if defined (LITTLE_REMOTE_BREAKPOINT) && defined (BIG_REMOTE_BREAKPOINT) && !defined(REMOTE_BREAKPOINT)
-#define REMOTE_BREAKPOINT
+#if defined (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && defined (DEPRECATED_BIG_REMOTE_BREAKPOINT) && !defined(DEPRECATED_REMOTE_BREAKPOINT)
+#define DEPRECATED_REMOTE_BREAKPOINT
 #endif
 
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
 
 /* If the target isn't bi-endian, just pretend it is.  */
-#if !defined (LITTLE_REMOTE_BREAKPOINT) && !defined (BIG_REMOTE_BREAKPOINT)
-#define LITTLE_REMOTE_BREAKPOINT REMOTE_BREAKPOINT
-#define BIG_REMOTE_BREAKPOINT REMOTE_BREAKPOINT
+#if !defined (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && !defined (DEPRECATED_BIG_REMOTE_BREAKPOINT)
+#define DEPRECATED_LITTLE_REMOTE_BREAKPOINT DEPRECATED_REMOTE_BREAKPOINT
+#define DEPRECATED_BIG_REMOTE_BREAKPOINT DEPRECATED_REMOTE_BREAKPOINT
 #endif
 
-static unsigned char big_break_insn[] = BIG_REMOTE_BREAKPOINT;
-static unsigned char little_break_insn[] = LITTLE_REMOTE_BREAKPOINT;
+static unsigned char big_break_insn[] = DEPRECATED_BIG_REMOTE_BREAKPOINT;
+static unsigned char little_break_insn[] = DEPRECATED_LITTLE_REMOTE_BREAKPOINT;
 
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
 
 /* Insert a breakpoint on targets that don't have any better
    breakpoint support.  We read the contents of the target location
@@ -4673,7 +4673,7 @@
 remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
 {
   struct remote_state *rs = get_remote_state ();
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
   int val;
 #endif  
   int bp_size;
@@ -4710,7 +4710,7 @@
 	}
     }
 
-#ifdef REMOTE_BREAKPOINT  
+#ifdef DEPRECATED_REMOTE_BREAKPOINT  
   val = target_read_memory (addr, contents_cache, sizeof big_break_insn);
 
   if (val == 0)
@@ -4726,7 +4726,7 @@
   return val;
 #else
   return memory_insert_breakpoint (addr, contents_cache);
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
 }
 
 static int
@@ -4755,11 +4755,11 @@
       return (buf[0] == 'E');
     }
 
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
   return target_write_memory (addr, contents_cache, sizeof big_break_insn);
 #else
   return memory_remove_breakpoint (addr, contents_cache);
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
 }
 
 static int
Index: config/h8300/tm-h8300.h
===================================================================
RCS file: /cvs/src/src/gdb/config/h8300/tm-h8300.h,v
retrieving revision 1.16
diff -u -r1.16 tm-h8300.h
--- config/h8300/tm-h8300.h	4 Jun 2003 00:25:03 -0000	1.16
+++ config/h8300/tm-h8300.h	8 Jun 2003 22:49:12 -0000
@@ -32,7 +32,7 @@
 #define GDB_TARGET_IS_H8300
 
 /* Needed for remote.c */
-#define REMOTE_BREAKPOINT { 0x57, 0x30}		/* trapa #3 */
+#define DEPRECATED_REMOTE_BREAKPOINT { 0x57, 0x30}		/* trapa #3 */
 /* Needed for remote-hms.c */
 #define CCR_REGNUM 8
 /* Needed for remote-e7000.c */
Index: config/m68k/tm-m68klynx.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-m68klynx.h,v
retrieving revision 1.2
diff -u -r1.2 tm-m68klynx.h
--- config/m68k/tm-m68klynx.h	5 Jun 2002 19:18:23 -0000	1.2
+++ config/m68k/tm-m68klynx.h	8 Jun 2003 22:49:12 -0000
@@ -34,6 +34,6 @@
 #include "m68k/tm-m68k.h"
 
 /* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
-#undef REMOTE_BREAKPOINT
+#undef DEPRECATED_REMOTE_BREAKPOINT
 
 #endif /* TM_M68KLYNX_H */
Index: config/m68k/tm-sun3.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-sun3.h,v
retrieving revision 1.7
diff -u -r1.7 tm-sun3.h
--- config/m68k/tm-sun3.h	17 May 2003 05:59:59 -0000	1.7
+++ config/m68k/tm-sun3.h	8 Jun 2003 22:49:12 -0000
@@ -46,7 +46,7 @@
 #include "m68k/tm-m68k.h"
 
 /* Disable alternate breakpoint mechanism needed by 68k stub. */
-#undef REMOTE_BREAKPOINT
+#undef DEPRECATED_REMOTE_BREAKPOINT
 
 /* Offsets (in target ints) into jmp_buf.  Not defined by Sun, but at least
    documented in a comment in <machine/setjmp.h>! */
Index: config/sh/tm-sh.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sh/tm-sh.h,v
retrieving revision 1.19
diff -u -r1.19 tm-sh.h
--- config/sh/tm-sh.h	17 May 2002 06:55:49 -0000	1.19
+++ config/sh/tm-sh.h	8 Jun 2003 22:49:12 -0000
@@ -27,7 +27,7 @@
 
 #define REGISTER_TYPE  long /* used in standalone.c */
 
-#define BIG_REMOTE_BREAKPOINT    { 0xc3, 0x20 } /* Used in remote.c */
-#define LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
+#define DEPRECATED_BIG_REMOTE_BREAKPOINT    { 0xc3, 0x20 } /* Used in remote.c */
+#define DEPRECATED_LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
 
 /*#define NOP   {0x20, 0x0b}*/ /* Who uses this???*/

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