aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/config/sh/tm-sh.h3
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdbint.texinfo12
-rw-r--r--gdb/remote.c54
-rw-r--r--gdb/sh-tdep.c18
6 files changed, 33 insertions, 69 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5a71a4b..22ec62f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2007-03-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/sh/tm-sh.h (DEPRECATED_BIG_REMOTE_BREAKPOINT,
+ DEPRECATED_LITTLE_REMOTE_BREAKPOINT): Remove.
+ * remote.c: Remove code under #ifdef DEPRECATED_REMOTE_BREAKPOINT,
+ DEPRECATED_BIG_REMOTE_BREAKPOINT, DEPRECATED_LITTLE_REMOTE_BREAKPOINT.
+ * sh-tdep.c (sh_breakpoint_from_pc): Return remote breakpoint
+ sequence if target_shortname is "remote".
+
2007-03-27 Anton Blanchard <anton@samba.org>
* rs6000-tdep.c (rs6000_frame_cache): Use tdep->lr_frame_offset
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 54cf739..6bafe67 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -23,7 +23,4 @@
#define NUM_REALREGS 59 /* used in remote-e7000.c which is not multiarched. */
-#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???*/
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 61d0708..95f6ecf 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbint.texinfo (Target Conditionals): Remove mention of
+ DEPRECATED_REMOTE_BREAKPOINT, DEPRECATED_BIG_REMOTE_BREAKPOINT,
+ and DEPRECATED_LITTLE_REMOTE_BREAKPOINT.
+
2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
* Makefile.in: Add "pdfdir" installation
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index e0017ad..3cdd1a10 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -3321,18 +3321,6 @@ Similar to BREAKPOINT, but used for bi-endian targets.
@code{BIG_BREAKPOINT} and @code{LITTLE_BREAKPOINT} have been deprecated in
favor of @code{BREAKPOINT_FROM_PC}.
-@item DEPRECATED_REMOTE_BREAKPOINT
-@itemx DEPRECATED_LITTLE_REMOTE_BREAKPOINT
-@itemx DEPRECATED_BIG_REMOTE_BREAKPOINT
-@findex DEPRECATED_BIG_REMOTE_BREAKPOINT
-@findex DEPRECATED_LITTLE_REMOTE_BREAKPOINT
-@findex DEPRECATED_REMOTE_BREAKPOINT
-Specify the breakpoint instruction sequence for a remote target.
-@code{DEPRECATED_REMOTE_BREAKPOINT},
-@code{DEPRECATED_BIG_REMOTE_BREAKPOINT} and
-@code{DEPRECATED_LITTLE_REMOTE_BREAKPOINT} have been deprecated in
-favor of @code{BREAKPOINT_FROM_PC} (@pxref{BREAKPOINT_FROM_PC}).
-
@item BREAKPOINT_FROM_PC (@var{pcptr}, @var{lenptr})
@findex BREAKPOINT_FROM_PC
@anchor{BREAKPOINT_FROM_PC} Use the program counter to determine the
diff --git a/gdb/remote.c b/gdb/remote.c
index f106c5d..866c477 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -5108,35 +5108,6 @@ extended_remote_async_create_inferior (char *exec_file, char *args,
}
-/* On some machines, e.g. 68k, we may use a different breakpoint
- 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 (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && defined (DEPRECATED_BIG_REMOTE_BREAKPOINT) && !defined(DEPRECATED_REMOTE_BREAKPOINT)
-#define DEPRECATED_REMOTE_BREAKPOINT
-#endif
-
-#ifdef DEPRECATED_REMOTE_BREAKPOINT
-
-/* If the target isn't bi-endian, just pretend it is. */
-#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[] = DEPRECATED_BIG_REMOTE_BREAKPOINT;
-static unsigned char little_break_insn[] = DEPRECATED_LITTLE_REMOTE_BREAKPOINT;
-
-#endif /* DEPRECATED_REMOTE_BREAKPOINT */
-
/* Insert a breakpoint. On targets that have software breakpoint
support, we ask the remote target to do the work; on targets
which don't, we insert a traditional memory breakpoint. */
@@ -5146,9 +5117,6 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
struct remote_state *rs = get_remote_state ();
-#ifdef DEPRECATED_REMOTE_BREAKPOINT
- int val;
-#endif
/* Try the "Z" s/w breakpoint packet if it is not already disabled.
If it succeeds, then set the support to PACKET_ENABLE. If it
@@ -5181,24 +5149,7 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt)
}
}
-#ifdef DEPRECATED_REMOTE_BREAKPOINT
- bp_tgt->placed_size = bp_tgt->shadow_len = sizeof big_break_insn;
- val = target_read_memory (addr, bp_tgt->shadow_contents, bp_tgt->shadow_len);
-
- if (val == 0)
- {
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- val = target_write_memory (addr, (char *) big_break_insn,
- sizeof big_break_insn);
- else
- val = target_write_memory (addr, (char *) little_break_insn,
- sizeof little_break_insn);
- }
-
- return val;
-#else
return memory_insert_breakpoint (bp_tgt);
-#endif /* DEPRECATED_REMOTE_BREAKPOINT */
}
static int
@@ -5226,12 +5177,7 @@ remote_remove_breakpoint (struct bp_target_info *bp_tgt)
return (rs->buf[0] == 'E');
}
-#ifdef DEPRECATED_REMOTE_BREAKPOINT
- return target_write_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
- bp_tgt->shadow_len);
-#else
return memory_remove_breakpoint (bp_tgt);
-#endif /* DEPRECATED_REMOTE_BREAKPOINT */
}
static int
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 59f374b..61ca104 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -389,6 +389,24 @@ sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
/* 0xc3c3 is trapa #c3, and it works in big and little endian modes */
static unsigned char breakpoint[] = { 0xc3, 0xc3 };
+ /* For remote stub targets, trapa #20 is used. */
+ if (strcmp (target_shortname, "remote") == 0)
+ {
+ static unsigned char big_remote_breakpoint[] = { 0xc3, 0x20 };
+ static unsigned char little_remote_breakpoint[] = { 0x20, 0xc3 };
+
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ {
+ *lenptr = sizeof (big_remote_breakpoint);
+ return big_remote_breakpoint;
+ }
+ else
+ {
+ *lenptr = sizeof (little_remote_breakpoint);
+ return little_remote_breakpoint;
+ }
+ }
+
*lenptr = sizeof (breakpoint);
return breakpoint;
}