summaryrefslogtreecommitdiffstats
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 59f374b8ad..61ca104e9c 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;
}
OpenPOWER on IntegriCloud