gdbarch as parameter.
* gdbarch.{c,h}: Regenerate.
* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Add gdbarch as
parameter.
* mem-break.c (default_memory_insert_breakpoint)
(default_memory_remove_breakpoint): Likewise.
* target.h (default_memory_remove_breakpoint)
(default_memory_insert_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Add gdbarch as
parameter. Replace current_gdbarch by gdbarch.
* m32r-tdep.c (m32r_memory_insert_breakpoint)
(m32r_memory_remove_breakpoint): Likewise.
+2008-02-20 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (memory_insert_breakpoint, memory_remove_breakpoint): Add
+ gdbarch as parameter.
+
+ * gdbarch.{c,h}: Regenerate.
+
+ * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Add gdbarch as
+ parameter.
+ * mem-break.c (default_memory_insert_breakpoint)
+ (default_memory_remove_breakpoint): Likewise.
+ * target.h (default_memory_remove_breakpoint)
+ (default_memory_insert_breakpoint): Likewise.
+
+ * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Add gdbarch as
+ parameter. Replace current_gdbarch by gdbarch.
+ * m32r-tdep.c (m32r_memory_insert_breakpoint)
+ (m32r_memory_remove_breakpoint): Likewise.
+
2008-02-19 Daniel Jacobowitz <dan@codesourcery.com>
* MAINTAINERS: Add Vladimir Prus as MI maintainer.
0, /* inner_than */
0, /* breakpoint_from_pc */
0, /* adjust_breakpoint_address */
- 0, /* memory_insert_breakpoint */
- 0, /* memory_remove_breakpoint */
+ default_memory_insert_breakpoint, /* memory_insert_breakpoint */
+ default_memory_remove_breakpoint, /* memory_remove_breakpoint */
0, /* decr_pc_after_break */
0, /* deprecated_function_start_offset */
default_remote_register_number, /* remote_register_number */
gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
- return gdbarch->memory_insert_breakpoint (bp_tgt);
+ return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
}
void
gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
- return gdbarch->memory_remove_breakpoint (bp_tgt);
+ return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
}
void
extern CORE_ADDR gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr);
extern void set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address);
-typedef int (gdbarch_memory_insert_breakpoint_ftype) (struct bp_target_info *bp_tgt);
+typedef int (gdbarch_memory_insert_breakpoint_ftype) (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt);
extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt);
extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
-typedef int (gdbarch_memory_remove_breakpoint_ftype) (struct bp_target_info *bp_tgt);
+typedef int (gdbarch_memory_remove_breakpoint_ftype) (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt);
extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt);
extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
f:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
m:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
M:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
-f:int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0
-f:int:memory_remove_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_remove_breakpoint::0
+m:int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0
+m:int:memory_remove_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_remove_breakpoint::0
v:CORE_ADDR:decr_pc_after_break:::0:::0
# A function can be addressed by either it's "pointer" (possibly a
#define IA64_BREAKPOINT 0x00003333300LL
static int
-ia64_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
+ia64_memory_insert_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
char bundle[BUNDLE_LEN];
}
static int
-ia64_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
+ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
char bundle[BUNDLE_LEN];
The following functions take care of this behavior. */
static int
-m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
+m32r_memory_insert_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
int val;
bp_tgt->placed_size = bp_tgt->shadow_len = 4;
/* Determine appropriate breakpoint contents and size for this address. */
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
if ((addr & 3) == 0)
{
}
static int
-m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
+m32r_memory_remove_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
int val;
buf[3] = contents_cache[3];
/* Remove parallel bit. */
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
if ((buf[0] & 0x80) == 0 && (buf[2] & 0x80) != 0)
buf[2] &= 0x7f;
BREAKPOINT_MAX). */
int
-default_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
+default_memory_insert_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
int val;
const unsigned char *bp;
/* Determine appropriate breakpoint contents and size for this address. */
bp = gdbarch_breakpoint_from_pc
- (current_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
+ (gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
if (bp == NULL)
error (_("Software breakpoints not implemented for this target."));
int
-default_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
+default_memory_remove_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
return target_write_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
bp_tgt->placed_size);
regard to removing breakpoints in some potentially self modifying
code. */
int
-ppc_linux_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
+ppc_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
+ struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
const unsigned char *bp;
gdb_byte old_contents[BREAKPOINT_MAX];
/* Determine appropriate breakpoint contents and size for this address. */
- bp = gdbarch_breakpoint_from_pc (current_gdbarch, &addr, &bplen);
+ bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
if (bp == NULL)
error (_("Software breakpoints not implemented for this target."));
CORE_ADDR struct_addr);
CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch,
CORE_ADDR bpaddr);
-int ppc_linux_memory_remove_breakpoint (struct bp_target_info *bp_tgt);
+int ppc_linux_memory_remove_breakpoint (struct gdbarch *, struct bp_target_info *);
struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
const struct regset *ppc_linux_gregset (int);
const struct regset *ppc_linux_fpregset (void);
extern int memory_insert_breakpoint (struct bp_target_info *);
-extern int default_memory_remove_breakpoint (struct bp_target_info *);
+extern int default_memory_remove_breakpoint (struct gdbarch *, struct bp_target_info *);
-extern int default_memory_insert_breakpoint (struct bp_target_info *);
+extern int default_memory_insert_breakpoint (struct gdbarch *, struct bp_target_info *);
/* From target.c */