xref: /illumos-gate/usr/src/lib/libdwarf/common/dwarf_arange.h (revision 4d9fdb46b215739778ebc12079842c9905586999)
1bc1f688bSRobert Mustacchi /*
2bc1f688bSRobert Mustacchi 
3bc1f688bSRobert Mustacchi    Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved.
4*4d9fdb46SRobert Mustacchi    Portions Copyright (C) 2011 David Anderson. All Rights Reserved.
5bc1f688bSRobert Mustacchi 
6bc1f688bSRobert Mustacchi    This program is free software; you can redistribute it and/or modify it
7bc1f688bSRobert Mustacchi    under the terms of version 2.1 of the GNU Lesser General Public License
8bc1f688bSRobert Mustacchi    as published by the Free Software Foundation.
9bc1f688bSRobert Mustacchi 
10bc1f688bSRobert Mustacchi    This program is distributed in the hope that it would be useful, but
11bc1f688bSRobert Mustacchi    WITHOUT ANY WARRANTY; without even the implied warranty of
12bc1f688bSRobert Mustacchi    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13bc1f688bSRobert Mustacchi 
14bc1f688bSRobert Mustacchi    Further, this software is distributed without any warranty that it is
15bc1f688bSRobert Mustacchi    free of the rightful claim of any third person regarding infringement
16bc1f688bSRobert Mustacchi    or the like.  Any license provided herein, whether implied or
17bc1f688bSRobert Mustacchi    otherwise, applies only to this software file.  Patent licenses, if
18bc1f688bSRobert Mustacchi    any, provided herein do not apply to combinations of this program with
19bc1f688bSRobert Mustacchi    other software, or any other product whatsoever.
20bc1f688bSRobert Mustacchi 
21bc1f688bSRobert Mustacchi    You should have received a copy of the GNU Lesser General Public
22bc1f688bSRobert Mustacchi    License along with this program; if not, write the Free Software
23bc1f688bSRobert Mustacchi    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
24bc1f688bSRobert Mustacchi    USA.
25bc1f688bSRobert Mustacchi 
26bc1f688bSRobert Mustacchi */
27bc1f688bSRobert Mustacchi 
28bc1f688bSRobert Mustacchi 
29bc1f688bSRobert Mustacchi 
30bc1f688bSRobert Mustacchi /*  This structure is used to read an arange into. */
31bc1f688bSRobert Mustacchi struct Dwarf_Arange_s {
32bc1f688bSRobert Mustacchi 
33bc1f688bSRobert Mustacchi     /*  The segment selector. Only non-zero if Dwarf4, only
34bc1f688bSRobert Mustacchi         meaningful if ar_segment_selector_size non-zero   */
35bc1f688bSRobert Mustacchi     Dwarf_Unsigned ar_segment_selector;
36bc1f688bSRobert Mustacchi 
37bc1f688bSRobert Mustacchi     /* Starting address of the arange, ie low-pc. */
38bc1f688bSRobert Mustacchi     Dwarf_Addr ar_address;
39bc1f688bSRobert Mustacchi 
40bc1f688bSRobert Mustacchi     /* Length of the arange. */
41bc1f688bSRobert Mustacchi     Dwarf_Unsigned ar_length;
42bc1f688bSRobert Mustacchi 
43bc1f688bSRobert Mustacchi 
44*4d9fdb46SRobert Mustacchi     /*  Offset into .debug_info of the start of the compilation-unit
45*4d9fdb46SRobert Mustacchi         containing this set of aranges.
46*4d9fdb46SRobert Mustacchi         Applies only to .debug_info, not .debug_types. */
47bc1f688bSRobert Mustacchi     Dwarf_Off ar_info_offset;
48bc1f688bSRobert Mustacchi 
49bc1f688bSRobert Mustacchi     /* Corresponding Dwarf_Debug. */
50bc1f688bSRobert Mustacchi     Dwarf_Debug ar_dbg;
51bc1f688bSRobert Mustacchi 
52bc1f688bSRobert Mustacchi     Dwarf_Half ar_segment_selector_size;
53bc1f688bSRobert Mustacchi };
54bc1f688bSRobert Mustacchi 
55bc1f688bSRobert Mustacchi 
56bc1f688bSRobert Mustacchi 
57bc1f688bSRobert Mustacchi int
58bc1f688bSRobert Mustacchi _dwarf_get_aranges_addr_offsets(Dwarf_Debug dbg,
59bc1f688bSRobert Mustacchi     Dwarf_Addr ** addrs,
60bc1f688bSRobert Mustacchi     Dwarf_Off ** offsets,
61bc1f688bSRobert Mustacchi     Dwarf_Signed * count,
62bc1f688bSRobert Mustacchi     Dwarf_Error * error);
63