xref: /dflybsd-src/contrib/gdb-7/gdb/xml-syscall.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* Functions that provide the mechanism to parse a syscall XML file
25796c8dcSSimon Schubert    and get its values.
35796c8dcSSimon Schubert 
4*ef5ccd6cSJohn Marino    Copyright (C) 2009-2013 Free Software Foundation, Inc.
55796c8dcSSimon Schubert 
65796c8dcSSimon Schubert    This file is part of GDB.
75796c8dcSSimon Schubert 
85796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
95796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
105796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
115796c8dcSSimon Schubert    (at your option) any later version.
125796c8dcSSimon Schubert 
135796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
145796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
155796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
165796c8dcSSimon Schubert    GNU General Public License for more details.
175796c8dcSSimon Schubert 
185796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
195796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
205796c8dcSSimon Schubert 
215796c8dcSSimon Schubert #ifndef XML_SYSCALL_H
225796c8dcSSimon Schubert #define XML_SYSCALL_H 1
235796c8dcSSimon Schubert 
245796c8dcSSimon Schubert /* Function used to set the name of the file which contains
255796c8dcSSimon Schubert    information about the system calls present in the current
265796c8dcSSimon Schubert    architecture.
275796c8dcSSimon Schubert 
285796c8dcSSimon Schubert    This function *should* be called before anything else, otherwise
295796c8dcSSimon Schubert    GDB won't be able to find the correct XML file to open and get
305796c8dcSSimon Schubert    the syscalls definitions.  */
315796c8dcSSimon Schubert 
325796c8dcSSimon Schubert void set_xml_syscall_file_name (const char *name);
335796c8dcSSimon Schubert 
345796c8dcSSimon Schubert /* Function that retrieves the syscall name corresponding to the given
355796c8dcSSimon Schubert    number.  It puts the requested information inside 'struct syscall'.  */
365796c8dcSSimon Schubert 
375796c8dcSSimon Schubert void get_syscall_by_number (int syscall_number, struct syscall *s);
385796c8dcSSimon Schubert 
395796c8dcSSimon Schubert /* Function that retrieves the syscall number corresponding to the given
405796c8dcSSimon Schubert    name.  It puts the requested information inside 'struct syscall'.  */
415796c8dcSSimon Schubert 
425796c8dcSSimon Schubert void get_syscall_by_name (const char *syscall_name, struct syscall *s);
435796c8dcSSimon Schubert 
445796c8dcSSimon Schubert /* Function used to retrieve the list of syscalls in the system.  This list
455796c8dcSSimon Schubert    is returned as an array of strings.  Returns the list of syscalls in the
465796c8dcSSimon Schubert    system, or NULL otherwise.  */
475796c8dcSSimon Schubert 
485796c8dcSSimon Schubert const char **get_syscall_names (void);
495796c8dcSSimon Schubert 
505796c8dcSSimon Schubert #endif /* XML_SYSCALL_H */
51