/* The find command.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "arch-utils.h"
#include <ctype.h>
-#include "gdb_string.h"
#include "gdbcmd.h"
#include "value.h"
#include "target.h"
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);
}
}
- s = skip_spaces (s);
+ s = skip_spaces_const (s);
}
/* Get the search range. */
if (*s == ',')
++s;
- s = skip_spaces (s);
+ s = skip_spaces_const (s);
if (*s == '+')
{
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);
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;
}
if (*s == ',')
++s;
- s = skip_spaces (s);
+ s = skip_spaces_const (s);
}
if (pattern_buf_end == pattern_buf)