149d3bc91SRichard Lowe /*
249d3bc91SRichard Lowe 
307dc1947SRichard Lowe   Copyright (C) 2000,2004 Silicon Graphics, Inc.  All Rights Reserved.
449d3bc91SRichard Lowe 
549d3bc91SRichard Lowe   This program is free software; you can redistribute it and/or modify it
6*4d9fdb46SRobert Mustacchi   under the terms of version 2.1 of the GNU Lesser General Public License
749d3bc91SRichard Lowe   as published by the Free Software Foundation.
849d3bc91SRichard Lowe 
949d3bc91SRichard Lowe   This program is distributed in the hope that it would be useful, but
1049d3bc91SRichard Lowe   WITHOUT ANY WARRANTY; without even the implied warranty of
11*4d9fdb46SRobert Mustacchi   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1249d3bc91SRichard Lowe 
1349d3bc91SRichard Lowe   Further, this software is distributed without any warranty that it is
14*4d9fdb46SRobert Mustacchi   free of the rightful claim of any third person regarding infringement
15*4d9fdb46SRobert Mustacchi   or the like.  Any license provided herein, whether implied or
1649d3bc91SRichard Lowe   otherwise, applies only to this software file.  Patent licenses, if
17*4d9fdb46SRobert Mustacchi   any, provided herein do not apply to combinations of this program with
18*4d9fdb46SRobert Mustacchi   other software, or any other product whatsoever.
1949d3bc91SRichard Lowe 
2007dc1947SRichard Lowe   You should have received a copy of the GNU Lesser General Public
2107dc1947SRichard Lowe   License along with this program; if not, write the Free Software
2207dc1947SRichard Lowe   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
2349d3bc91SRichard Lowe   USA.
2449d3bc91SRichard Lowe 
2549d3bc91SRichard Lowe */
2649d3bc91SRichard Lowe 
2749d3bc91SRichard Lowe 
2849d3bc91SRichard Lowe 
2949d3bc91SRichard Lowe 
3049d3bc91SRichard Lowe /* Handle error passing in the name of the Dwarf_P_Debug
3149d3bc91SRichard Lowe    User must supply {} around the macro.
3249d3bc91SRichard Lowe    Putting the {} here leads to macro uses that don't look like C.
3349d3bc91SRichard Lowe    The error argument to dwarf_error is hard coded here as 'error'
3449d3bc91SRichard Lowe */
3549d3bc91SRichard Lowe #define DWARF_P_DBG_ERROR(dbg,errval,retval) \
36*4d9fdb46SRobert Mustacchi     _dwarf_p_error(dbg,error,errval); return(retval);
3749d3bc91SRichard Lowe 
3849d3bc91SRichard Lowe struct Dwarf_Error_s {
39*4d9fdb46SRobert Mustacchi     Dwarf_Signed er_errval;
4049d3bc91SRichard Lowe };
4149d3bc91SRichard Lowe 
4249d3bc91SRichard Lowe void _dwarf_p_error(Dwarf_P_Debug dbg, Dwarf_Error * error,
43*4d9fdb46SRobert Mustacchi     Dwarf_Unsigned errval);
44