|
Packit |
cdaae3 |
/*
|
|
Packit |
cdaae3 |
Copyright (C) 2017-2017 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 of the GNU General Public License as
|
|
Packit |
cdaae3 |
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 General Public License along
|
|
Packit |
cdaae3 |
with this program; if not, write the Free Software Foundation, Inc., 51
|
|
Packit |
cdaae3 |
Franklin Street - Fifth Floor, Boston MA 02110-1301, USA.
|
|
Packit |
cdaae3 |
*/
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#ifndef SECTION_BITMAPS_H_INCLUDED
|
|
Packit |
cdaae3 |
#define SECTION_BITMAPS_H_INCLUDED
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* section_bitmaps.h and .c actually involved bits,
|
|
Packit |
cdaae3 |
bit shifting, and bit masks,
|
|
Packit |
cdaae3 |
but now the 'maps' are simple byte arrays.
|
|
Packit |
cdaae3 |
See reloc_map and section_map in dwarfdump.c */
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Value is one of the DW_HDR_DEBUG_* names. */
|
|
Packit |
cdaae3 |
struct section_map_s {
|
|
Packit |
cdaae3 |
const char *name;
|
|
Packit |
cdaae3 |
unsigned value;
|
|
Packit |
cdaae3 |
};
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
extern struct section_map_s map_sectnames[] ;
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_INFO 1
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_INFO_DWO 2
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_LINE 3
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_LINE_DWO 4
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_PUBNAMES 5
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_ABBREV 6
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_ABBREV_DWO 7
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_ARANGES 8
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_FRAME 9
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_LOC 10
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_LOCLISTS 11
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_LOCLISTS_DWO 12
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_RANGES 13
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_RNGLISTS 14
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_RNGLISTS_DWO 15
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_STR 16
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_STR_DWO 17
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_STR_OFFSETS 18
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_STR_OFFSETS_DWO 19
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_PUBTYPES 20
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_TYPES 21
|
|
Packit |
cdaae3 |
#define DW_HDR_TEXT 22
|
|
Packit |
cdaae3 |
#define DW_HDR_GDB_INDEX 23
|
|
Packit |
cdaae3 |
#define DW_HDR_EH_FRAME 24
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_MACINFO 25
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_MACRO 26
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_MACRO_DWO 27
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_NAMES 28
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_CU_INDEX 29
|
|
Packit |
cdaae3 |
#define DW_HDR_DEBUG_TU_INDEX 30
|
|
Packit |
cdaae3 |
#define DW_HDR_HEADER 31
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#define DW_HDR_ARRAY_SIZE 32
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Debug section names to be included in printing */
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_INFO ".debug_info"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_INFO_DWO ".debug_info.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_LINE ".debug_line"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_LINE_DWO ".debug_line.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_PUBNAMES ".debug_pubnames"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_ABBREV ".debug_abbrev"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_ABBREV_DWO ".debug_abbrev.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_ARANGES ".debug_aranges"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_FRAME ".debug_frame"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_LOC ".debug_loc"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_LOCLISTS ".debug_loclists"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_LOCLISTS_DWO ".debug_loclists.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_RANGES ".debug_ranges"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_RNGLISTS ".debug_rnglists"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_RNGLISTS_DWO ".debug_rnglists.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_STR ".debug_str"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_STR_DWO ".debug_str.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_STR_OFFSETS ".debug_str_offsets"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_STR_OFFSETS_DWO ".debug_str_offsets.dwo"
|
|
Packit |
cdaae3 |
/* obsolete SGI-only section was .debug_typenames */
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_PUBTYPES ".debug_pubtypes"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_TYPES ".debug_types"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_TEXT ".text"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_GDB_INDEX ".gdb_index"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_EH_FRAME ".eh_frame"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_SUP ".debug_sup"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_MACINFO ".debug_macinfo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_MACRO ".debug_macro"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_MACRO_DWO ".debug_macro.dwo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_NAMES ".debug_names"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_CU_INDEX ".debug_cu_index"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_DEBUG_TU_INDEX ".debug_tu_index"
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
/* Definitions for printing relocations. */
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_INFO 1
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_LINE 2
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_PUBNAMES 3
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_ABBREV 4
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_ARANGES 5
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_FRAME 6
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_LOC 7
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_LOCLISTS 8
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_RANGES 9
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_RNGLISTS 10
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_TYPES 11
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_STR_OFFSETS 12
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_PUBTYPES 13
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_GDB_INDEX 14
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_EH_FRAME 15
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_SUP 16
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_MACINFO 17
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_MACRO 18
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_DEBUG_NAMES 19
|
|
Packit |
cdaae3 |
#define DW_SECTION_REL_ARRAY_SIZE 20
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_INFO ".rela.debug_info"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_LINE ".rela.debug_line"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_PUBNAMES ".rela.debug_pubnames"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_ABBREV ".rela.debug_abbrev"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_ARANGES ".rela.debug_aranges"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_FRAME ".rela.debug_frame"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_LOC ".rela.debug_loc"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_LOCLISTS ".rela.debug_loclists"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_RANGES ".rela.debug_ranges"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_RNGLISTS ".rela.debug_rnglists"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_TYPES ".rela.debug_types"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_STR_OFFSETS ".rela.debug_str_offsets"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_PUBTYPES ".rela.debug_pubtypes"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_GDB_INDEX ".rela.debug_gdb_index"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_EH_FRAME ".rela.eh_frame"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_SUP ".rela.debug_sup"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_MACINFO ".rela.debug_macinfo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_MACRO ".rela.debug_macro"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_RELA_DEBUG_NAMES ".rela.debug_names"
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_INFO ".rel.debug_info"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_LINE ".rel.debug_line"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_PUBNAMES ".rel.debug_pubnames"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_ABBREV ".rel.debug_abbrev"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_ARANGES ".rel.debug_aranges"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_FRAME ".rel.debug_frame"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_LOC ".rel.debug_loc"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_LOCLISTS ".rel.debug_loclists"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_RANGES ".rel.debug_ranges"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_RNGLISTS ".rel.debug_rnglists"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_TYPES ".rel.debug_types"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_STR_OFFSETS ".rel.debug_str_offsets"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_PUBTYPES ".rel.debug_pubtypes"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_GDB_INDEX ".rel.debug_gdb_index"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_EH_FRAME ".rel.eh_frame"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_SUP ".rel.debug_sup"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_MACINFO ".rel.debug_macinfo"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_MACRO ".rel.debug_macro"
|
|
Packit |
cdaae3 |
#define DW_SECTNAME_REL_DEBUG_NAMES ".rel.debug_names"
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
boolean section_name_is_debug_and_wanted(const char *section_name,char *secmap);
|
|
Packit |
cdaae3 |
void set_all_section_defaults(char *m);
|
|
Packit |
cdaae3 |
void set_all_sections_on(char *m);
|
|
Packit |
cdaae3 |
void set_all_reloc_sections_on(char *m);
|
|
Packit |
cdaae3 |
boolean any_section_header_to_print(char *section_map);
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
|
|
Packit |
cdaae3 |
#endif /* SECTION_BITMAPS_H_INCLUDED*/
|