xref: /freebsd-src/contrib/elftoolchain/libdwarf/dwarf_get_section_max_offsets.3 (revision ae500c1ff8974130f7f2692772cf288b90349e0d)
1cf781b2eSEd Maste.\" Copyright (c) 2014 Kai Wang
2cf781b2eSEd Maste.\" All rights reserved.
3cf781b2eSEd Maste.\"
4cf781b2eSEd Maste.\" Redistribution and use in source and binary forms, with or without
5cf781b2eSEd Maste.\" modification, are permitted provided that the following conditions
6cf781b2eSEd Maste.\" are met:
7cf781b2eSEd Maste.\" 1. Redistributions of source code must retain the above copyright
8cf781b2eSEd Maste.\"    notice, this list of conditions and the following disclaimer.
9cf781b2eSEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright
10cf781b2eSEd Maste.\"    notice, this list of conditions and the following disclaimer in the
11cf781b2eSEd Maste.\"    documentation and/or other materials provided with the distribution.
12cf781b2eSEd Maste.\"
13cf781b2eSEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14cf781b2eSEd Maste.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15cf781b2eSEd Maste.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16cf781b2eSEd Maste.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17cf781b2eSEd Maste.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18cf781b2eSEd Maste.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19cf781b2eSEd Maste.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20cf781b2eSEd Maste.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21cf781b2eSEd Maste.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22cf781b2eSEd Maste.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23cf781b2eSEd Maste.\" SUCH DAMAGE.
24cf781b2eSEd Maste.\"
25*ae500c1fSEd Maste.\" $Id: dwarf_get_section_max_offsets.3 3644 2018-10-15 19:55:01Z jkoshy $
26cf781b2eSEd Maste.\"
2771a0c925SEd Maste.Dd December 21, 2014
28*ae500c1fSEd Maste.Dt DWARF_GET_SECTION_MAX_OFFSETS 3
29cf781b2eSEd Maste.Os
30cf781b2eSEd Maste.Sh NAME
31cf781b2eSEd Maste.Nm dwarf_get_section_max_offsets ,
32cf781b2eSEd Maste.Nm dwarf_get_section_max_offsets_b
33cf781b2eSEd Maste.Nd return the size of DWARF sections
34cf781b2eSEd Maste.Sh LIBRARY
35cf781b2eSEd Maste.Lb libdwarf
36cf781b2eSEd Maste.Sh SYNOPSIS
37cf781b2eSEd Maste.In libdwarf.h
38cf781b2eSEd Maste.Ft int
39cf781b2eSEd Maste.Fo dwarf_get_section_max_offsets
40cf781b2eSEd Maste.Fa "Dwarf_Debug dbg"
41cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_info"
42cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_abbrev"
43cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_line"
44cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_loc"
45cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_aranges"
46cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_macinfo"
47cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_pubnames"
48cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_str"
49cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_frame"
50cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_ranges"
51cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_pubtypes"
52cf781b2eSEd Maste.Fc
53cf781b2eSEd Maste.Ft int
54cf781b2eSEd Maste.Fo dwarf_get_section_max_offsets_b
55cf781b2eSEd Maste.Fa "Dwarf_Debug dbg"
56cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_info"
57cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_abbrev"
58cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_line"
59cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_loc"
60cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_aranges"
61cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_macinfo"
62cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_pubnames"
63cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_str"
64cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_frame"
65cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_ranges"
66cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_pubtypes"
67cf781b2eSEd Maste.Fa "Dwarf_Unsigned *debug_types"
68cf781b2eSEd Maste.Fc
69cf781b2eSEd Maste.Sh DESCRIPTION
70cf781b2eSEd MasteFunction
71cf781b2eSEd Maste.Fn dwarf_get_section_max_offsets_b
72cf781b2eSEd Masteretrieves the sizes of the DWARF sections in a DWARF debug context.
73cf781b2eSEd MasteArgument
74cf781b2eSEd Maste.Ar dbg
75cf781b2eSEd Masteshould reference a DWARF debug context allocated using
76cf781b2eSEd Maste.Xr dwarf_init 3 .
77cf781b2eSEd MasteThe function stores the size of each DWARF section to the location
78cf781b2eSEd Mastepointed to by the argument corresponding to the section name.
79cf781b2eSEd MasteIf a DWARF section does not exist, the location pointed to by the
80cf781b2eSEd Masteargument corresponding to that section will be set to zero.
81cf781b2eSEd Maste.Pp
82cf781b2eSEd MasteA value of NULL may be used for any of the arguments
83cf781b2eSEd Maste.Ar debug_info ,
84cf781b2eSEd Maste.Ar debug_abbrev ,
85cf781b2eSEd Maste.Ar debug_line ,
86cf781b2eSEd Maste.Ar debug_loc ,
87cf781b2eSEd Maste.Ar debug_aranges ,
88cf781b2eSEd Maste.Ar debug_macinfo ,
89cf781b2eSEd Maste.Ar debug_pubnames ,
90cf781b2eSEd Maste.Ar debug_str ,
91cf781b2eSEd Maste.Ar debug_frame ,
92cf781b2eSEd Maste.Ar debug_ranges ,
93cf781b2eSEd Maste.Ar debug_pubtypes
94cf781b2eSEd Masteand
95cf781b2eSEd Maste.Ar debug_types
96cf781b2eSEd Masteif the caller is not interested in the respective section size.
97cf781b2eSEd Maste.Pp
98cf781b2eSEd MasteFunction
99cf781b2eSEd Maste.Fn dwarf_get_section_max_offsets
100cf781b2eSEd Masteis identical to function
101cf781b2eSEd Maste.Fn dwarf_get_section_max_offsets_b
102cf781b2eSEd Masteexcept that it does not provide argument
103cf781b2eSEd Maste.Ar debug_types ,
10471a0c925SEd Masteand thus cannot return the size of the
105cf781b2eSEd Maste.Dq \&.debug_types
106cf781b2eSEd Mastesection.
107cf781b2eSEd Maste.Sh RETURN VALUES
108cf781b2eSEd MasteOn success, these functions return
109cf781b2eSEd Maste.Dv DW_DLV_OK .
110cf781b2eSEd MasteIf argument
111cf781b2eSEd Maste.Ar dbg
112cf781b2eSEd Masteis NULL, they return
113cf781b2eSEd Maste.Dv DW_DLV_ERROR .
114cf781b2eSEd Maste.Sh SEE ALSO
115cf781b2eSEd Maste.Xr dwarf 3 ,
116cf781b2eSEd Maste.Xr dwarf_init 3
117