+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * procfs.c (procfs_address_to_host_pointer): Use target_gdbarch
+ and its associated types to perform pointer conversion.
+ (procfs_can_use_hw_breakpoint): Likewise.
+ (procfs_auxv_parse): Remove unused variable.
+
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
* auxv.c (default_auxv_parse): Use gdbarch_ptr_bit (target_gdbarch)
procfs_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
{
- const int pointer_size = TYPE_LENGTH (builtin_type_void_data_ptr);
gdb_byte *ptr = *readptr;
if (endptr == ptr)
static void *
procfs_address_to_host_pointer (CORE_ADDR addr)
{
+ struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
void *ptr;
- gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
- gdbarch_address_to_pointer (current_gdbarch, builtin_type_void_data_ptr,
- &ptr, addr);
+ gdb_assert (sizeof (ptr) == TYPE_LENGTH (ptr_type));
+ gdbarch_address_to_pointer (target_gdbarch, ptr_type, &ptr, addr);
return ptr;
}
procfs_address_to_host_pointer will reveal that an internal error
will be generated when the host and target pointer sizes are
different. */
- if (sizeof (void *) != TYPE_LENGTH (builtin_type_void_data_ptr))
+ struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
+ if (sizeof (void *) != TYPE_LENGTH (ptr_type))
return 0;
/* Other tests here??? */