diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-05-15 22:58:39 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-05-15 22:58:39 +0000 |
commit | aaab4dba8639bf42d0f6d79ca33dd6867e212fed (patch) | |
tree | ce4927d40da7489449f224ef720b6788866ccca0 /gdb/mips-tdep.c | |
parent | e06963ffef465de9702443d1f3e04b7d34fa5616 (diff) | |
download | gdb-aaab4dba8639bf42d0f6d79ca33dd6867e212fed.zip gdb-aaab4dba8639bf42d0f6d79ca33dd6867e212fed.tar.gz gdb-aaab4dba8639bf42d0f6d79ca33dd6867e212fed.tar.bz2 |
2003-05-15 Andrew Cagney <cagney@redhat.com>
* arch-utils.h (legacy_breakpoint_from_pc): Delete declaration.
* target.h (memory_breakpoint_from_pc): Delete declaration.
* mem-break.c (memory_breakpoint_from_pc): Delete function.
* arch-utils.c (legacy_breakpoint_from_pc): Delete function.
* monitor.c (monitor_insert_breakpoint): Use
gdbarch_breakpoint_from_pc instead of memory_breakpoint_from_pc.
* gdbarch.sh (BREAKPOINT_FROM_PC): Do not provide a default.
* gdbarch.h, gdbarch.c: Re-generate.
* sparc-tdep.c (sparc_breakpoint_from_pc): New function.
(sparc_gdbarch_init): Set breakpoint_from_pc to
sparc_breakpoint_from_pc.
* config/sparc/tm-sparc.h (BREAKPOINT): Delete macro.
(BREAKPOINT_FROM_PC): Define.
(sparc_breakpoint_from_pc): Declare.
* hppa-tdep.c (hppa_breakpoint_from_pc): New function.
* config/pa/tm-hppa.h (hppa_breakpoint_from_pc): Declare.
(BREAKPOINT_FROM_PC): Define.
(BREAKPOINT): Delete macro.
* target.h: Update comment.
* s390-tdep.c (s390_gdbarch_init): Update comments.
* remote.c: Update comments.
* remote-mips.c: Update comments.
* proc-api.c (write_with_trace): Do not check for a breakpoint.
* mem-break.c: Update comment.
* ia64-tdep.c (IA64_BREAKPOINT): Rename BREAKPOINT.
(ia64_memory_insert_breakpoint): Update.
* config/sparc/tm-sparc.h: Update comment.
* config/pa/tm-hppa64.h: Update comment.
* rs6000-tdep.c (BIG_BREAKPOINT, LITTLE_BREAKPOINT): Delete macro.
(rs6000_breakpoint_from_pc): Update.
* mips-tdep.c (BIG_BREAKPOINT, LITTLE_BREAKPOINT): Delete macro.
(PMON_BIG_BREAKPOINT, PMON_LITTLE_BREAKPOINT): Delete macro.
(IDT_LITTLE_BREAKPOINT, IDT_LITTLE_BREAKPOINT): Delete macro.
(MIPS16_LITTLE_BREAKPOINT, MIPS16_BIG_BREAKPOINT): Delete macro.
(mips_breakpoint_from_pc): Update.
(mips_dump_tdep): Update.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 96c4164..8b5861a 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -5119,19 +5119,6 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info) return print_insn_little_mips (memaddr, info); } -/* Old-style breakpoint macros. - The IDT board uses an unusual breakpoint value, and sometimes gets - confused when it sees the usual MIPS breakpoint instruction. */ - -#define BIG_BREAKPOINT {0, 0x5, 0, 0xd} -#define LITTLE_BREAKPOINT {0xd, 0, 0x5, 0} -#define PMON_BIG_BREAKPOINT {0, 0, 0, 0xd} -#define PMON_LITTLE_BREAKPOINT {0xd, 0, 0, 0} -#define IDT_BIG_BREAKPOINT {0, 0, 0x0a, 0xd} -#define IDT_LITTLE_BREAKPOINT {0xd, 0x0a, 0, 0} -#define MIPS16_BIG_BREAKPOINT {0xe8, 0xa5} -#define MIPS16_LITTLE_BREAKPOINT {0xa5, 0xe8} - /* This function implements the BREAKPOINT_FROM_PC macro. It uses the program counter value to determine whether a 16- or 32-bit breakpoint should be used. It returns a pointer to a string of bytes that encode a breakpoint @@ -5146,17 +5133,19 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) { if (pc_is_mips16 (*pcptr)) { - static unsigned char mips16_big_breakpoint[] = - MIPS16_BIG_BREAKPOINT; + static unsigned char mips16_big_breakpoint[] = {0xe8, 0xa5}; *pcptr = UNMAKE_MIPS16_ADDR (*pcptr); *lenptr = sizeof (mips16_big_breakpoint); return mips16_big_breakpoint; } else { - static unsigned char big_breakpoint[] = BIG_BREAKPOINT; - static unsigned char pmon_big_breakpoint[] = PMON_BIG_BREAKPOINT; - static unsigned char idt_big_breakpoint[] = IDT_BIG_BREAKPOINT; + /* The IDT board uses an unusual breakpoint value, and + sometimes gets confused when it sees the usual MIPS + breakpoint instruction. */ + static unsigned char big_breakpoint[] = {0, 0x5, 0, 0xd}; + static unsigned char pmon_big_breakpoint[] = {0, 0, 0, 0xd}; + static unsigned char idt_big_breakpoint[] = {0, 0, 0x0a, 0xd}; *lenptr = sizeof (big_breakpoint); @@ -5174,19 +5163,16 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) { if (pc_is_mips16 (*pcptr)) { - static unsigned char mips16_little_breakpoint[] = - MIPS16_LITTLE_BREAKPOINT; + static unsigned char mips16_little_breakpoint[] = {0xa5, 0xe8}; *pcptr = UNMAKE_MIPS16_ADDR (*pcptr); *lenptr = sizeof (mips16_little_breakpoint); return mips16_little_breakpoint; } else { - static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT; - static unsigned char pmon_little_breakpoint[] = - PMON_LITTLE_BREAKPOINT; - static unsigned char idt_little_breakpoint[] = - IDT_LITTLE_BREAKPOINT; + static unsigned char little_breakpoint[] = {0xd, 0, 0x5, 0}; + static unsigned char pmon_little_breakpoint[] = {0xd, 0, 0, 0}; + static unsigned char idt_little_breakpoint[] = {0xd, 0x0a, 0, 0}; *lenptr = sizeof (little_breakpoint); @@ -6138,8 +6124,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) "mips_dump_tdep: BADVADDR_REGNUM = %d\n", BADVADDR_REGNUM); fprintf_unfiltered (file, - "mips_dump_tdep: BIG_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, "mips_dump_tdep: CAUSE_REGNUM = %d\n", CAUSE_REGNUM); fprintf_unfiltered (file, @@ -6170,10 +6154,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) "mips_dump_tdep: HI_REGNUM = %d\n", HI_REGNUM); fprintf_unfiltered (file, - "mips_dump_tdep: IDT_BIG_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, - "mips_dump_tdep: IDT_LITTLE_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, "mips_dump_tdep: IGNORE_HELPER_CALL # %s\n", XSTRING (IGNORE_HELPER_CALL (PC))); fprintf_unfiltered (file, @@ -6188,8 +6168,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) "mips_dump_tdep: LAST_EMBED_REGNUM = %d\n", LAST_EMBED_REGNUM); fprintf_unfiltered (file, - "mips_dump_tdep: LITTLE_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, "mips_dump_tdep: LO_REGNUM = %d\n", LO_REGNUM); #ifdef MACHINE_CPROC_FP_OFFSET @@ -6210,13 +6188,9 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "mips_dump_tdep: MAKE_MIPS16_ADDR = FIXME!\n"); fprintf_unfiltered (file, - "mips_dump_tdep: MIPS16_BIG_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, "mips_dump_tdep: MIPS16_INSTLEN = %d\n", MIPS16_INSTLEN); fprintf_unfiltered (file, - "mips_dump_tdep: MIPS16_LITTLE_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, "mips_dump_tdep: MIPS_DEFAULT_ABI = FIXME!\n"); fprintf_unfiltered (file, "mips_dump_tdep: MIPS_EFI_SYMBOL_NAME = multi-arch!!\n"); @@ -6240,10 +6214,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "mips_dump_tdep: OP_LDGPR = used?\n"); fprintf_unfiltered (file, - "mips_dump_tdep: PMON_BIG_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, - "mips_dump_tdep: PMON_LITTLE_BREAKPOINT = delete?\n"); - fprintf_unfiltered (file, "mips_dump_tdep: PRID_REGNUM = %d\n", PRID_REGNUM); fprintf_unfiltered (file, |