aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:29:53 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:29:53 +0000
commit4e906f53ab20520b00e7480b73c83435b7f7fb7a (patch)
tree2b36e85ee1f3297358c23104331f4e9f40955767
parentffe5a37e17da959d4c4e43b33f23b9548ac6fb27 (diff)
downloadgdb-4e906f53ab20520b00e7480b73c83435b7f7fb7a.zip
gdb-4e906f53ab20520b00e7480b73c83435b7f7fb7a.tar.gz
gdb-4e906f53ab20520b00e7480b73c83435b7f7fb7a.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/procfs.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 455ab59..520ad04 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
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)
instead of builtin_type_void_data_ptr.
* target.c (default_region_ok_for_hw_watchpoint): Likewise.
diff --git a/gdb/procfs.c b/gdb/procfs.c
index e8cd6d9..703415c 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -160,7 +160,6 @@ static int
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)
@@ -2899,11 +2898,11 @@ proc_parent_pid (procinfo *pi)
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;
}
@@ -5352,7 +5351,8 @@ procfs_can_use_hw_breakpoint (int type, int cnt, int othertype)
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??? */