1 /* Auxiliary vector support for GDB, the GNU debugger.
3 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
4 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 /* See "include/elf/common.h" for the definition of valid AT_* values. */
27 /* Avoid miscellaneous includes in this file, so that it can be
28 included by nm-*.h for the procfs_xfer_auxv decl if that is
29 used in NATIVE_XFER_AUXV. */
30 struct target_ops
; /* Forward declaration. */
33 /* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
34 Return 0 if *READPTR is already at the end of the buffer.
35 Return -1 if there is insufficient buffer for a whole entry.
36 Return 1 if an entry was read into *TYPEP and *VALP. */
37 extern int target_auxv_parse (struct target_ops
*ops
,
38 gdb_byte
**readptr
, gdb_byte
*endptr
,
39 CORE_ADDR
*typep
, CORE_ADDR
*valp
);
41 /* Extract the auxiliary vector entry with a_type matching MATCH.
42 Return zero if no such entry was found, or -1 if there was
43 an error getting the information. On success, return 1 after
44 storing the entry's value field in *VALP. */
45 extern int target_auxv_search (struct target_ops
*ops
,
46 CORE_ADDR match
, CORE_ADDR
*valp
);
48 /* Print the contents of the target's AUXV on the specified file. */
49 extern int fprint_target_auxv (struct ui_file
*file
, struct target_ops
*ops
);
52 /* This function is called like a to_xfer_partial hook,
53 but must be called with TARGET_OBJECT_AUXV.
54 It handles access via /proc/PID/auxv, which is the common method.
55 This function is appropriate for doing:
56 #define NATIVE_XFER_AUXV procfs_xfer_auxv
57 for a native target that uses inftarg.c's child_xfer_partial hook. */
59 extern LONGEST
procfs_xfer_auxv (struct target_ops
*ops
,
60 int /* enum target_object */ object
,
63 const gdb_byte
*writebuf
,
This page took 0.029973 seconds and 4 git commands to generate.