1 #ifndef DWARF_XU_INDEX_H
2 #define DWARF_XU_INDEX_H
3 /*
4 
5   Copyright (C) 2014-2014 David Anderson. All Rights Reserved.
6 
7   This program is free software; you can redistribute it and/or modify it
8   under the terms of version 2.1 of the GNU Lesser General Public License
9   as published by the Free Software Foundation.
10 
11   This program is distributed in the hope that it would be useful, but
12   WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 
15   Further, this software is distributed without any warranty that it is
16   free of the rightful claim of any third person regarding infringement
17   or the like.  Any license provided herein, whether implied or
18   otherwise, applies only to this software file.  Patent licenses, if
19   any, provided herein do not apply to combinations of this program with
20   other software, or any other product whatsoever.
21 
22   You should have received a copy of the GNU Lesser General Public
23   License along with this program; if not, write the Free Software
24   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
25   USA.
26 
27 
28 */
29 
30 
31 
32 /*  The following is based on
33     The gdb online documentation at
34     https://gcc.gnu.org/wiki/DebugFissionDWP
35     and the draft DWARF5 standard.
36 */
37 
38 
39 struct Dwarf_Xu_Index_Header_s {
40     Dwarf_Debug      gx_dbg;
41     Dwarf_Small    * gx_section_data;
42     Dwarf_Unsigned   gx_section_length;
43 
44     Dwarf_Unsigned   gx_version;
45     Dwarf_Unsigned   gx_column_count_sections;  /* N */
46     Dwarf_Unsigned   gx_units_in_index;         /* U */
47     Dwarf_Unsigned   gx_slots_in_hash;          /* S */
48     Dwarf_Unsigned   gx_hash_table_offset;
49     Dwarf_Unsigned   gx_index_table_offset;
50     Dwarf_Unsigned   gx_section_offsets_headerline_offset;
51     Dwarf_Unsigned   gx_section_offsets_offset;
52     Dwarf_Unsigned   gx_section_sizes_offset;
53     /*  Taken from gx_section_offsets_headerline, these
54         are the section ids. DW_SECT_* (0 - N-1) */
55     unsigned long    gx_section_id[9];
56 
57     /* "tu" or "cu" without the quotes, of course. NUL terminated.  */
58     char             gx_type[4];
59 
60     /* Do not free gx_section_name. */
61     const char     * gx_section_name;
62 };
63 
64 #endif  /* DWARF_XU_INDEX_H */
65