aboutsummaryrefslogtreecommitdiff
path: root/gdb/findcmd.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:21:49 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:21:49 +0000
commit8b9b9e1a3a418a932d0ab62df99466c685d7b184 (patch)
tree8c3f9e066802936f3dd3339b92c6daa98ba788d5 /gdb/findcmd.c
parentb769d911fd1a0ffdde4305b1cb7a9a8265549896 (diff)
downloadgdb-8b9b9e1a3a418a932d0ab62df99466c685d7b184.zip
gdb-8b9b9e1a3a418a932d0ab62df99466c685d7b184.tar.gz
gdb-8b9b9e1a3a418a932d0ab62df99466c685d7b184.tar.bz2
* 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.
Diffstat (limited to 'gdb/findcmd.c')
-rw-r--r--gdb/findcmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/findcmd.c b/gdb/findcmd.c
index a1dfaf3..2996fb0 100644
--- a/gdb/findcmd.c
+++ b/gdb/findcmd.c
@@ -292,13 +292,14 @@ find_command (char *args, int from_tty)
/* Record and print the results. */
set_internalvar (lookup_internalvar ("numfound"),
- value_from_longest (builtin_type_int,
+ value_from_longest (builtin_type_int32,
(LONGEST) found_count));
if (found_count > 0)
{
+ struct gdbarch *gdbarch = current_gdbarch;
+ struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
set_internalvar (lookup_internalvar ("_"),
- value_from_pointer (builtin_type_void_data_ptr,
- last_found_addr));
+ value_from_pointer (ptr_type, last_found_addr));
}
if (found_count == 0)