Line -... |
Line 1... |
- |
|
1 |
/*
|
- |
|
2 |
* Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
|
- |
|
3 |
* All rights reserved.
|
- |
|
4 |
*
|
- |
|
5 |
* Redistribution and use in source and binary forms, with or without
|
- |
|
6 |
* modification, are permitted provided that the following conditions are met:
|
- |
|
7 |
*
|
- |
|
8 |
* 1. Redistributions of source code must retain the above copyright notice,
|
- |
|
9 |
* this list of conditions and the following disclaimer.
|
- |
|
10 |
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
- |
|
11 |
* this list of conditions and the following disclaimer in the documentation
|
- |
|
12 |
* and/or other materials provided with the distribution.
|
- |
|
13 |
* 3. Neither the name of The TenDRA Project nor the names of its contributors
|
- |
|
14 |
* may be used to endorse or promote products derived from this software
|
- |
|
15 |
* without specific, prior written permission.
|
- |
|
16 |
*
|
- |
|
17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
- |
|
18 |
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
- |
|
19 |
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
- |
|
20 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
- |
|
21 |
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
- |
|
22 |
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
- |
|
23 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
- |
|
24 |
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
- |
|
25 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
- |
|
26 |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
- |
|
27 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
- |
|
28 |
*
|
- |
|
29 |
* $Id$
|
- |
|
30 |
*/
|
1 |
/*
|
31 |
/*
|
2 |
Crown Copyright (c) 1997
|
32 |
Crown Copyright (c) 1997
|
3 |
|
33 |
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
34 |
This TenDRA(r) Computer Program is subject to Copyright
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
35 |
owned by the United Kingdom Secretary of State for Defence
|
6 |
acting through the Defence Evaluation and Research Agency
|
36 |
acting through the Defence Evaluation and Research Agency
|
7 |
(DERA). It is made available to Recipients with a
|
37 |
(DERA). It is made available to Recipients with a
|
8 |
royalty-free licence for its use, reproduction, transfer
|
38 |
royalty-free licence for its use, reproduction, transfer
|
9 |
to other parties and amendment for any purpose not excluding
|
39 |
to other parties and amendment for any purpose not excluding
|
10 |
product development provided that any such use et cetera
|
40 |
product development provided that any such use et cetera
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
41 |
shall be deemed to be acceptance of the following conditions:-
|
12 |
|
42 |
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
43 |
(1) Its Recipients shall ensure that this Notice is
|
14 |
reproduced upon any copies or amended versions of it;
|
44 |
reproduced upon any copies or amended versions of it;
|
15 |
|
45 |
|
16 |
(2) Any amended version of it shall be clearly marked to
|
46 |
(2) Any amended version of it shall be clearly marked to
|
17 |
show both the nature of and the organisation responsible
|
47 |
show both the nature of and the organisation responsible
|
18 |
for the relevant amendment or amendments;
|
48 |
for the relevant amendment or amendments;
|
19 |
|
49 |
|
20 |
(3) Its onward transfer from a recipient to another
|
50 |
(3) Its onward transfer from a recipient to another
|
21 |
party shall be deemed to be that party's acceptance of
|
51 |
party shall be deemed to be that party's acceptance of
|
22 |
these conditions;
|
52 |
these conditions;
|
23 |
|
53 |
|
24 |
(4) DERA gives no warranty or assurance as to its
|
54 |
(4) DERA gives no warranty or assurance as to its
|
25 |
quality or suitability for any purpose and DERA accepts
|
55 |
quality or suitability for any purpose and DERA accepts
|
26 |
no liability whatsoever in relation to any use to which
|
56 |
no liability whatsoever in relation to any use to which
|
27 |
it may be put.
|
57 |
it may be put.
|
28 |
*/
|
58 |
*/
|
Line 42... |
Line 72... |
42 |
* Revision 1.1.1.1 1995/08/14 14:30:23 pwe
|
72 |
* Revision 1.1.1.1 1995/08/14 14:30:23 pwe
|
43 |
* transferred from DJCH
|
73 |
* transferred from DJCH
|
44 |
*
|
74 |
*
|
45 |
**********************************************************************/
|
75 |
**********************************************************************/
|
46 |
|
76 |
|
47 |
extern void dwarf4 PROTO_S ((CONST char *t));
|
77 |
extern void dwarf4(CONST char *t);
|
48 |
extern void dwarf4n PROTO_S ((int x));
|
78 |
extern void dwarf4n(int x);
|
49 |
extern void dwarf2 PROTO_S ((char *c));
|
79 |
extern void dwarf2(char *c);
|
50 |
extern void out_dwarf_thing PROTO_S ((int t,char *cmt));
|
80 |
extern void out_dwarf_thing(int t,char *cmt);
|
51 |
extern void out_dwarfone PROTO_S ((int t,char *cmt));
|
81 |
extern void out_dwarfone(int t,char *cmt);
|
52 |
|
82 |
|
53 |
extern void enter_dwarf_blk PROTO_S ((int four,int excl, dwarf_label *lb));
|
83 |
extern void enter_dwarf_blk(int four,int excl, dwarf_label *lb);
|
54 |
extern void new_dwarf_blk2 PROTO_S ((void));
|
84 |
extern void new_dwarf_blk2(void);
|
55 |
extern void new_dwarf_blk4 PROTO_S ((void));
|
85 |
extern void new_dwarf_blk4(void);
|
56 |
extern void leave_dwarf_blk1 PROTO_S ((int leave));
|
86 |
extern void leave_dwarf_blk1(int leave);
|
57 |
|
87 |
|
58 |
extern void out_diagnose_prelude PROTO_S ((void));
|
88 |
extern void out_diagnose_prelude(void);
|
59 |
extern void out_diagnose_postlude PROTO_S ((void));
|
89 |
extern void out_diagnose_postlude(void);
|
60 |
|
90 |
|
61 |
extern void enter_dwarf_comp_unit PROTO_S ((void));
|
91 |
extern void enter_dwarf_comp_unit(void);
|
62 |
extern void leave_dwarf_comp_unit PROTO_S ((void));
|
92 |
extern void leave_dwarf_comp_unit(void);
|
63 |
|
93 |
|
64 |
extern void next_dwarf_lab PROTO_S ((dwarf_label *p));
|
94 |
extern void next_dwarf_lab(dwarf_label *p);
|
65 |
extern dwarf_type_label * next_dwarf_type_lab PROTO_S ((void));
|
95 |
extern dwarf_type_label *next_dwarf_type_lab(void);
|
66 |
extern char * current_label_name PROTO_S ((void));
|
96 |
extern char *current_label_name(void);
|
67 |
|
97 |
|
68 |
#include "dwarf_gbl.h"
|
98 |
#include "dwarf_gbl.h"
|
69 |
extern void out_dwarf_name_attr PROTO_S ((CONST char * CONST s));
|
99 |
extern void out_dwarf_name_attr(CONST char * CONST s);
|
70 |
#define TDFSTRING2CHAR(x) (&(((x).ints.chars)[0]))
|
100 |
#define TDFSTRING2CHAR(x) (&(((x).ints.chars)[0]))
|
71 |
extern void out_dwarf_string PROTO_S ((CONST char * CONST s));
|
101 |
extern void out_dwarf_string(CONST char * CONST s);
|
72 |
extern void out_dwarf_sourcemark PROTO_S ((CONST sourcemark * CONST x));
|
102 |
extern void out_dwarf_sourcemark(CONST sourcemark * CONST x);
|
73 |
|
103 |
|
74 |
extern void out_dwarf_bytesize_attr PROTO_S ((shape t));
|
104 |
extern void out_dwarf_bytesize_attr(shape t);
|
75 |
|
105 |
|
76 |
#define OUT_DWARF_LOC_BLK(x) out_dwarf_thing((int)x, "loc blk")
|
106 |
#define OUT_DWARF_LOC_BLK(x) out_dwarf_thing((int)x, "loc blk")
|
77 |
|
107 |
|
78 |
#if FS_STDC_HASH
|
108 |
#if FS_STDC_HASH
|
79 |
#define OUT_DWARF_TAG(x) out_dwarf_thing(x,#x)
|
109 |
#define OUT_DWARF_TAG(x) out_dwarf_thing(x, #x)
|
80 |
#define OUT_DWARF_TAG_NAMED(x,y) out_dwarf_thing(x,y)
|
110 |
#define OUT_DWARF_TAG_NAMED(x, y) out_dwarf_thing(x, y)
|
81 |
#define OUT_DWARF_ATTR(x) out_dwarf_thing(x,#x)
|
111 |
#define OUT_DWARF_ATTR(x) out_dwarf_thing(x, #x)
|
82 |
#define dwarf2c(x) out_dwarf_thing(x,#x)
|
112 |
#define dwarf2c(x) out_dwarf_thing(x, #x)
|
83 |
#define dwarf1(x) out_dwarfone(x,#x)
|
113 |
#define dwarf1(x) out_dwarfone(x, #x)
|
84 |
#else
|
114 |
#else
|
85 |
#define OUT_DWARF_TAG(x) out_dwarf_thing(x,"x")
|
115 |
#define OUT_DWARF_TAG(x) out_dwarf_thing(x, "x")
|
86 |
#define OUT_DWARF_TAG_NAMED(x,y) out_dwarf_thing(x,y)
|
116 |
#define OUT_DWARF_TAG_NAMED(x, y) out_dwarf_thing(x, y)
|
87 |
#define OUT_DWARF_ATTR(x) out_dwarf_thing(x,"x")
|
117 |
#define OUT_DWARF_ATTR(x) out_dwarf_thing(x, "x")
|
88 |
#define dwarf2c(x) out_dwarf_thing(x,"x")
|
118 |
#define dwarf2c(x) out_dwarf_thing(x, "x")
|
89 |
#define dwarf1(x) out_dwarfone(x,"x")
|
119 |
#define dwarf1(x) out_dwarfone(x, "x")
|
90 |
#endif
|
120 |
#endif
|
91 |
|
121 |
|
92 |
#define enter_dwarf_entry(lb) enter_dwarf_blk(1,0,lb)
|
122 |
#define enter_dwarf_entry(lb) enter_dwarf_blk(1, 0, lb)
|
93 |
#define leave_dwarf_blk() leave_dwarf_blk1(1)
|
123 |
#define leave_dwarf_blk() leave_dwarf_blk1(1)
|
94 |
#define leave_dwarf_blk2() leave_dwarf_blk1(0)
|
124 |
#define leave_dwarf_blk2() leave_dwarf_blk1(0)
|
95 |
#define leave_dwarf_blk4() leave_dwarf_blk1(1)
|
125 |
#define leave_dwarf_blk4() leave_dwarf_blk1(1)
|
96 |
|
126 |
|
97 |
extern void start_sib_chain1 PROTO_S ((int d_tag, char *tag_name));
|
127 |
extern void start_sib_chain1(int d_tag, char *tag_name);
|
98 |
extern void cont_sib_chain1 PROTO_S ((int d_tag, char *tag_name));
|
128 |
extern void cont_sib_chain1(int d_tag, char *tag_name);
|
99 |
extern void end_sib_chain PROTO_S ((void));
|
129 |
extern void end_sib_chain(void);
|
100 |
extern void make_next_new_chain PROTO_S ((void));
|
130 |
extern void make_next_new_chain(void);
|
101 |
|
131 |
|
102 |
#if FS_STDC_HASH
|
132 |
#if FS_STDC_HASH
|
103 |
#define start_sib_chain(x) start_sib_chain1(x,#x)
|
133 |
#define start_sib_chain(x) start_sib_chain1(x, #x)
|
104 |
#define cont_sib_chain(x) cont_sib_chain1(x,#x)
|
134 |
#define cont_sib_chain(x) cont_sib_chain1(x, #x)
|
105 |
#else
|
135 |
#else
|
106 |
#define start_sib_chain(x) start_sib_chain1(x,"x")
|
136 |
#define start_sib_chain(x) start_sib_chain1(x, "x")
|
107 |
#define cont_sib_chain(x) cont_sib_chain1(x,"x")
|
137 |
#define cont_sib_chain(x) cont_sib_chain1(x, "x")
|
108 |
#endif
|
138 |
#endif
|
109 |
|
139 |
|
110 |
|
140 |
|
111 |
extern void out_dwarf_lab PROTO_S ((H_dwarf_lab *l));
|
141 |
extern void out_dwarf_lab(H_dwarf_lab *l);
|
112 |
#ifdef mips
|
142 |
#ifdef mips
|
113 |
#define OUT_DWARF_BEG(x) out_dwarf_lab((H_dwarf_lab *)&(((x)->beg)[0]))
|
143 |
#define OUT_DWARF_BEG(x) out_dwarf_lab((H_dwarf_lab *)&(((x)->beg)[0]))
|
114 |
#define OUT_DWARF_END(x) out_dwarf_lab((H_dwarf_lab *)&(((x)->end)[0]))
|
144 |
#define OUT_DWARF_END(x) out_dwarf_lab((H_dwarf_lab *)&(((x)->end)[0]))
|
115 |
#else
|
145 |
#else
|
116 |
#define OUT_DWARF_BEG(x) out_dwarf_lab(&((x)->beg))
|
146 |
#define OUT_DWARF_BEG(x) out_dwarf_lab(&((x)->beg))
|
117 |
#define OUT_DWARF_END(x) out_dwarf_lab(&((x)->end))
|
147 |
#define OUT_DWARF_END(x) out_dwarf_lab(&((x)->end))
|
118 |
#endif
|
148 |
#endif
|