mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 15:17:13 +08:00
* regcache.c (deprecated_read_register_gen): Remove, inline ...
(read_register): ... here. (deprecated_write_register_gen): Remove, inline ... (write_register): ... here. * regcache.h (deprecated_read_register_gen): Remove prototype. (deprecated_write_register_gen): Likewise. * remote-sim.c (gdbsim_store_register): Replace call to deprecated_read_register_gen with regcache_cooked_read. * target.c (debug_print_register): Replace calls to deprecated_read_register_gen and read_register with regcache_cooked_read.
This commit is contained in:
@ -1,3 +1,18 @@
|
|||||||
|
2007-04-28 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
* regcache.c (deprecated_read_register_gen): Remove, inline ...
|
||||||
|
(read_register): ... here.
|
||||||
|
(deprecated_write_register_gen): Remove, inline ...
|
||||||
|
(write_register): ... here.
|
||||||
|
* regcache.h (deprecated_read_register_gen): Remove prototype.
|
||||||
|
(deprecated_write_register_gen): Likewise.
|
||||||
|
|
||||||
|
* remote-sim.c (gdbsim_store_register): Replace call to
|
||||||
|
deprecated_read_register_gen with regcache_cooked_read.
|
||||||
|
* target.c (debug_print_register): Replace calls to
|
||||||
|
deprecated_read_register_gen and read_register with
|
||||||
|
regcache_cooked_read.
|
||||||
|
|
||||||
2007-04-28 Ulrich Weigand <uweigand@de.ibm.com>
|
2007-04-28 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* hpux-thread.c (hpux_thread_store_registers): Use
|
* hpux-thread.c (hpux_thread_store_registers): Use
|
||||||
|
@ -573,14 +573,6 @@ regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
|
|||||||
regcache_raw_write (regcache, regnum, buf);
|
regcache_raw_write (regcache, regnum, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
deprecated_read_register_gen (int regnum, gdb_byte *buf)
|
|
||||||
{
|
|
||||||
gdb_assert (current_regcache != NULL);
|
|
||||||
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
|
|
||||||
regcache_cooked_read (current_regcache, regnum, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf)
|
regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf)
|
||||||
{
|
{
|
||||||
@ -684,14 +676,6 @@ regcache_raw_write (struct regcache *regcache, int regnum,
|
|||||||
target_store_registers (regnum);
|
target_store_registers (regnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
deprecated_write_register_gen (int regnum, gdb_byte *buf)
|
|
||||||
{
|
|
||||||
gdb_assert (current_regcache != NULL);
|
|
||||||
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
|
|
||||||
regcache_cooked_write (current_regcache, regnum, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
regcache_cooked_write (struct regcache *regcache, int regnum,
|
regcache_cooked_write (struct regcache *regcache, int regnum,
|
||||||
const gdb_byte *buf)
|
const gdb_byte *buf)
|
||||||
@ -806,7 +790,9 @@ ULONGEST
|
|||||||
read_register (int regnum)
|
read_register (int regnum)
|
||||||
{
|
{
|
||||||
gdb_byte *buf = alloca (register_size (current_gdbarch, regnum));
|
gdb_byte *buf = alloca (register_size (current_gdbarch, regnum));
|
||||||
deprecated_read_register_gen (regnum, buf);
|
gdb_assert (current_regcache != NULL);
|
||||||
|
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
|
||||||
|
regcache_cooked_read (current_regcache, regnum, buf);
|
||||||
return (extract_unsigned_integer (buf, register_size (current_gdbarch, regnum)));
|
return (extract_unsigned_integer (buf, register_size (current_gdbarch, regnum)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -841,7 +827,9 @@ write_register (int regnum, LONGEST val)
|
|||||||
size = register_size (current_gdbarch, regnum);
|
size = register_size (current_gdbarch, regnum);
|
||||||
buf = alloca (size);
|
buf = alloca (size);
|
||||||
store_signed_integer (buf, size, (LONGEST) val);
|
store_signed_integer (buf, size, (LONGEST) val);
|
||||||
deprecated_write_register_gen (regnum, buf);
|
gdb_assert (current_regcache != NULL);
|
||||||
|
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
|
||||||
|
regcache_cooked_write (current_regcache, regnum, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -157,23 +157,6 @@ extern struct regcache *regcache_dup_no_passthrough (struct regcache *regcache);
|
|||||||
extern void regcache_cpy (struct regcache *dest, struct regcache *src);
|
extern void regcache_cpy (struct regcache *dest, struct regcache *src);
|
||||||
extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
|
extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
|
||||||
|
|
||||||
/* NOTE: cagney/2002-11-02: The below have been superseded by the
|
|
||||||
regcache_cooked_*() functions found above, and the frame_*()
|
|
||||||
functions found in "frame.h". Take care though, often more than a
|
|
||||||
simple substitution is required when updating the code. The
|
|
||||||
change, as far as practical, should avoid adding references to
|
|
||||||
global variables (e.g., current_regcache, current_frame,
|
|
||||||
current_gdbarch or the selected frame) and instead refer to
|
|
||||||
the FRAME or REGCACHE that has been passed into the containing
|
|
||||||
function as parameters. Consequently, the change typically
|
|
||||||
involves modifying the containing function so that it takes a FRAME
|
|
||||||
or REGCACHE parameter. In the case of an architecture vector
|
|
||||||
method, there should already be a non-deprecated variant that is
|
|
||||||
parameterized with FRAME or REGCACHE. */
|
|
||||||
|
|
||||||
extern void deprecated_read_register_gen (int regnum, gdb_byte *myaddr);
|
|
||||||
extern void deprecated_write_register_gen (int regnum, gdb_byte *myaddr);
|
|
||||||
|
|
||||||
/* NOTE: cagney/2002-11-05: This function has been superseeded by
|
/* NOTE: cagney/2002-11-05: This function has been superseeded by
|
||||||
regcache_raw_supply(). */
|
regcache_raw_supply(). */
|
||||||
extern void deprecated_registers_fetched (void);
|
extern void deprecated_registers_fetched (void);
|
||||||
|
@ -353,7 +353,7 @@ gdbsim_store_register (int regno)
|
|||||||
{
|
{
|
||||||
char tmp[MAX_REGISTER_SIZE];
|
char tmp[MAX_REGISTER_SIZE];
|
||||||
int nr_bytes;
|
int nr_bytes;
|
||||||
deprecated_read_register_gen (regno, tmp);
|
regcache_cooked_read (current_regcache, regno, tmp);
|
||||||
nr_bytes = sim_store_register (gdbsim_desc,
|
nr_bytes = sim_store_register (gdbsim_desc,
|
||||||
REGISTER_SIM_REGNO (regno),
|
REGISTER_SIM_REGNO (regno),
|
||||||
tmp, register_size (current_gdbarch, regno));
|
tmp, register_size (current_gdbarch, regno));
|
||||||
|
12
gdb/target.c
12
gdb/target.c
@ -2160,19 +2160,19 @@ debug_print_register (const char * func, int regno)
|
|||||||
fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
|
fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
|
||||||
if (regno >= 0)
|
if (regno >= 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i, size = register_size (current_gdbarch, regno);
|
||||||
unsigned char buf[MAX_REGISTER_SIZE];
|
unsigned char buf[MAX_REGISTER_SIZE];
|
||||||
deprecated_read_register_gen (regno, buf);
|
regcache_cooked_read (current_regcache, regno, buf);
|
||||||
fprintf_unfiltered (gdb_stdlog, " = ");
|
fprintf_unfiltered (gdb_stdlog, " = ");
|
||||||
for (i = 0; i < register_size (current_gdbarch, regno); i++)
|
for (i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
|
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
|
||||||
}
|
}
|
||||||
if (register_size (current_gdbarch, regno) <= sizeof (LONGEST))
|
if (size <= sizeof (LONGEST))
|
||||||
{
|
{
|
||||||
|
ULONGEST val = extract_unsigned_integer (buf, size);
|
||||||
fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
|
fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
|
||||||
paddr_nz (read_register (regno)),
|
paddr_nz (val), paddr_d (val));
|
||||||
paddr_d (read_register (regno)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf_unfiltered (gdb_stdlog, "\n");
|
fprintf_unfiltered (gdb_stdlog, "\n");
|
||||||
|
Reference in New Issue
Block a user