From aaab4dba8639bf42d0f6d79ca33dd6867e212fed Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 15 May 2003 22:58:39 +0000 Subject: 2003-05-15 Andrew Cagney * 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. --- gdb/mem-break.c | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) (limited to 'gdb/mem-break.c') diff --git a/gdb/mem-break.c b/gdb/mem-break.c index 9cf638e..96750c8 100644 --- a/gdb/mem-break.c +++ b/gdb/mem-break.c @@ -24,7 +24,8 @@ #include "defs.h" -/* This file is only useful if BREAKPOINT is set. If not, we punt. */ +/* This file is only useful if BREAKPOINT_FROM_PC is set. If not, we + punt. */ #include "symtab.h" #include "breakpoint.h" @@ -32,50 +33,6 @@ #include "target.h" -/* Use the program counter to determine the contents and size - of a breakpoint instruction. If no target-dependent macro - BREAKPOINT_FROM_PC has been defined to implement this function, - assume that the breakpoint doesn't depend on the PC, and - use the values of the BIG_BREAKPOINT and LITTLE_BREAKPOINT macros. - Return a pointer to a string of bytes that encode a breakpoint - instruction, stores the length of the string to *lenptr, - and optionally adjust the pc to point to the correct memory location - for inserting the breakpoint. */ - -const unsigned char * -memory_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) -{ - /* {BIG_,LITTLE_}BREAKPOINT is the sequence of bytes we insert for a - breakpoint. On some machines, breakpoints are handled by the - target environment and we don't have to worry about them here. */ -#ifdef BIG_BREAKPOINT - if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) - { - static unsigned char big_break_insn[] = BIG_BREAKPOINT; - *lenptr = sizeof (big_break_insn); - return big_break_insn; - } -#endif -#ifdef LITTLE_BREAKPOINT - if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG) - { - static unsigned char little_break_insn[] = LITTLE_BREAKPOINT; - *lenptr = sizeof (little_break_insn); - return little_break_insn; - } -#endif -#ifdef BREAKPOINT - { - static unsigned char break_insn[] = BREAKPOINT; - *lenptr = sizeof (break_insn); - return break_insn; - } -#endif - *lenptr = 0; - return NULL; -} - - /* Insert a breakpoint on targets that don't have any better breakpoint support. We read the contents of the target location and stash it, then overwrite it with a breakpoint instruction. ADDR is the target -- cgit v1.1