|
Packit |
cdaae3 |
/*
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
Copyright (C) 2000,2004,2005 Silicon Graphics, Inc. All Rights Reserved.
|
|
Packit |
cdaae3 |
Portions Copyright (C) 2011 David Anderson. All Rights Reserved.
|
|
Packit |
cdaae3 |
|
|
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 |
|
|
Packit |
cdaae3 |
typedef struct Dwarf_Global_Context_s *Dwarf_Global_Context;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/*
|
|
Packit |
cdaae3 |
This struct contains header information for a set of pubnames.
|
|
Packit |
cdaae3 |
Essentially, they contain the context for a set of pubnames
|
|
Packit |
cdaae3 |
belonging to a compilation-unit.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
This is also used for the sgi-specific
|
|
Packit |
cdaae3 |
weaknames, typenames, varnames, funcnames data:
|
|
Packit |
cdaae3 |
the structs for those are incomplete and
|
|
Packit |
cdaae3 |
instances of this are used instead.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
Also used for DWARF3 .debug_pubtypes.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
These never refer to .debug_types, only to .debug_info.
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
*/
|
|
Packit |
cdaae3 |
struct Dwarf_Global_Context_s {
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Length in .debug_pubnames (etc) of a set of names for a
|
|
Packit |
cdaae3 |
compilation-unit. Dwarf_Word pu_length; The value is not made
|
|
Packit |
cdaae3 |
available outside libdwarf and not used inside, so no need to
|
|
Packit |
cdaae3 |
record it. */
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* For this context, size of a length. 4 or 8 */
|
|
Packit |
cdaae3 |
unsigned char pu_length_size;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* For this CU, size of the extension 0 except for dwarf2 extension
|
|
Packit |
cdaae3 |
64bit, in which case is 4. */
|
|
Packit |
cdaae3 |
unsigned char pu_extension_size;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Offset into .debug_info of the compilation-unit header (not DIE)
|
|
Packit |
cdaae3 |
for this set of pubnames. */
|
|
Packit |
cdaae3 |
Dwarf_Off pu_offset_of_cu_header;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Size of compilation-unit that these pubnames are in. */
|
|
Packit |
cdaae3 |
Dwarf_Unsigned pu_info_length;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
Dwarf_Debug pu_dbg;
|
|
Packit |
cdaae3 |
};
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* This struct contains information for a single pubname. */
|
|
Packit |
cdaae3 |
struct Dwarf_Global_s {
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Offset from the start of the corresponding compilation-unit of
|
|
Packit |
cdaae3 |
the DIE for the given pubname CU. */
|
|
Packit |
cdaae3 |
Dwarf_Off gl_named_die_offset_within_cu;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Points to the given pubname. */
|
|
Packit |
cdaae3 |
Dwarf_Small *gl_name;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Context for this pubname. */
|
|
Packit |
cdaae3 |
Dwarf_Global_Context gl_context;
|
|
Packit |
cdaae3 |
};
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
int _dwarf_internal_get_pubnames_like_data(Dwarf_Debug dbg,
|
|
Packit |
cdaae3 |
Dwarf_Small *
|
|
Packit |
cdaae3 |
section_data_ptr,
|
|
Packit |
cdaae3 |
Dwarf_Unsigned
|
|
Packit |
cdaae3 |
section_length,
|
|
Packit |
cdaae3 |
Dwarf_Global ** globals,
|
|
Packit |
cdaae3 |
Dwarf_Signed * return_count,
|
|
Packit |
cdaae3 |
Dwarf_Error * error,
|
|
Packit |
cdaae3 |
int context_code,
|
|
Packit |
cdaae3 |
int global_code,
|
|
Packit |
cdaae3 |
int length_err_num,
|
|
Packit |
cdaae3 |
int version_err_num);
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
void
|
|
Packit |
cdaae3 |
_dwarf_internal_globals_dealloc( Dwarf_Debug dbg, Dwarf_Global *dwgl,
|
|
Packit |
cdaae3 |
Dwarf_Signed count,
|
|
Packit |
cdaae3 |
int context_code,
|
|
Packit |
cdaae3 |
int global_code,
|
|
Packit |
cdaae3 |
int list_code);
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#ifdef __sgi /* __sgi should only be defined for IRIX/MIPS. */
|
|
Packit |
cdaae3 |
void _dwarf_fix_up_offset_irix(Dwarf_Debug dbg,
|
|
Packit |
cdaae3 |
Dwarf_Unsigned *varp,
|
|
Packit |
cdaae3 |
char *caller_site_name);
|
|
Packit |
cdaae3 |
#define FIX_UP_OFFSET_IRIX_BUG(ldbg,var,name) _dwarf_fix_up_offset_irix(ldbg,&var,name)
|
|
Packit |
cdaae3 |
#else /* ! __sgi */
|
|
Packit |
cdaae3 |
#define FIX_UP_OFFSET_IRIX_BUG(ldbg,var,name)
|
|
Packit |
cdaae3 |
#endif /* __sgi */
|
|
Packit |
cdaae3 |
|