Fix PR threads/19422 - show which thread caused stop
[deliverable/binutils-gdb.git] / gdb / findcmd.c
index 07c1d4e845ec699e364269f6504d53e6475ddaa1..f5202e8199628e183fe78c037531d1d30ea769af 100644 (file)
@@ -1,6 +1,6 @@
 /* The find command.
 
-   Copyright (C) 2008-2013 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,6 @@
 #include "defs.h"
 #include "arch-utils.h"
 #include <ctype.h>
-#include "gdb_string.h"
 #include "gdbcmd.h"
 #include "value.h"
 #include "target.h"
@@ -69,14 +68,14 @@ parse_find_args (char *args, ULONGEST *max_countp,
   ULONGEST pattern_len;
   CORE_ADDR start_addr;
   ULONGEST search_space_len;
-  char *s = args;
+  const char *s = args;
   struct cleanup *old_cleanups;
   struct value *v;
 
   if (args == NULL)
     error (_("Missing search parameters."));
 
-  pattern_buf = xmalloc (pattern_buf_size);
+  pattern_buf = (gdb_byte *) xmalloc (pattern_buf_size);
   pattern_buf_end = pattern_buf;
   old_cleanups = make_cleanup (free_current_contents, &pattern_buf);
 
@@ -110,7 +109,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
            }
        }
 
-      s = skip_spaces (s);
+      s = skip_spaces_const (s);
     }
 
   /* Get the search range.  */
@@ -120,7 +119,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
 
   if (*s == ',')
     ++s;
-  s = skip_spaces (s);
+  s = skip_spaces_const (s);
 
   if (*s == '+')
     {
@@ -171,7 +170,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
       struct type *t;
       ULONGEST pattern_buf_size_need;
 
-      s = skip_spaces (s);
+      s = skip_spaces_const (s);
 
       v = parse_to_comma_and_eval (&s);
       t = value_type (v);
@@ -185,7 +184,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
          size_t current_offset = pattern_buf_end - pattern_buf;
 
          pattern_buf_size = pattern_buf_size_need * 2;
-         pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
+         pattern_buf = (gdb_byte *) xrealloc (pattern_buf, pattern_buf_size);
          pattern_buf_end = pattern_buf + current_offset;
        }
 
@@ -219,7 +218,7 @@ parse_find_args (char *args, ULONGEST *max_countp,
 
       if (*s == ',')
        ++s;
-      s = skip_spaces (s);
+      s = skip_spaces_const (s);
     }
 
   if (pattern_buf_end == pattern_buf)
This page took 0.027923 seconds and 4 git commands to generate.