diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-07-08 20:42:15 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-07-08 20:42:15 +0000 |
commit | 090a2205b5e921ae177193783a0a2614ea842d09 (patch) | |
tree | 58fde486005ec64f877d174f4ae8007ec319bf40 | |
parent | 8059d5aa1c46fa62c37add1bf7627ad5c7583cb4 (diff) | |
download | gdb-090a2205b5e921ae177193783a0a2614ea842d09.zip gdb-090a2205b5e921ae177193783a0a2614ea842d09.tar.gz gdb-090a2205b5e921ae177193783a0a2614ea842d09.tar.bz2 |
* 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.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 6 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 7 | ||||
-rw-r--r-- | gdb/utils.c | 8 | ||||
-rw-r--r-- | gdb/values.c | 5 |
5 files changed, 25 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1d36d73..e361e6e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +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 diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index f2fed5f..cfb5ffc 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -73,7 +73,7 @@ struct type *builtin_type_v4si; 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; @@ -2956,7 +2956,7 @@ build_gdbtypes (void) 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 = @@ -3011,7 +3011,7 @@ _initialize_gdbtypes (void) 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); diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 981dbec..bc0f8fb 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -846,9 +846,10 @@ extern struct type *builtin_type_string; 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 diff --git a/gdb/utils.c b/gdb/utils.c index 294ad42..855f474 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -3000,19 +3000,19 @@ phex_nz (ULONGEST l, int sizeof_l) 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; } diff --git a/gdb/values.c b/gdb/values.c index 43ff194..0d18c31 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -595,9 +595,10 @@ value_as_pointer (value_ptr val) 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 |