aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-02 02:09:40 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-02 02:09:40 +0000
commit7c0b4a206672ef45cc3112a1c3f5269e35f44efa (patch)
tree172ef0c518b3925e86495a4a5ffda33607c0f96b
parent12be538b0bfc5234760f1bd152e2db315758d43b (diff)
downloadgdb-7c0b4a206672ef45cc3112a1c3f5269e35f44efa.zip
gdb-7c0b4a206672ef45cc3112a1c3f5269e35f44efa.tar.gz
gdb-7c0b4a206672ef45cc3112a1c3f5269e35f44efa.tar.bz2
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.
-rw-r--r--gdb/ChangeLog48
-rw-r--r--gdb/alpha-tdep.c6
-rw-r--r--gdb/arm-linux-tdep.c4
-rw-r--r--gdb/arm-tdep.c6
-rw-r--r--gdb/avr-tdep.c4
-rw-r--r--gdb/defs.h2
-rw-r--r--gdb/findvar.c22
-rw-r--r--gdb/frv-tdep.c6
-rw-r--r--gdb/h8300-tdep.c10
-rw-r--r--gdb/hpux-thread.c4
-rw-r--r--gdb/ia64-tdep.c4
-rw-r--r--gdb/irix4-nat.c2
-rw-r--r--gdb/irix5-nat.c2
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68k-tdep.c4
-rw-r--r--gdb/mcore-tdep.c2
-rw-r--r--gdb/mips-linux-tdep.c4
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mipsnbsd-tdep.c2
-rw-r--r--gdb/mipsv4-nat.c2
-rw-r--r--gdb/mn10300-tdep.c4
-rw-r--r--gdb/ns32k-tdep.c2
-rw-r--r--gdb/ppc-linux-tdep.c2
-rw-r--r--gdb/remote-vxsparc.c8
-rw-r--r--gdb/sh-tdep.c10
-rw-r--r--gdb/sparc-tdep.c6
-rw-r--r--gdb/sparcnbsd-tdep.c4
-rw-r--r--gdb/v850-tdep.c10
-rw-r--r--gdb/vax-tdep.c3
-rw-r--r--gdb/xstormy16-tdep.c11
30 files changed, 112 insertions, 88 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5d97f89..b3c34c2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 96f8cf6..8f2cb38 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -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;
}
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index a2ea493..8a4bdf6 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -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
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 0ee3e24..4aaf151 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -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;
}
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 4ade2ab..792f3fa 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -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);
}
}
diff --git a/gdb/defs.h b/gdb/defs.h
index a90ef9e..492afe5 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -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);
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 5d975e4..2a78c1e 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -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
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index c26af4d..3a090ea 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -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);
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 0559805..ce642a3 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -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 *
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 02f5acd..ed55c34 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -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,
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a898f52..4697574 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -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);
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 7635495..90229bb 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -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;
}
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 6128a04..bb90da5 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -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;
}
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 5d6e51e..adfabf4 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -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 (&regbuf[HARD_D_REGNUM * 2],
- REGISTER_RAW_SIZE (HARD_D_REGNUM));
+ return extract_unsigned_integer (&regbuf[HARD_D_REGNUM * 2],
+ REGISTER_RAW_SIZE (HARD_D_REGNUM));
}
/* Function: push_return_address (pc)
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index fbbac63..a7b87c5 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -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;
}
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index ea97ec2..cd544f6 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -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
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index b8072f1..78503d1 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -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;
}
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index e370534..fbd18c0 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -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;
}
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 7776d46..1d25e0f 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -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;
}
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 65ffa0d..d29bc99 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -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;
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index c7bc58c..76f0245 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -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
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 46c175c..dfdd315 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -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
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 44a5b81..ef1d9f0 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -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)
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index a97c18e..8b55428 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -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));
}
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index cbaaa36..57c3f48 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -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
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index ab5b973..f387ad8 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -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;
}
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 1299d06..4fe05aa 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -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;
}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 0f896a4..f415af1 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -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
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 814fedd..fe96e7f 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -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 *
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index f792423..97cdd0a 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -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)
{