[gdb/testsuite] Add untested case in gdb.gdb/complaints.exp
[deliverable/binutils-gdb.git] / gdb / auxv.h
CommitLineData
14ed0a8b
RM
1/* Auxiliary vector support for GDB, the GNU debugger.
2
3666a048 3 Copyright (C) 2004-2021 Free Software Foundation, Inc.
14ed0a8b
RM
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
14ed0a8b
RM
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
14ed0a8b
RM
19
20#ifndef AUXV_H
21#define AUXV_H
22
81b92222 23#include "target.h"
14ed0a8b 24
81b92222 25/* See "include/elf/common.h" for the definition of valid AT_* values. */
14ed0a8b 26
8de71aab 27/* The default implementation of to_auxv_parse, used by the target
206c98a6 28 stack.
8de71aab 29
206c98a6
KR
30 Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
31 Return 0 if *READPTR is already at the end of the buffer.
32 Return -1 if there is insufficient buffer for a whole entry.
33 Return 1 if an entry was read into *TYPEP and *VALP. */
8de71aab
TT
34extern int default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
35 gdb_byte *endptr, CORE_ADDR *typep,
36 CORE_ADDR *valp);
37
206c98a6
KR
38/* The SVR4 psABI implementation of to_auxv_parse, that uses an int to
39 store the type rather than long as assumed by the default parser.
40
41 Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
42 Return 0 if *READPTR is already at the end of the buffer.
43 Return -1 if there is insufficient buffer for a whole entry.
44 Return 1 if an entry was read into *TYPEP and *VALP. */
45extern int svr4_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr,
46 gdb_byte *endptr, CORE_ADDR *typep,
47 CORE_ADDR *valp);
48
14ed0a8b
RM
49/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
50 Return 0 if *READPTR is already at the end of the buffer.
51 Return -1 if there is insufficient buffer for a whole entry.
52 Return 1 if an entry was read into *TYPEP and *VALP. */
f6ac5f3d 53extern int target_auxv_parse (gdb_byte **readptr, gdb_byte *endptr,
14ed0a8b
RM
54 CORE_ADDR *typep, CORE_ADDR *valp);
55
56/* Extract the auxiliary vector entry with a_type matching MATCH.
57 Return zero if no such entry was found, or -1 if there was
58 an error getting the information. On success, return 1 after
59 storing the entry's value field in *VALP. */
60extern int target_auxv_search (struct target_ops *ops,
61 CORE_ADDR match, CORE_ADDR *valp);
62
2faa3447
JB
63/* Print a description of a single AUXV entry on the specified file. */
64enum auxv_format { AUXV_FORMAT_DEC, AUXV_FORMAT_HEX, AUXV_FORMAT_STR };
65
66extern void fprint_auxv_entry (struct ui_file *file, const char *name,
67 const char *description,
68 enum auxv_format format, CORE_ADDR type,
69 CORE_ADDR val);
70
71/* The default implementation of gdbarch_print_auxv_entry. */
72
73extern void default_print_auxv_entry (struct gdbarch *gdbarch,
74 struct ui_file *file, CORE_ADDR type,
75 CORE_ADDR val);
76
0e2de366 77/* Print the contents of the target's AUXV on the specified file. */
14ed0a8b
RM
78extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
79
4ac248ca 80extern target_xfer_partial_ftype memory_xfer_auxv;
14ed0a8b
RM
81
82
83#endif
This page took 1.803584 seconds and 4 git commands to generate.