xref: /illumos-gate/usr/src/lib/libdwarf/common/pro_die.h (revision f17620a4f72a29025a22655ba8735ccd20ae174f)
1 /*
2 
3   Copyright (C) 2000,2004 Silicon Graphics, Inc.  All Rights Reserved.
4 
5   This program is free software; you can redistribute it and/or modify it
6   under the terms of version 2.1 of the GNU Lesser General Public License
7   as published by the Free Software Foundation.
8 
9   This program is distributed in the hope that it would be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13   Further, this software is distributed without any warranty that it is
14   free of the rightful claim of any third person regarding infringement
15   or the like.  Any license provided herein, whether implied or
16   otherwise, applies only to this software file.  Patent licenses, if
17   any, provided herein do not apply to combinations of this program with
18   other software, or any other product whatsoever.
19 
20   You should have received a copy of the GNU Lesser General Public
21   License along with this program; if not, write the Free Software
22   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
23   USA.
24 
25 */
26 
27 
28 
29 
30 /*
31     This struct holds the abbreviation table, before they are written
32     on disk. Holds a linked list of abbreviations, each consisting of
33     a bitmap for attributes and a bitmap for forms
34 */
35 typedef struct Dwarf_P_Abbrev_s *Dwarf_P_Abbrev;
36 
37 struct Dwarf_P_Abbrev_s {
38     Dwarf_Unsigned abb_idx;   /* index of abbreviation */
39     Dwarf_Tag abb_tag; 	      /* tag of die */
40     Dwarf_Ubyte abb_children; /* if children are present */
41     Dwarf_Unsigned *abb_attrs;  /* holds names of attrs */
42     Dwarf_Unsigned *abb_forms;  /* forms of attributes */
43 
44     /* 0 but if DW_FORM_implicit_value is value */
45     Dwarf_Signed *abb_implicits;
46     int abb_n_attr;           /* num of attrs = # of forms */
47     Dwarf_P_Abbrev abb_next;
48 };
49 
50 /* used in pro_section.c */
51 
52 int _dwarf_pro_add_AT_fde(Dwarf_P_Debug dbg, Dwarf_P_Die die,
53     Dwarf_Unsigned offset, Dwarf_Error * error);
54 
55 int _dwarf_pro_add_AT_stmt_list(Dwarf_P_Debug dbg,
56     Dwarf_P_Die first_die,
57     Dwarf_Error * error);
58 
59 
60 int _dwarf_pro_add_AT_macro_info(Dwarf_P_Debug dbg,
61     Dwarf_P_Die first_die,
62     Dwarf_Unsigned offset,
63     Dwarf_Error * error);
64 
65 int _dwarf_pro_set_string_attr(Dwarf_P_Attribute new_attr,
66     Dwarf_P_Debug dbg,
67     char *name,
68     Dwarf_Error *error);
69 
70 /* adds an attribute to a die */
71 void _dwarf_pro_add_at_to_die(Dwarf_P_Die die, Dwarf_P_Attribute attr);
72