aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-06-04 13:46:37 +0000
committerAndrew Cagney <cagney@redhat.com>2000-06-04 13:46:37 +0000
commitac2e2ef7e2214be3672096ea7e6641d6a0651fd7 (patch)
tree7205cea8571355be893617fae45005b4ab5901a7 /gdb/findvar.c
parent0b5454486cd4b2e34f4ac7eb51092ef55fa97b07 (diff)
downloadgdb-ac2e2ef7e2214be3672096ea7e6641d6a0651fd7.zip
gdb-ac2e2ef7e2214be3672096ea7e6641d6a0651fd7.tar.gz
gdb-ac2e2ef7e2214be3672096ea7e6641d6a0651fd7.tar.bz2
Add host_pointer_to_address() and address_to_host_pointer(). Add
signed_pointer_to_address() etc. Rename generic_pointer_to_address() to unsigned_pointer_to_address() etc.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index adf7ddb..5571ede 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -1210,20 +1210,30 @@ write_fp (val)
/* Given a pointer of type TYPE in target form in BUF, return the
address it represents. */
CORE_ADDR
-generic_pointer_to_address (struct type *type, char *buf)
+unsigned_pointer_to_address (struct type *type, void *buf)
{
return extract_address (buf, TYPE_LENGTH (type));
}
+CORE_ADDR
+signed_pointer_to_address (struct type *type, void *buf)
+{
+ return extract_signed_integer (buf, TYPE_LENGTH (type));
+}
/* Given an address, store it as a pointer of type TYPE in target
format in BUF. */
void
-generic_address_to_pointer (struct type *type, char *buf, CORE_ADDR addr)
+unsigned_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
{
store_address (buf, TYPE_LENGTH (type), addr);
}
+void
+address_to_signed_pointer (struct type *type, void *buf, CORE_ADDR addr)
+{
+ store_signed_integer (buf, TYPE_LENGTH (type), addr);
+}
/* Will calling read_var_value or locate_var_value on SYM end
up caring what frame it is being evaluated relative to? SYM must