15be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project/* dwwrf.h - DWARF support header file 25be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project Copyright 2005 35be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project Free Software Foundation, Inc. 45be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 55be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectThis file is part of GNU Binutils. 65be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 75be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectThis program is free software; you can redistribute it and/or modify 85be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectit under the terms of the GNU General Public License as published by 95be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectthe Free Software Foundation; either version 2 of the License, or 105be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project(at your option) any later version. 115be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 125be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectThis program is distributed in the hope that it will be useful, 135be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectbut WITHOUT ANY WARRANTY; without even the implied warranty of 145be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 155be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectGNU General Public License for more details. 165be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 175be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectYou should have received a copy of the GNU General Public License 185be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectalong with this program; if not, write to the Free Software 195be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source ProjectFoundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 205be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 215be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project#include "dwarf2.h" 225be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 235be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projecttypedef unsigned long dwarf_vma; 245be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projecttypedef unsigned long dwarf_size_type; 255be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 265be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectstruct dwarf_section 275be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project{ 285be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project const char *name; 295be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned char *start; 305be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project dwarf_vma address; 315be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project dwarf_size_type size; 325be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project}; 335be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 345be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project/* A structure containing the name of a debug section 355be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project and a pointer to a function that can decode it. */ 365be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectstruct dwarf_section_display 375be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project{ 385be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project struct dwarf_section section; 395be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project int (*display) (struct dwarf_section *, void *); 405be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int relocate : 1; 415be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int eh_frame : 1; 425be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project}; 435be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 445be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectenum dwarf_section_display_enum { 455be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project abbrev = 0, 465be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project aranges, 475be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project frame, 485be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project info, 495be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project line, 505be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project pubnames, 515be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project eh_frame, 525be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project macinfo, 535be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project str, 545be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project loc, 555be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project pubtypes, 565be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project ranges, 575be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project static_func, 585be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project static_vars, 595be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project types, 605be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project weaknames, 615be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project max 625be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project}; 635be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 645be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern struct dwarf_section_display debug_displays []; 655be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 665be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project/* This structure records the information that 675be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project we extract from the.debug_info section. */ 685be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projecttypedef struct 695be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project{ 705be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int pointer_size; 715be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned long cu_offset; 725be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned long base_address; 735be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project /* This is an array of offsets to the location list table. */ 745be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned long *loc_offsets; 755be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project int *have_frame_base; 765be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int num_loc_offsets; 775be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int max_loc_offsets; 785be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project#ifdef SORT_LOCATION_LIST_OFFSETS 795be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned long last_loc_offset; /* used to determine whether loc offsets are sorted */ 805be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project#endif 815be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned long *range_lists; 825be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int num_range_lists; 835be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project unsigned int max_range_lists; 845be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project} 855be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectdebug_info; 865be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 875be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern dwarf_vma (*byte_get) (unsigned char *, int); 885be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern dwarf_vma byte_get_little_endian (unsigned char *, int); 895be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern dwarf_vma byte_get_big_endian (unsigned char *, int); 905be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 915be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern dwarf_vma eh_addr_size; 925be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int is_relocatable; 935be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 945be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_info; 955be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_abbrevs; 965be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_lines; 975be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_pubnames; 985be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_aranges; 995be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_ranges; 1005be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_frames; 1015be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_frames_interp; 1025be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_macinfo; 1035be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_str; 1045be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int do_debug_loc; 1055be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 1065be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern int load_debug_section (enum dwarf_section_display_enum, 1075be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project void *); 1085be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern void free_debug_section (enum dwarf_section_display_enum); 1095be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 1105be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern void free_debug_memory (void); 1115be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 1125be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern void base_value_pair_hook(void *data, int size, 1135be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project int base, int begin, int end); 1145be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 1155be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern void value_hook(void *data, int size, int val); 1165be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 1175be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern void signed_value_hook(void *data, 1185be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project int pointer_size, 1195be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project int is_signed, 1205be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project int val); 1215be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Project 1225be48c0aa50b576ea678d9298b5207c9e8854224The Android Open Source Projectextern void init_dwarf_variables(void); 123