aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-05-22 18:37:05 +0000
committerAndrew Cagney <cagney@redhat.com>2003-05-22 18:37:05 +0000
commitaf1342ab7f8f2b535114eca37fb5d0adc6ced661 (patch)
tree6979582ea43a23e14138dbf7b523acf7a48da0b2
parent47e242eca46f01673f05ac0a6a6a8cf401e3b981 (diff)
downloadgdb-af1342ab7f8f2b535114eca37fb5d0adc6ced661.zip
gdb-af1342ab7f8f2b535114eca37fb5d0adc6ced661.tar.gz
gdb-af1342ab7f8f2b535114eca37fb5d0adc6ced661.tar.bz2
2003-05-22 Andrew Cagney <cagney@redhat.com>
* stack.c (frame_info): Inline extract_address, replacing it with extract_unsigned_integer. * findvar.c (unsigned_pointer_to_address): Ditto. * dwarf2loc.c (dwarf_expr_read_reg): Ditto. * dwarf2expr.c (dwarf2_read_address): Ditto. * frame.c (frame_pc_unwind): Update comment. * dummy-frame.c (deprecated_read_register_dummy): Update comment.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/dummy-frame.c2
-rw-r--r--gdb/dwarf2expr.c4
-rw-r--r--gdb/dwarf2loc.c4
-rw-r--r--gdb/findvar.c2
-rw-r--r--gdb/frame.c2
-rw-r--r--gdb/stack.c5
7 files changed, 23 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14911d0..90d2cab 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2003-05-22 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (frame_info): Inline extract_address, replacing it with
+ extract_unsigned_integer.
+ * findvar.c (unsigned_pointer_to_address): Ditto.
+ * dwarf2loc.c (dwarf_expr_read_reg): Ditto.
+ * dwarf2expr.c (dwarf2_read_address): Ditto.
+ * frame.c (frame_pc_unwind): Update comment.
+ * dummy-frame.c (deprecated_read_register_dummy): Update comment.
+
2003-05-22 Jeff Johnston <jjohnstn@redhat.com>
* infptrace.c (detach): Call print_sys_errmsg rather than
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index ca11bd6..94413f4 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -183,7 +183,7 @@ deprecated_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
/* NOTE: cagney/2002-08-12: Replaced a call to
regcache_raw_read_as_address() with a call to
regcache_cooked_read_unsigned(). The old, ...as_address
- function was eventually calling extract_unsigned_integer (via
+ function was eventually calling extract_unsigned_integer (nee
extract_address) to unpack the registers value. The below is
doing an unsigned extract so that it is functionally
equivalent. The read needs to be cooked as, otherwise, it
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 410cd54..aa391eb 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -178,7 +178,9 @@ dwarf2_read_address (unsigned char *buf, unsigned char *buf_end, int *bytes_read
error ("dwarf2_read_address: Corrupted DWARF expression.");
*bytes_read = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
- result = extract_address (buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+ /* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2
+ address is always unsigned. That may or may not be true. */
+ result = extract_unsigned_integer (buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
return result;
}
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 2bb4f26..9ed6b7e 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -124,7 +124,9 @@ dwarf_expr_read_reg (void *baton, int dwarf_regnum)
frame_register (debaton->frame, regnum, &optimized, &lval_type, &save_addr,
&realnum, buf);
- result = extract_address (buf, regsize);
+ /* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2
+ address is always unsigned. That may or may not be true. */
+ result = extract_unsigned_integer (buf, regsize);
return result;
}
diff --git a/gdb/findvar.c b/gdb/findvar.c
index c9623bf..5d975e4 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -333,7 +333,7 @@ value_of_register (int regnum, struct frame_info *frame)
CORE_ADDR
unsigned_pointer_to_address (struct type *type, const void *buf)
{
- return extract_address (buf, TYPE_LENGTH (type));
+ return extract_unsigned_integer (buf, TYPE_LENGTH (type));
}
CORE_ADDR
diff --git a/gdb/frame.c b/gdb/frame.c
index fe863d6..07e0e5b 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -376,7 +376,7 @@ frame_pc_unwind (struct frame_info *this_frame)
implementation is no more than:
frame_unwind_register (this_frame, ISA_PC_REGNUM, buf);
- return extract_address (buf, size of ISA_PC_REGNUM);
+ return extract_unsigned_integer (buf, size of ISA_PC_REGNUM);
Note: this method is very heavily dependent on a correct
register-unwind implementation, it pays to fix that
diff --git a/gdb/stack.c b/gdb/stack.c
index e865270..a0bd7a4 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -818,7 +818,10 @@ frame_info (char *addr_exp, int from_tty)
CORE_ADDR sp;
frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
&realnum, value);
- sp = extract_address (value, REGISTER_RAW_SIZE (SP_REGNUM));
+ /* NOTE: cagney/2003-05-22: This is assuming that the
+ stack pointer was packed as an unsigned integer. That
+ may or may not be valid. */
+ sp = extract_unsigned_integer (value, REGISTER_RAW_SIZE (SP_REGNUM));
printf_filtered (" Previous frame's sp is ");
print_address_numeric (sp, 1, gdb_stdout);
printf_filtered ("\n");