From 8b9b9e1a3a418a932d0ab62df99466c685d7b184 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 11 Sep 2008 14:21:49 +0000 Subject: * defs.h (struct gdbarch): Add forward declaration. (set_next_address): Add GDBARCH argument. * printcmd.c (set_next_address): Use it to find pointer type. * breakpoint.c (breakpoint_1): Update call. * source.c (line_info): Likewise. * findcmd.c (find_command): Use current_gdbarch to find pointer type. * breakpoint.c (set_breakpoint_count): Use platform-neutral types for internal variable values. * infrun.c (handle_inferior_event): Likewise. * source.c (forward_search_command, reverse_search_command): Likewise. * tracepoint.c (set_tracepoint_count, set_traceframe_num, set_tracepoint_num, set_traceframe_context): Likewise. --- gdb/printcmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/printcmd.c') diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 1310994..fae39fe 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -503,13 +503,15 @@ print_scalar_formatted (const void *valaddr, struct type *type, The `info lines' command uses this. */ void -set_next_address (CORE_ADDR addr) +set_next_address (struct gdbarch *gdbarch, CORE_ADDR addr) { + struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr; + next_address = addr; /* Make address available to the user as $_. */ set_internalvar (lookup_internalvar ("_"), - value_from_pointer (builtin_type_void_data_ptr, addr)); + value_from_pointer (ptr_type, addr)); } /* Optionally print address ADDR symbolically as on STREAM, -- cgit v1.1