* gdbarch.sh (BREAKPOINT_FROM_PC): Return a const buffer.

* gdbarch.h, gdbarch.c: Regenerate.

* defs.h (breakpoint_from_pc_fn): Delete type definition.
* target.h (memory_breakpoint_from_pc): Update declaration.
* config/mcore/tm-mcore.h (mcore_breakpoint_from_p): Ditto.

* arch-utils.c (legacy_breakpoint_from_pc): Update return type.
* mcore-tdep.c (mcore_breakpoint_from_pc): Ditto.
* mem-break.c (memory_breakpoint_from_pc): Ditto.
* rs6000-tdep.c (rs6000_breakpoint_from_pc): Ditto.
* s390-tdep.c (s390_breakpoint_from_pc): Ditto
* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Ditto.
* mn10300-tdep.c (mn10300_breakpoint_from_pc): Ditto.
* mips-tdep.c (mips_breakpoint_from_pc): Ditto.
* m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Ditto.
* ia64-tdep.c (ia64_breakpoint_from_pc): Ditto.
* d10v-tdep.c (d10v_breakpoint_from_pc): Ditto.
* arch-utils.c (legacy_breakpoint_from_pc): Ditto..

* mem-break.c (default_memory_insert_breakpoint): Make `bp' a
const pointer.
* monitor.c (monitor_insert_breakpoint): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Ditto for `breakp'.

* config/mcore/tm-mcore.h: Update copyright.
* mem-break.c: Ditto.
* xstormy16-tdep.c: Ditto.
This commit is contained in:
Andrew Cagney
2002-04-18 18:09:09 +00:00
parent 29f319b84c
commit f4f9705a2d
20 changed files with 67 additions and 29 deletions

View File

@@ -1,6 +1,8 @@
/* Simulate breakpoints by patching locations in the target system, for GDB.
Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2000,
2002 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by John Gilmore.
This file is part of GDB.
@@ -40,7 +42,7 @@
and optionally adjust the pc to point to the correct memory location
for inserting the breakpoint. */
unsigned char *
const unsigned char *
memory_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
/* {BIG_,LITTLE_}BREAKPOINT is the sequence of bytes we insert for a
@@ -86,7 +88,7 @@ int
default_memory_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
{
int val;
unsigned char *bp;
const unsigned char *bp;
int bplen;
/* Determine appropriate breakpoint contents and size for this address. */
@@ -108,7 +110,7 @@ default_memory_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
int
default_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
{
unsigned char *bp;
const unsigned char *bp;
int bplen;
/* Determine appropriate breakpoint contents and size for this address. */