diff options
author | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2017-09-26 14:21:47 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2017-10-06 14:41:37 +0200 |
commit | 20aa8539966069195ace5f909e6f5cf8b4e56e2c (patch) | |
tree | 11b61cc49b4d3b596b26eacc7f1f73f6edfc7296 /dwarflint/files.hh | |
parent | 129765d3887ab0c7ce9ecb58eb836e8bc739239c (diff) | |
download | elfutils-20aa8539966069195ace5f909e6f5cf8b4e56e2c.tar.gz |
Add dwarflint/ from origin/dwarf branch
Signed-off-by: Djordje Todorovic <djordje.todorovic@rt-rk.com>
Diffstat (limited to 'dwarflint/files.hh')
-rw-r--r-- | dwarflint/files.hh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dwarflint/files.hh b/dwarflint/files.hh new file mode 100644 index 00000000..a7baa3b4 --- /dev/null +++ b/dwarflint/files.hh @@ -0,0 +1,39 @@ +/* Pedantic checking of DWARF files. + Copyright (C) 2011 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _DWARFLINT_FILES_H_ +#define _DWARFLINT_FILES_H_ + +#include "../libdwfl/libdwfl.h" +#include "../libdw/c++/dwarf" + +// The functions in this module do their own error handling, and throw +// std::runtime_error with descriptive error message on error. +namespace files +{ + int open (char const *fname); + + Dwfl *open_dwfl () + __attribute__ ((nonnull, malloc)); + + Dwarf *open_dwarf (Dwfl *dwfl, char const *fname, int fd) + __attribute__ ((nonnull, malloc)); + + elfutils::dwarf open_dwarf (Dwarf *dw); +} + +#endif /* _DWARFLINT_FILES_H_ */ |