builtin_type_ptr.
* gdbtypes.c (builtin_type_void_data_ptr): Update.
(build_gdbtypes): Update.
(_initialize_gdbtypes): Update.
* values.c (value_as_pointer): Update.
* utils.c (host_pointer_to_address): Update.
(address_to_host_pointer): Update.
+2001-07-07 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbtypes.h (builtin_type_void_data_ptr): Rename
+ builtin_type_ptr.
+ * gdbtypes.c (builtin_type_void_data_ptr): Update.
+ (build_gdbtypes): Update.
+ (_initialize_gdbtypes): Update.
+ * values.c (value_as_pointer): Update.
+ * utils.c (host_pointer_to_address): Update.
+ (address_to_host_pointer): Update.
+
2001-07-08 Andrew Cagney <ac131313@redhat.com>
* remote-udi.c (udi_wait): Make type, instead of name, of first
struct type *builtin_type_v8qi;
struct type *builtin_type_v4hi;
struct type *builtin_type_v2si;
-struct type *builtin_type_ptr;
+struct type *builtin_type_void_data_ptr;
struct type *builtin_type_void_func_ptr;
struct type *builtin_type_CORE_ADDR;
struct type *builtin_type_bfd_vma;
target type for a value the target will never see. It's only
used to hold the values of (typeless) linker symbols, which are
indeed in the unified virtual address space. */
- builtin_type_ptr = make_pointer_type (builtin_type_void, NULL);
+ builtin_type_void_data_ptr = make_pointer_type (builtin_type_void, NULL);
builtin_type_void_func_ptr
= lookup_pointer_type (lookup_function_type (builtin_type_void));
builtin_type_CORE_ADDR =
register_gdbarch_swap (&builtin_type_v8qi, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v4hi, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v2si, sizeof (struct type *), NULL);
- REGISTER_GDBARCH_SWAP (builtin_type_ptr);
+ REGISTER_GDBARCH_SWAP (builtin_type_void_data_ptr);
REGISTER_GDBARCH_SWAP (builtin_type_void_func_ptr);
REGISTER_GDBARCH_SWAP (builtin_type_CORE_ADDR);
REGISTER_GDBARCH_SWAP (builtin_type_bfd_vma);
extern struct type *builtin_type_bool;
/* Address/pointer types: */
-/* (C) Language pointer type. Some target platforms use an implicitly
- {sign,zero} -extended 32 bit C language pointer on a 64 bit ISA. */
-extern struct type *builtin_type_ptr;
+/* (C) Language `pointer to data' type. Some target platforms use an
+ implicitly {sign,zero} -extended 32 bit C language pointer on a 64
+ bit ISA. */
+extern struct type *builtin_type_void_data_ptr;
/* (C) Language `pointer to function returning void' type. Since
ANSI, C standards have explicitly said that pointers to functions
CORE_ADDR
host_pointer_to_address (void *ptr)
{
- if (sizeof (ptr) != TYPE_LENGTH (builtin_type_ptr))
+ if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
internal_error (__FILE__, __LINE__,
"core_addr_to_void_ptr: bad cast");
- return POINTER_TO_ADDRESS (builtin_type_ptr, &ptr);
+ return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &ptr);
}
void *
address_to_host_pointer (CORE_ADDR addr)
{
void *ptr;
- if (sizeof (ptr) != TYPE_LENGTH (builtin_type_ptr))
+ if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
internal_error (__FILE__, __LINE__,
"core_addr_to_void_ptr: bad cast");
- ADDRESS_TO_POINTER (builtin_type_ptr, &ptr, addr);
+ ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
return ptr;
}
can be different and may require different integer to pointer
conversions. */
if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_INT
- && TYPE_LENGTH (VALUE_TYPE (val)) <= TYPE_LENGTH (builtin_type_ptr))
+ && (TYPE_LENGTH (VALUE_TYPE (val))
+ <= TYPE_LENGTH (builtin_type_void_data_ptr)))
{
- val = value_cast (builtin_type_ptr, val);
+ val = value_cast (builtin_type_void_data_ptr, val);
}
return unpack_long (VALUE_TYPE (val), VALUE_CONTENTS (val));
#endif