2003-06-01 Andrew Cagney <cagney@redhat.com>
* defs.h (extract_address): Delete declaration. * findvar.c (extract_address): Delete function. * xstormy16-tdep.c (xstormy16_extract_return_value): Replace extract_address with the inline equivalent, extract_unsigned_integer. (xstormy16_extract_struct_value_address): Ditto. (xstormy16_pointer_to_address): Ditto. * vax-tdep.c (vax_extract_struct_value_address): Ditto. * v850-tdep.c (v850_push_arguments): Ditto. (v850_extract_return_value): Ditto. (v850_extract_struct_value_address): Ditto. * sparcnbsd-tdep.c (sparcnbsd_get_longjmp_target_32): Ditto. (sparcnbsd_get_longjmp_target_64): Ditto. * sparc-tdep.c (sparc_frame_saved_pc): Ditto. (get_longjmp_target): Ditto. * sh-tdep.c (sh_extract_struct_value_address): Ditto. (sh64_extract_struct_value_address): Ditto. (sh_push_arguments): Ditto. (sh64_push_arguments): Ditto. * remote-vxsparc.c (vx_read_register): Ditto. * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Ditto. * ns32k-tdep.c (ns32k_extract_struct_value_address): Ditto. * mn10300-tdep.c (mn10300_extract_struct_value_address): Ditto. * mipsv4-nat.c (get_longjmp_target): Ditto. * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Ditto. * mips-nat.c (get_longjmp_target): Ditto. * mips-linux-tdep.c (mips_linux_get_longjmp_target): Ditto. * mcore-tdep.c (mcore_extract_struct_value_address): Ditto. * m68k-tdep.c (m68k_get_longjmp_target): Ditto. * m68hc11-tdep.c (m68hc11_extract_struct_value_address): Ditto. * irix5-nat.c (get_longjmp_target): Ditto. * irix4-nat.c (get_longjmp_target): Ditto. * ia64-tdep.c (generic_elf_find_global_pointer): Ditto. (ia64_push_arguments): Ditto. * hpux-thread.c (hpux_thread_store_registers): Ditto. * h8300-tdep.c (h8300_push_arguments): Ditto. (h8300_store_return_value): Ditto. (h8300_extract_struct_value_address): Ditto. * frv-tdep.c (frv_extract_struct_value_address): Ditto. (frv_push_arguments): Ditto. * avr-tdep.c (avr_pointer_to_address): Ditto. (avr_push_arguments): Ditto. * arm-tdep.c (arm_push_dummy_call): Ditto. (arm_get_longjmp_target): Ditto. * arm-linux-tdep.c (arm_linux_push_arguments): Ditto. * alpha-tdep.c (alpha_extract_struct_value_address): Ditto. (alpha_get_longjmp_target): Ditto.
This commit is contained in:
parent
12be538b0b
commit
7c0b4a2066
30 changed files with 112 additions and 88 deletions
|
@ -1,5 +1,53 @@
|
|||
2003-06-01 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* defs.h (extract_address): Delete declaration.
|
||||
* findvar.c (extract_address): Delete function.
|
||||
* xstormy16-tdep.c (xstormy16_extract_return_value): Replace
|
||||
extract_address with the inline equivalent,
|
||||
extract_unsigned_integer.
|
||||
(xstormy16_extract_struct_value_address): Ditto.
|
||||
(xstormy16_pointer_to_address): Ditto.
|
||||
* vax-tdep.c (vax_extract_struct_value_address): Ditto.
|
||||
* v850-tdep.c (v850_push_arguments): Ditto.
|
||||
(v850_extract_return_value): Ditto.
|
||||
(v850_extract_struct_value_address): Ditto.
|
||||
* sparcnbsd-tdep.c (sparcnbsd_get_longjmp_target_32): Ditto.
|
||||
(sparcnbsd_get_longjmp_target_64): Ditto.
|
||||
* sparc-tdep.c (sparc_frame_saved_pc): Ditto.
|
||||
(get_longjmp_target): Ditto.
|
||||
* sh-tdep.c (sh_extract_struct_value_address): Ditto.
|
||||
(sh64_extract_struct_value_address): Ditto.
|
||||
(sh_push_arguments): Ditto.
|
||||
(sh64_push_arguments): Ditto.
|
||||
* remote-vxsparc.c (vx_read_register): Ditto.
|
||||
* ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Ditto.
|
||||
* ns32k-tdep.c (ns32k_extract_struct_value_address): Ditto.
|
||||
* mn10300-tdep.c (mn10300_extract_struct_value_address): Ditto.
|
||||
* mipsv4-nat.c (get_longjmp_target): Ditto.
|
||||
* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Ditto.
|
||||
* mips-nat.c (get_longjmp_target): Ditto.
|
||||
* mips-linux-tdep.c (mips_linux_get_longjmp_target): Ditto.
|
||||
* mcore-tdep.c (mcore_extract_struct_value_address): Ditto.
|
||||
* m68k-tdep.c (m68k_get_longjmp_target): Ditto.
|
||||
* m68hc11-tdep.c (m68hc11_extract_struct_value_address): Ditto.
|
||||
* irix5-nat.c (get_longjmp_target): Ditto.
|
||||
* irix4-nat.c (get_longjmp_target): Ditto.
|
||||
* ia64-tdep.c (generic_elf_find_global_pointer): Ditto.
|
||||
(ia64_push_arguments): Ditto.
|
||||
* hpux-thread.c (hpux_thread_store_registers): Ditto.
|
||||
* h8300-tdep.c (h8300_push_arguments): Ditto.
|
||||
(h8300_store_return_value): Ditto.
|
||||
(h8300_extract_struct_value_address): Ditto.
|
||||
* frv-tdep.c (frv_extract_struct_value_address): Ditto.
|
||||
(frv_push_arguments): Ditto.
|
||||
* avr-tdep.c (avr_pointer_to_address): Ditto.
|
||||
(avr_push_arguments): Ditto.
|
||||
* arm-tdep.c (arm_push_dummy_call): Ditto.
|
||||
(arm_get_longjmp_target): Ditto.
|
||||
* arm-linux-tdep.c (arm_linux_push_arguments): Ditto.
|
||||
* alpha-tdep.c (alpha_extract_struct_value_address): Ditto.
|
||||
(alpha_get_longjmp_target): Ditto.
|
||||
|
||||
* solib-irix.c (extract_mips_address): Inline extract_address,
|
||||
replacing it with extract_signed_integer.
|
||||
* solib-svr4.c (SOLIB_EXTRACT_ADDRESS): Ditto.
|
||||
|
|
|
@ -381,8 +381,8 @@ alpha_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
|
|||
static CORE_ADDR
|
||||
alpha_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_address (regbuf + REGISTER_BYTE (ALPHA_V0_REGNUM),
|
||||
REGISTER_RAW_SIZE (ALPHA_V0_REGNUM)));
|
||||
return (extract_unsigned_integer (regbuf + REGISTER_BYTE (ALPHA_V0_REGNUM),
|
||||
REGISTER_RAW_SIZE (ALPHA_V0_REGNUM)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -518,7 +518,7 @@ alpha_get_longjmp_target (CORE_ADDR *pc)
|
|||
raw_buffer, tdep->jb_elt_size))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (raw_buffer, tdep->jb_elt_size);
|
||||
*pc = extract_unsigned_integer (raw_buffer, tdep->jb_elt_size);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
&& NULL != target_type
|
||||
&& TYPE_CODE_FUNC == TYPE_CODE (target_type))
|
||||
{
|
||||
CORE_ADDR regval = extract_address (val, len);
|
||||
CORE_ADDR regval = extract_unsigned_integer (val, len);
|
||||
if (arm_pc_is_thumb (regval))
|
||||
store_unsigned_integer (val, len, MAKE_THUMB_ADDR (regval));
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
if (argreg <= ARM_LAST_ARG_REGNUM)
|
||||
{
|
||||
/* It's an argument being passed in a general register. */
|
||||
regval = extract_address (val, partial_len);
|
||||
regval = extract_unsigned_integer (val, partial_len);
|
||||
write_register (argreg++, regval);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1465,7 +1465,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
|
|||
&& target_type != NULL
|
||||
&& TYPE_CODE_FUNC == TYPE_CODE (target_type))
|
||||
{
|
||||
CORE_ADDR regval = extract_address (val, len);
|
||||
CORE_ADDR regval = extract_unsigned_integer (val, len);
|
||||
if (arm_pc_is_thumb (regval))
|
||||
{
|
||||
val = alloca (len);
|
||||
|
@ -1484,7 +1484,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
|
|||
{
|
||||
/* The argument is being passed in a general purpose
|
||||
register. */
|
||||
CORE_ADDR regval = extract_address (val, partial_len);
|
||||
CORE_ADDR regval = extract_unsigned_integer (val, partial_len);
|
||||
if (arm_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
|
||||
argnum, REGISTER_NAME (argreg),
|
||||
|
@ -2494,7 +2494,7 @@ arm_get_longjmp_target (CORE_ADDR *pc)
|
|||
INT_REGISTER_RAW_SIZE))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, INT_REGISTER_RAW_SIZE);
|
||||
*pc = extract_unsigned_integer (buf, INT_REGISTER_RAW_SIZE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
|
|||
static CORE_ADDR
|
||||
avr_pointer_to_address (struct type *type, const void *buf)
|
||||
{
|
||||
CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
|
||||
CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
|
||||
|
||||
if (TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
|
||||
{
|
||||
|
@ -1084,7 +1084,7 @@ avr_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
while (len > 0)
|
||||
{ /* there's room in registers */
|
||||
len -= wordsize;
|
||||
regval = extract_address (val + len, wordsize);
|
||||
regval = extract_unsigned_integer (val + len, wordsize);
|
||||
write_register (argreg--, regval);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1126,8 +1126,6 @@ extern ULONGEST extract_unsigned_integer (const void *, int);
|
|||
|
||||
extern int extract_long_unsigned_integer (const void *, int, LONGEST *);
|
||||
|
||||
extern CORE_ADDR extract_address (const void *, int);
|
||||
|
||||
extern CORE_ADDR extract_typed_address (const void *buf, struct type *type);
|
||||
|
||||
extern void store_signed_integer (void *, int, LONGEST);
|
||||
|
|
|
@ -161,28 +161,6 @@ extract_long_unsigned_integer (const void *addr, int orig_len, LONGEST *pval)
|
|||
}
|
||||
|
||||
|
||||
/* Treat the LEN bytes at ADDR as a target-format address, and return
|
||||
that address. ADDR is a buffer in the GDB process, not in the
|
||||
inferior.
|
||||
|
||||
This function should only be used by target-specific code. It
|
||||
assumes that a pointer has the same representation as that thing's
|
||||
address represented as an integer. Some machines use word
|
||||
addresses, or similarly munged things, for certain types of
|
||||
pointers, so that assumption doesn't hold everywhere.
|
||||
|
||||
Common code should use extract_typed_address instead, or something
|
||||
else based on POINTER_TO_ADDRESS. */
|
||||
|
||||
CORE_ADDR
|
||||
extract_address (const void *addr, int len)
|
||||
{
|
||||
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
|
||||
whether we want this to be true eventually. */
|
||||
return (CORE_ADDR) extract_unsigned_integer (addr, len);
|
||||
}
|
||||
|
||||
|
||||
/* Treat the bytes at BUF as a pointer of type TYPE, and return the
|
||||
address it represents. */
|
||||
CORE_ADDR
|
||||
|
|
|
@ -762,8 +762,8 @@ frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
static CORE_ADDR
|
||||
frv_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (regbuf + frv_register_byte (struct_return_regnum),
|
||||
4);
|
||||
return extract_unsigned_integer (regbuf + frv_register_byte (struct_return_regnum),
|
||||
4);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -859,7 +859,7 @@ frv_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
|
||||
if (argreg < 14)
|
||||
{
|
||||
regval = extract_address (val, partial_len);
|
||||
regval = extract_unsigned_integer (val, partial_len);
|
||||
#if 0
|
||||
printf(" Argnum %d data %x -> reg %d\n",
|
||||
argnum, (int) regval, argreg);
|
||||
|
|
|
@ -706,7 +706,7 @@ h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
|
||||
for (offset = 0; offset < padded_len; offset += wordsize)
|
||||
{
|
||||
ULONGEST word = extract_address (padded + offset, wordsize);
|
||||
ULONGEST word = extract_unsigned_integer (padded + offset, wordsize);
|
||||
write_register (reg++, word);
|
||||
}
|
||||
}
|
||||
|
@ -830,11 +830,11 @@ h8300_store_return_value (struct type *type, char *valbuf)
|
|||
{
|
||||
case 1: /* char */
|
||||
case 2: /* short, int */
|
||||
regval = extract_address (valbuf, len);
|
||||
regval = extract_unsigned_integer (valbuf, len);
|
||||
write_register (0, regval);
|
||||
break;
|
||||
case 4: /* long, float */
|
||||
regval = extract_address (valbuf, len);
|
||||
regval = extract_unsigned_integer (valbuf, len);
|
||||
if (wordsize == 4)
|
||||
{
|
||||
write_register (0, regval);
|
||||
|
@ -1032,8 +1032,8 @@ h8300_use_struct_convention (int gcc_p, struct type *type)
|
|||
static CORE_ADDR
|
||||
h8300_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (regbuf + h8300_register_byte (E_ARG0_REGNUM),
|
||||
h8300_register_raw_size (E_ARG0_REGNUM));
|
||||
return extract_unsigned_integer (regbuf + h8300_register_byte (E_ARG0_REGNUM),
|
||||
h8300_register_raw_size (E_ARG0_REGNUM));
|
||||
}
|
||||
|
||||
const static unsigned char *
|
||||
|
|
|
@ -360,8 +360,8 @@ hpux_thread_store_registers (int regno)
|
|||
&deprecated_registers[REGISTER_BYTE (regno)],
|
||||
REGISTER_RAW_SIZE (regno));
|
||||
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
|
||||
(extract_address (&deprecated_registers[REGISTER_BYTE (regno)],
|
||||
REGISTER_RAW_SIZE (regno)) + 160);
|
||||
(extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)],
|
||||
REGISTER_RAW_SIZE (regno)) + 160);
|
||||
}
|
||||
else if (regno == PC_REGNUM)
|
||||
write_memory (sp - 20,
|
||||
|
|
|
@ -1747,7 +1747,7 @@ generic_elf_find_global_pointer (CORE_ADDR faddr)
|
|||
status = target_read_memory (addr + 8, buf, sizeof (buf));
|
||||
if (status != 0)
|
||||
break;
|
||||
global_pointer = extract_address (buf, sizeof (buf));
|
||||
global_pointer = extract_unsigned_integer (buf, sizeof (buf));
|
||||
|
||||
/* The payoff... */
|
||||
return global_pointer;
|
||||
|
@ -1929,7 +1929,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
char val_buf[8];
|
||||
|
||||
store_unsigned_integer (val_buf, 8,
|
||||
find_func_descr (extract_address (VALUE_CONTENTS (arg), 8),
|
||||
find_func_descr (extract_unsigned_integer (VALUE_CONTENTS (arg), 8),
|
||||
&funcdescaddr));
|
||||
if (slotnum < rseslots)
|
||||
write_memory (rse_address_add (bsp, slotnum), val_buf, 8);
|
||||
|
|
|
@ -156,7 +156,7 @@ get_longjmp_target (CORE_ADDR *pc)
|
|||
TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ get_longjmp_target (CORE_ADDR *pc)
|
|||
TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1171,8 +1171,8 @@ m68hc11_return_value_on_stack (struct type *type)
|
|||
static CORE_ADDR
|
||||
m68hc11_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (®buf[HARD_D_REGNUM * 2],
|
||||
REGISTER_RAW_SIZE (HARD_D_REGNUM));
|
||||
return extract_unsigned_integer (®buf[HARD_D_REGNUM * 2],
|
||||
REGISTER_RAW_SIZE (HARD_D_REGNUM));
|
||||
}
|
||||
|
||||
/* Function: push_return_address (pc)
|
||||
|
|
|
@ -847,13 +847,13 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
|
|||
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
jb_addr = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
if (target_read_memory (jb_addr + tdep->jb_pc * tdep->jb_elt_size, buf,
|
||||
TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -992,7 +992,7 @@ mcore_use_struct_convention (int gcc_p, struct type *type)
|
|||
CORE_ADDR
|
||||
mcore_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
|
||||
return extract_unsigned_integer (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
|
||||
}
|
||||
|
||||
/* Given a function which returns a value of type TYPE, extract the
|
||||
|
|
|
@ -80,7 +80,7 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
|
|||
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ mips64_linux_get_longjmp_target (CORE_ADDR *pc)
|
|||
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ get_longjmp_target (CORE_ADDR *pc)
|
|||
TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ mipsnbsd_get_longjmp_target (CORE_ADDR *pc)
|
|||
NBSD_MIPS_JB_ELEMENT_SIZE))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, NBSD_MIPS_JB_ELEMENT_SIZE);
|
||||
*pc = extract_unsigned_integer (buf, NBSD_MIPS_JB_ELEMENT_SIZE);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ get_longjmp_target (CORE_ADDR *pc)
|
|||
TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -131,8 +131,8 @@ mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
static CORE_ADDR
|
||||
mn10300_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (regbuf + REGISTER_BYTE (4),
|
||||
REGISTER_RAW_SIZE (4));
|
||||
return extract_unsigned_integer (regbuf + REGISTER_BYTE (4),
|
||||
REGISTER_RAW_SIZE (4));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -503,7 +503,7 @@ ns32k_store_return_value (struct type *valtype, char *valbuf)
|
|||
static CORE_ADDR
|
||||
ns32k_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
|
||||
return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -295,7 +295,7 @@ ppc_linux_skip_trampoline_code (CORE_ADDR pc)
|
|||
/* Get address of the relocation entry (Elf32_Rela) */
|
||||
if (target_read_memory (plt_table + reloc_index, buf, 4) != 0)
|
||||
return 0;
|
||||
reloc = extract_address (buf, 4);
|
||||
reloc = extract_unsigned_integer (buf, 4);
|
||||
|
||||
sect = find_pc_section (reloc);
|
||||
if (!sect)
|
||||
|
|
|
@ -101,8 +101,8 @@ vx_read_register (int regno)
|
|||
area in the frame. VxWorks does not do this for the active frame
|
||||
automatically; it greatly simplifies debugging. */
|
||||
|
||||
sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
|
||||
REGISTER_RAW_SIZE (SP_REGNUM));
|
||||
sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
|
||||
REGISTER_RAW_SIZE (SP_REGNUM));
|
||||
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
|
||||
16 * REGISTER_RAW_SIZE (L0_REGNUM));
|
||||
|
||||
|
@ -176,8 +176,8 @@ vx_write_register (int regno)
|
|||
|
||||
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
|
||||
{
|
||||
sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
|
||||
REGISTER_RAW_SIZE (SP_REGNUM));
|
||||
sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
|
||||
REGISTER_RAW_SIZE (SP_REGNUM));
|
||||
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
|
||||
16 * REGISTER_RAW_SIZE (L0_REGNUM));
|
||||
}
|
||||
|
|
|
@ -1921,14 +1921,14 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
|||
static CORE_ADDR
|
||||
sh_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_address ((regbuf), REGISTER_RAW_SIZE (0)));
|
||||
return (extract_unsigned_integer ((regbuf), REGISTER_RAW_SIZE (0)));
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
sh64_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_address ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
|
||||
REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
|
||||
return (extract_unsigned_integer ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
|
||||
REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
|
@ -2123,7 +2123,7 @@ sh_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
if (argreg <= tdep->ARGLAST_REGNUM)
|
||||
{
|
||||
/* there's room in a register */
|
||||
regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
|
||||
regval = extract_unsigned_integer (val, REGISTER_RAW_SIZE (argreg));
|
||||
write_register (argreg++, regval);
|
||||
}
|
||||
/* Store the value 4 bytes at a time. This means that things
|
||||
|
@ -2238,7 +2238,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
if (int_argreg <= tdep->ARGLAST_REGNUM)
|
||||
{
|
||||
/* there's room in a register */
|
||||
regval = extract_address (val, argreg_size);
|
||||
regval = extract_unsigned_integer (val, argreg_size);
|
||||
write_register (int_argreg, regval);
|
||||
}
|
||||
/* Store the value 8 bytes at a time. This means that
|
||||
|
|
|
@ -508,7 +508,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
|
|||
stack layout has changed or the stack is corrupt. */
|
||||
target_read_memory (sigcontext_addr + saved_pc_offset,
|
||||
scbuf, sizeof (scbuf));
|
||||
return extract_address (scbuf, sizeof (scbuf));
|
||||
return extract_unsigned_integer (scbuf, sizeof (scbuf));
|
||||
}
|
||||
else if (get_frame_extra_info (frame)->in_prologue ||
|
||||
(get_next_frame (frame) != NULL &&
|
||||
|
@ -534,7 +534,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
|
|||
return PC_ADJUST (read_register (O7_REGNUM));
|
||||
|
||||
read_memory (addr, buf, SPARC_INTREG_SIZE);
|
||||
return PC_ADJUST (extract_address (buf, SPARC_INTREG_SIZE));
|
||||
return PC_ADJUST (extract_unsigned_integer (buf, SPARC_INTREG_SIZE));
|
||||
}
|
||||
|
||||
/* Since an individual frame in the frame cache is defined by two
|
||||
|
@ -1796,7 +1796,7 @@ get_longjmp_target (CORE_ADDR *pc)
|
|||
LONGJMP_TARGET_SIZE))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, LONGJMP_TARGET_SIZE);
|
||||
*pc = extract_unsigned_integer (buf, LONGJMP_TARGET_SIZE);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ sparcnbsd_get_longjmp_target_32 (CORE_ADDR *pc)
|
|||
if (target_read_memory (jb_addr + 12, buf, sizeof (buf)))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, sizeof (buf));
|
||||
*pc = extract_unsigned_integer (buf, sizeof (buf));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ sparcnbsd_get_longjmp_target_64 (CORE_ADDR *pc)
|
|||
if (target_read_memory (jb_addr + 16, buf, sizeof (buf)))
|
||||
return 0;
|
||||
|
||||
*pc = extract_address (buf, sizeof (buf));
|
||||
*pc = extract_unsigned_integer (buf, sizeof (buf));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -973,7 +973,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
{
|
||||
CORE_ADDR regval;
|
||||
|
||||
regval = extract_address (val, v850_register_raw_size (argreg));
|
||||
regval = extract_unsigned_integer (val, v850_register_raw_size (argreg));
|
||||
write_register (argreg, regval);
|
||||
|
||||
len -= v850_register_raw_size (argreg);
|
||||
|
@ -1068,8 +1068,8 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
/* Aggregates and return values > 8 bytes are returned in memory,
|
||||
pointed to by R6. */
|
||||
return_buffer =
|
||||
extract_address (regbuf + REGISTER_BYTE (E_V0_REGNUM),
|
||||
REGISTER_RAW_SIZE (E_V0_REGNUM));
|
||||
extract_unsigned_integer (regbuf + REGISTER_BYTE (E_V0_REGNUM),
|
||||
REGISTER_RAW_SIZE (E_V0_REGNUM));
|
||||
|
||||
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
|
||||
}
|
||||
|
@ -1086,8 +1086,8 @@ v850_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
|
|||
static CORE_ADDR
|
||||
v850_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (regbuf + v850_register_byte (E_V0_REGNUM),
|
||||
v850_register_raw_size (E_V0_REGNUM));
|
||||
return extract_unsigned_integer (regbuf + v850_register_byte (E_V0_REGNUM),
|
||||
v850_register_raw_size (E_V0_REGNUM));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -300,7 +300,8 @@ vax_store_return_value (struct type *valtype, char *valbuf)
|
|||
static CORE_ADDR
|
||||
vax_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
|
||||
return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0),
|
||||
REGISTER_RAW_SIZE (0)));
|
||||
}
|
||||
|
||||
static const unsigned char *
|
||||
|
|
|
@ -228,8 +228,8 @@ xstormy16_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
/* Aggregates and return values > 12 bytes are returned in memory,
|
||||
pointed to by R2. */
|
||||
return_buffer =
|
||||
extract_address (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM),
|
||||
REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
|
||||
extract_unsigned_integer (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM),
|
||||
REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
|
||||
|
||||
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
|
||||
}
|
||||
|
@ -410,9 +410,8 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
|
|||
static CORE_ADDR
|
||||
xstormy16_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return extract_address (regbuf +
|
||||
xstormy16_register_byte (E_PTR_RET_REGNUM),
|
||||
xstormy16_reg_size);
|
||||
return extract_unsigned_integer (regbuf + xstormy16_register_byte (E_PTR_RET_REGNUM),
|
||||
xstormy16_reg_size);
|
||||
}
|
||||
|
||||
/* Function: xstormy16_use_struct_convention
|
||||
|
@ -962,7 +961,7 @@ static CORE_ADDR
|
|||
xstormy16_pointer_to_address (struct type *type, const void *buf)
|
||||
{
|
||||
enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
|
||||
CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
|
||||
CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
|
||||
|
||||
if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue