/* Auxiliary vector support for GDB, the GNU debugger.
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ Copyright (C) 2004-2016 Free Software Foundation, Inc.
This file is part of GDB.
#include "command.h"
#include "inferior.h"
#include "valprint.h"
-#include "gdb_assert.h"
#include "gdbcore.h"
#include "observer.h"
#include "filestuff.h"
struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
size_t ptr_size = TYPE_LENGTH (ptr_type);
size_t auxv_pair_size = 2 * ptr_size;
- gdb_byte *ptr_buf = alloca (ptr_size);
+ gdb_byte *ptr_buf = (gdb_byte *) alloca (ptr_size);
LONGEST retval;
size_t block;
target_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
{
+ struct gdbarch *gdbarch = target_gdbarch();
+
+ if (gdbarch_auxv_parse_p (gdbarch))
+ return gdbarch_auxv_parse (gdbarch, readptr, endptr, typep, valp);
+
return current_target.to_auxv_parse (¤t_target, readptr, endptr,
typep, valp);
}
{
struct auxv_info *info;
- info = inferior_data (inf, auxv_inferior_data);
+ info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
if (info != NULL)
{
xfree (info->data);
struct auxv_info *info;
struct inferior *inf = current_inferior ();
- info = inferior_data (inf, auxv_inferior_data);
+ info = (struct auxv_info *) inferior_data (inf, auxv_inferior_data);
if (info == NULL)
{
info = XCNEW (struct auxv_info);