mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 02:20:51 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user