the auxv type field as a parameter. */
static int
-generic_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr,
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp,
+generic_auxv_parse (struct gdbarch *gdbarch, const gdb_byte **readptr,
+ const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp,
int sizeof_auxv_type)
{
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
const int sizeof_auxv_val = ptr_type->length ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- gdb_byte *ptr = *readptr;
+ const gdb_byte *ptr = *readptr;
if (endptr == ptr)
return 0;
/* See auxv.h. */
int
-default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
+default_auxv_parse (struct target_ops *ops, const gdb_byte **readptr,
+ const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
{
struct gdbarch *gdbarch = target_gdbarch ();
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
/* See auxv.h. */
int
-svr4_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr,
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
+svr4_auxv_parse (struct gdbarch *gdbarch, const gdb_byte **readptr,
+ const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
{
struct type *int_type = builtin_type (gdbarch)->builtin_int;
const int sizeof_auxv_type = int_type->length ();
Return -1 if there is insufficient buffer for a whole entry.
Return 1 if an entry was read into *TYPEP and *VALP. */
int
-target_auxv_parse (gdb_byte **readptr,
- gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
+target_auxv_parse (const gdb_byte **readptr, const gdb_byte *endptr,
+ CORE_ADDR *typep, CORE_ADDR *valp)
{
struct gdbarch *gdbarch = target_gdbarch();
if (!info->data)
return -1;
- gdb_byte *data = info->data->data ();
- gdb_byte *ptr = data;
+ const gdb_byte *data = info->data->data ();
+ const gdb_byte *ptr = data;
size_t len = info->data->size ();
while (1)
if (!info->data)
return -1;
- gdb_byte *data = info->data->data ();
- gdb_byte *ptr = data;
+ const gdb_byte *data = info->data->data ();
+ const gdb_byte *ptr = data;
size_t len = info->data->size ();
while (target_auxv_parse (&ptr, data + len, &type, &val) > 0)