Commit | Line | Data |
---|---|---|
14ed0a8b RM |
1 | /* Auxiliary vector support for GDB, the GNU debugger. |
2 | ||
7b6bb8da | 3 | Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
0fb0cc75 | 4 | Free Software Foundation, Inc. |
14ed0a8b RM |
5 | |
6 | This file is part of GDB. | |
7 | ||
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 | |
a9762ec7 | 10 | the Free Software Foundation; either version 3 of the License, or |
14ed0a8b RM |
11 | (at your option) any later version. |
12 | ||
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. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
14ed0a8b RM |
20 | |
21 | #ifndef AUXV_H | |
22 | #define AUXV_H | |
23 | ||
81b92222 | 24 | #include "target.h" |
14ed0a8b | 25 | |
81b92222 | 26 | /* See "include/elf/common.h" for the definition of valid AT_* values. */ |
14ed0a8b | 27 | |
14ed0a8b RM |
28 | /* Read one auxv entry from *READPTR, not reading locations >= ENDPTR. |
29 | Return 0 if *READPTR is already at the end of the buffer. | |
30 | Return -1 if there is insufficient buffer for a whole entry. | |
31 | Return 1 if an entry was read into *TYPEP and *VALP. */ | |
32 | extern int target_auxv_parse (struct target_ops *ops, | |
36aa5e41 | 33 | gdb_byte **readptr, gdb_byte *endptr, |
14ed0a8b RM |
34 | CORE_ADDR *typep, CORE_ADDR *valp); |
35 | ||
36 | /* Extract the auxiliary vector entry with a_type matching MATCH. | |
37 | Return zero if no such entry was found, or -1 if there was | |
38 | an error getting the information. On success, return 1 after | |
39 | storing the entry's value field in *VALP. */ | |
40 | extern int target_auxv_search (struct target_ops *ops, | |
41 | CORE_ADDR match, CORE_ADDR *valp); | |
42 | ||
0e2de366 | 43 | /* Print the contents of the target's AUXV on the specified file. */ |
14ed0a8b RM |
44 | extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops); |
45 | ||
9f2982ff | 46 | extern LONGEST memory_xfer_auxv (struct target_ops *ops, |
81b92222 | 47 | enum target_object object, |
14ed0a8b | 48 | const char *annex, |
36aa5e41 AC |
49 | gdb_byte *readbuf, |
50 | const gdb_byte *writebuf, | |
14ed0a8b RM |
51 | ULONGEST offset, |
52 | LONGEST len); | |
53 | ||
54 | ||
55 | #endif |