GDB (xrefs)

/tmp/gdb-8.1/gdb/auxv.h
Go to the documentation of this file.
1 /* Auxiliary vector support for GDB, the GNU debugger.
2
3 Copyright (C) 2004-2018 Free Software Foundation, Inc.
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
9 the Free Software Foundation; either version 3 of the License, or
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
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #ifndef AUXV_H
21 #define AUXV_H
22
23 #include "target.h"
24
25 /* See "include/elf/common.h" for the definition of valid AT_* values. */
26
27 /* The default implementation of to_auxv_parse, used by the target
28 stack. */
29
30 extern int default_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
31 gdb_byte *endptr, CORE_ADDR *typep,
32 CORE_ADDR *valp);
33
34 /* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
35 Return 0 if *READPTR is already at the end of the buffer.
36 Return -1 if there is insufficient buffer for a whole entry.
37 Return 1 if an entry was read into *TYPEP and *VALP. */
38 extern int target_auxv_parse (struct target_ops *ops,
39 gdb_byte **readptr, gdb_byte *endptr,
40 CORE_ADDR *typep, CORE_ADDR *valp);
41
42 /* Extract the auxiliary vector entry with a_type matching MATCH.
43 Return zero if no such entry was found, or -1 if there was
44 an error getting the information. On success, return 1 after
45 storing the entry's value field in *VALP. */
46 extern int target_auxv_search (struct target_ops *ops,
47 CORE_ADDR match, CORE_ADDR *valp);
48
49 /* Print a description of a single AUXV entry on the specified file. */
50 enum auxv_format { AUXV_FORMAT_DEC, AUXV_FORMAT_HEX, AUXV_FORMAT_STR };
51
52 extern void fprint_auxv_entry (struct ui_file *file, const char *name,
53 const char *description,
54 enum auxv_format format, CORE_ADDR type,
55 CORE_ADDR val);
56
57 /* The default implementation of gdbarch_print_auxv_entry. */
58
59 extern void default_print_auxv_entry (struct gdbarch *gdbarch,
60 struct ui_file *file, CORE_ADDR type,
61 CORE_ADDR val);
62
63 /* Print the contents of the target's AUXV on the specified file. */
64 extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
65
66 extern target_xfer_partial_ftype memory_xfer_auxv;
67
68
69 #endif
gdbarch
Definition: gdbarch.c:127
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
default_print_auxv_entry
void default_print_auxv_entry(struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
Definition: auxv.c:445
target_auxv_search
int target_auxv_search(struct target_ops *ops, CORE_ADDR match, CORE_ADDR *valp)
Definition: auxv.c:375
ui_file
Definition: ui-file.h:26
fprint_target_auxv
int fprint_target_auxv(struct ui_file *file, struct target_ops *ops)
Definition: auxv.c:527
name
const char *const name
Definition: aarch64-tdep.c:76
target_auxv_parse
int target_auxv_parse(struct target_ops *ops, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
Definition: auxv.c:286
target_ops
Definition: target.h:412
default_auxv_parse
int default_auxv_parse(struct target_ops *ops, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
Definition: auxv.c:258
type
Definition: gdbtypes.h:749
target_xfer_partial_ftype
enum target_xfer_status target_xfer_partial_ftype(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
AUXV_FORMAT_STR
Definition: auxv.h:50
auxv_format
auxv_format
Definition: auxv.h:50
gdb_byte
bfd_byte gdb_byte
Definition: common-types.h:38
fprint_auxv_entry
void fprint_auxv_entry(struct ui_file *file, const char *name, const char *description, enum auxv_format format, CORE_ADDR type, CORE_ADDR val)
Definition: auxv.c:413
target.h
AUXV_FORMAT_HEX
Definition: auxv.h:50
AUXV_FORMAT_DEC
Definition: auxv.h:50
memory_xfer_auxv
target_xfer_partial_ftype memory_xfer_auxv