* src/gdb/target.h: Remove all tests for already defined
[deliverable/binutils-gdb.git] / gdb / findcmd.c
index a1dfaf3bb2cfe97ce74c7c054cd13d8ad60891c2..7ae43e5dc5b86f39ff3428fff55cf89007e25d6e 100644 (file)
@@ -1,6 +1,6 @@
 /* The find command.
 
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -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)
@@ -310,6 +311,9 @@ find_command (char *args, int from_tty)
   do_cleanups (old_cleanups);
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_mem_search;
+
 void
 _initialize_mem_search (void)
 {
This page took 0.024021 seconds and 4 git commands to generate.