#include "serial.h"
#include "target.h"
#include "exceptions.h"
-#include "remote-utils.h"
#include "gdb_string.h"
#include "gdb_stat.h"
#include "regcache.h"
static int mips_map_regno (int regno);
-static void mips_fetch_registers (int regno);
+static void mips_fetch_registers (struct regcache *regcache, int regno);
-static void mips_prepare_to_store (void);
+static void mips_prepare_to_store (struct regcache *regcache);
-static void mips_store_registers (int regno);
+static void mips_store_registers (struct regcache *regcache, int regno);
static unsigned int mips_fetch_word (CORE_ADDR addr);
static int mips_store_word (CORE_ADDR addr, unsigned int value,
char *old_contents);
-static int mips_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
+static int mips_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
int write,
struct mem_attrib *attrib,
struct target_ops *target);
of some sort. That doesn't happen here (in fact, it may not be
possible to get the monitor to send the appropriate packet). */
- flush_cached_frames ();
+ reinit_frame_cache ();
registers_changed ();
stop_pc = read_pc ();
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC);
/* Fetch the remote registers. */
static void
-mips_fetch_registers (int regno)
+mips_fetch_registers (struct regcache *regcache, int regno)
{
unsigned LONGEST val;
int err;
if (regno == -1)
{
for (regno = 0; regno < NUM_REGS; regno++)
- mips_fetch_registers (regno);
+ mips_fetch_registers (regcache, regno);
return;
}
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
store_unsigned_integer (buf, register_size (current_gdbarch, regno), val);
- regcache_raw_supply (current_regcache, regno, buf);
+ regcache_raw_supply (regcache, regno, buf);
}
}
registers, so this function doesn't have to do anything. */
static void
-mips_prepare_to_store (void)
+mips_prepare_to_store (struct regcache *regcache)
{
}
/* Store remote register(s). */
static void
-mips_store_registers (int regno)
+mips_store_registers (struct regcache *regcache, int regno)
{
+ ULONGEST val;
int err;
if (regno == -1)
{
for (regno = 0; regno < NUM_REGS; regno++)
- mips_store_registers (regno);
+ mips_store_registers (regcache, regno);
return;
}
- mips_request ('R', mips_map_regno (regno),
- read_register (regno),
+ regcache_cooked_read_unsigned (regcache, regno, &val);
+ mips_request ('R', mips_map_regno (regno), val,
&err, mips_receive_wait, NULL);
if (err)
mips_error ("Can't write register %d: %s", regno, safe_strerror (errno));
static int mask_address_p = 1;
static int
-mips_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+mips_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
struct mem_attrib *attrib, struct target_ops *target)
{
int i;