const gdb_byte *endptr, CORE_ADDR *typep,
CORE_ADDR *valp)
{
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
+ bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
const gdb_byte *ptr = *readptr;
if (endptr == ptr)
if (!proc_get_status (pi))
return 0;
- *addr = (CORE_ADDR) gdbarch_pointer_to_address (target_gdbarch (),
- builtin_type (target_gdbarch ())->builtin_data_ptr,
- (gdb_byte *) &pi->prstatus.pr_lwp.pr_info.si_addr);
+ gdbarch *arch = current_inferior ()->arch ();
+ *addr = gdbarch_pointer_to_address
+ (arch, builtin_type (arch)->builtin_data_ptr,
+ (gdb_byte *) &pi->prstatus.pr_lwp.pr_info.si_addr);
return 1;
}
static void *
procfs_address_to_host_pointer (CORE_ADDR addr)
{
- struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
+ gdbarch *arch = current_inferior ()->arch ();
+ type *ptr_type = builtin_type (arch)->builtin_data_ptr;
void *ptr;
gdb_assert (sizeof (ptr) == ptr_type->length ());
- gdbarch_address_to_pointer (target_gdbarch (), ptr_type,
- (gdb_byte *) &ptr, addr);
+ gdbarch_address_to_pointer (arch, ptr_type, (gdb_byte *) &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. */
- struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
+ type *ptr_type
+ = builtin_type (current_inferior ()->arch ())->builtin_data_ptr;
if (sizeof (void *) != ptr_type->length ())
return 0;
struct expression *cond)
{
if (!target_have_steppable_watchpoint ()
- && !gdbarch_have_nonsteppable_watchpoint (target_gdbarch ()))
+ && !gdbarch_have_nonsteppable_watchpoint (current_inferior ()->arch ()))
/* When a hardware watchpoint fires off the PC will be left at
the instruction following the one which caused the
watchpoint. It will *NOT* be necessary for GDB to step over
pr_off = (unsigned int) map->pr_offset;
- if (gdbarch_addr_bit (target_gdbarch ()) == 32)
+ if (gdbarch_addr_bit (current_inferior ()->arch ()) == 32)
gdb_printf ("\t%#10lx %#10lx %#10lx %#10x %7s\n",
(unsigned long) map->pr_vaddr,
(unsigned long) map->pr_vaddr + map->pr_size - 1,
return; /* No output for summary mode. */
gdb_printf (_("Mapped address spaces:\n\n"));
- if (gdbarch_ptr_bit (target_gdbarch ()) == 32)
+ if (gdbarch_ptr_bit (current_inferior ()->arch ()) == 32)
gdb_printf ("\t%10s %10s %10s %10s %7s\n",
"Start Addr",
" End Addr",