Blame libdwarf/dwarf_error.h

Packit cdaae3
/*
Packit cdaae3
Packit cdaae3
  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved.
Packit cdaae3
  Portions Copyright (C) 2011 David Anderson. All Rights Reserved.
Packit cdaae3
Packit cdaae3
  This program is free software; you can redistribute it and/or modify it
Packit cdaae3
  under the terms of version 2.1 of the GNU Lesser General Public License
Packit cdaae3
  as published by the Free Software Foundation.
Packit cdaae3
Packit cdaae3
  This program is distributed in the hope that it would be useful, but
Packit cdaae3
  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit cdaae3
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit cdaae3
Packit cdaae3
  Further, this software is distributed without any warranty that it is
Packit cdaae3
  free of the rightful claim of any third person regarding infringement
Packit cdaae3
  or the like.  Any license provided herein, whether implied or
Packit cdaae3
  otherwise, applies only to this software file.  Patent licenses, if
Packit cdaae3
  any, provided herein do not apply to combinations of this program with
Packit cdaae3
  other software, or any other product whatsoever.
Packit cdaae3
Packit cdaae3
  You should have received a copy of the GNU Lesser General Public
Packit cdaae3
  License along with this program; if not, write the Free Software
Packit cdaae3
  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
Packit cdaae3
  USA.
Packit cdaae3
Packit cdaae3
*/
Packit cdaae3
Packit cdaae3
Packit cdaae3
Packit cdaae3
void _dwarf_error(Dwarf_Debug dbg, Dwarf_Error * error,
Packit cdaae3
    Dwarf_Sword errval);
Packit cdaae3
Packit cdaae3
#define DE_STANDARD 0 /* Normal alloc attached to dbg. */
Packit cdaae3
#define DE_STATIC 1   /* Using global static var */
Packit cdaae3
#define DE_MALLOC 2   /* Using malloc space */
Packit cdaae3
struct Dwarf_Error_s {
Packit cdaae3
    Dwarf_Sword er_errval;
Packit cdaae3
Packit cdaae3
    /*  If non-zero the Dwarf_Error_s struct is not malloc'd.
Packit cdaae3
        To aid when malloc returns NULL.
Packit cdaae3
        If zero a normal dwarf_dealloc will work.
Packit cdaae3
        er_static_alloc only accessed by dwarf_alloc.c.
Packit cdaae3
Packit cdaae3
        If er_static_alloc is 1 in a Dwarf_Error_s
Packit cdaae3
        struct (set by libdwarf) and client code accidentally
Packit cdaae3
        turns that 0 to zero through a wild
Packit cdaae3
        pointer reference (the field is hidden
Packit cdaae3
        from clients...) then chaos will
Packit cdaae3
        eventually follow.
Packit cdaae3
    */
Packit cdaae3
    int er_static_alloc;
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
extern struct Dwarf_Error_s _dwarf_failsafe_error;
Packit cdaae3
Packit cdaae3