15796c8dcSSimon Schubert /* Auxiliary vector support for GDB, the GNU debugger. 25796c8dcSSimon Schubert 3*ef5ccd6cSJohn Marino Copyright (C) 2004-2013 Free Software Foundation, Inc. 45796c8dcSSimon Schubert 55796c8dcSSimon Schubert This file is part of GDB. 65796c8dcSSimon Schubert 75796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 85796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 95796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 105796c8dcSSimon Schubert (at your option) any later version. 115796c8dcSSimon Schubert 125796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 135796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 145796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 155796c8dcSSimon Schubert GNU General Public License for more details. 165796c8dcSSimon Schubert 175796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 185796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 195796c8dcSSimon Schubert 205796c8dcSSimon Schubert #ifndef AUXV_H 215796c8dcSSimon Schubert #define AUXV_H 225796c8dcSSimon Schubert 235796c8dcSSimon Schubert #include "target.h" 245796c8dcSSimon Schubert 255796c8dcSSimon Schubert /* See "include/elf/common.h" for the definition of valid AT_* values. */ 265796c8dcSSimon Schubert 275796c8dcSSimon Schubert /* Read one auxv entry from *READPTR, not reading locations >= ENDPTR. 285796c8dcSSimon Schubert Return 0 if *READPTR is already at the end of the buffer. 295796c8dcSSimon Schubert Return -1 if there is insufficient buffer for a whole entry. 305796c8dcSSimon Schubert Return 1 if an entry was read into *TYPEP and *VALP. */ 315796c8dcSSimon Schubert extern int target_auxv_parse (struct target_ops *ops, 325796c8dcSSimon Schubert gdb_byte **readptr, gdb_byte *endptr, 335796c8dcSSimon Schubert CORE_ADDR *typep, CORE_ADDR *valp); 345796c8dcSSimon Schubert 355796c8dcSSimon Schubert /* Extract the auxiliary vector entry with a_type matching MATCH. 365796c8dcSSimon Schubert Return zero if no such entry was found, or -1 if there was 375796c8dcSSimon Schubert an error getting the information. On success, return 1 after 385796c8dcSSimon Schubert storing the entry's value field in *VALP. */ 395796c8dcSSimon Schubert extern int target_auxv_search (struct target_ops *ops, 405796c8dcSSimon Schubert CORE_ADDR match, CORE_ADDR *valp); 415796c8dcSSimon Schubert 425796c8dcSSimon Schubert /* Print the contents of the target's AUXV on the specified file. */ 435796c8dcSSimon Schubert extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops); 445796c8dcSSimon Schubert 45cf7f2e2dSJohn Marino extern LONGEST memory_xfer_auxv (struct target_ops *ops, 465796c8dcSSimon Schubert enum target_object object, 475796c8dcSSimon Schubert const char *annex, 485796c8dcSSimon Schubert gdb_byte *readbuf, 495796c8dcSSimon Schubert const gdb_byte *writebuf, 505796c8dcSSimon Schubert ULONGEST offset, 515796c8dcSSimon Schubert LONGEST len); 525796c8dcSSimon Schubert 535796c8dcSSimon Schubert 545796c8dcSSimon Schubert #endif 55