diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-11-24 13:49:00 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-11-24 13:49:00 +0000 |
commit | afcad54a90445ba65ca91b13341b75facc96521c (patch) | |
tree | fc90a9c47d68bdf243ba26027fc7e27283c9660d /gdb/rs6000-tdep.c | |
parent | fbf1f3f1f6982710c5e379679ac4f18e795aeeb7 (diff) | |
download | gdb-afcad54a90445ba65ca91b13341b75facc96521c.zip gdb-afcad54a90445ba65ca91b13341b75facc96521c.tar.gz gdb-afcad54a90445ba65ca91b13341b75facc96521c.tar.bz2 |
CARP: *BREAKPOINT*
Convert mn10300, MIPS and powerpc/rs6000 targets to use
BREAKPOINT_FROM_PC
Delete global variable memory_breakpoint_size. Use BREAKPOINT_FROM_PC
instead.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 346b26c..36f5f61 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -134,6 +134,25 @@ branch_dest (opcode, instr, pc, safety) } +/* Sequence of bytes for breakpoint instruction. */ + +#define BIG_BREAKPOINT { 0x7d, 0x82, 0x10, 0x08 } +#define LITTLE_BREAKPOINT { 0x08, 0x10, 0x82, 0x7d } + +unsigned char * +rs6000_breakpoint_from_pc (bp_addr, bp_size) + CORE_ADDR *bp_addr; + int *bp_size; +{ + static unsigned char *big_breakpoint = BIG_BREAKPOINT; + static unsigned char *little_breakpoint = LITTLE_BREAKPOINT; + *bp_size = 4; + if (TARGET_BYTE_ORDER == BIG_ENDIAN) + return big_breakpoint; + else + return little_breakpoint; +} + /* AIX does not support PT_STEP. Simulate it. */ |