source: trunk/tools/dbginfo/hll.h@ 3453

Last change on this file since 3453 was 3286, checked in by bird, 26 years ago

IBMSRC record somewhat dumpable.

File size: 6.0 KB
Line 
1/* $Id: hll.h,v 1.5 2000-03-31 15:35:09 bird Exp $
2 *
3 * HLL definitions.
4 *
5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10#ifndef _HLL_h_
11#define _HLL_h_
12
13#pragma pack(1)
14
15
16/*******************************************************************************
17* Defined Constants And Macros *
18*******************************************************************************/
19
20/*
21 * HLL Directory entry types.
22 */
23#define HLL_DE_MODULES 0x0101 /* Filename */
24#define HLL_DE_PUBLICS 0x0102 /* Public symbols */
25#define HLL_DE_TYPES 0x0103 /* Types */
26#define HLL_DE_SYMBOLS 0x0104 /* Symbols */
27#define HLL_DE_LIBRARIES 0x0106 /* Libraries */
28#define HLL_DE_SRCLINES 0x0105 /* Line numbers - (IBM C/2 1.1) */
29#define HLL_DE_SRCLNSEG 0x0109 /* Line numbers - (MSC 6.00) */
30#define HLL_DE_IBMSRC 0x010B /* Line numbers - (IBM HLL) */
31
32
33/*
34 * HLL Module debug style
35 */
36#define HLL_MOD_STYLE 0x4C48 /* 'HL' */
37
38
39/*
40 * HLL Public symbol wide flag.
41 */
42#define HLL_PFS_WIDE 0x6e /* Wide flag. */
43
44
45
46/*******************************************************************************
47* Structures and Typedefs *
48*******************************************************************************/
49
50/*
51 * HLL Header
52 */
53typedef struct _HLLHdr
54{
55 unsigned char achSignature[4]; /* LX Debug Info Signature, 'NB04' */
56 unsigned long offDirectory; /* Offset to the HLL Directory.
57 * (Relative to start of this header.) */
58} HLLHDR, *PHLLHDR;
59
60
61/*
62 * HLL Directory Entry.
63 */
64typedef struct _HLLDirEntry
65{
66 unsigned short usType; /* Entry type. HLL_DE_* flag. */
67 unsigned short iMod; /* Module number data applies to. */
68 unsigned long off; /* Offset to data. This is based at
69 * the start of the start of the debug
70 * info. */
71 unsigned long cb; /* Size of data. */
72} HLLDIRENTRY, *PHLLDIRENTRY;
73
74
75
76/*
77 * HLL Directory.
78 */
79typedef struct _HLLDirectory
80{
81 unsigned short cb; /* Size of this struct (minus aEntries)
82 * / offset of aEntries relative to start of this structure. */
83 unsigned short cbEntry; /* Size of the directory entries (HLLDIRENTRY). */
84 unsigned long cEntries; /* Count of directory entires. */
85 HLLDIRENTRY aEntries[1]; /* Directory. */
86} HLLDIR, *PHLLDIR;
87
88
89/*
90 * HLL Segment
91 */
92typedef struct _HLLSegInfo
93{
94 unsigned short iObject; /* LX Object number. */
95 unsigned long off; /* Offset into the load image. */
96 unsigned long cb; /* Object length. */
97} HLLSEGINFO, *PHLLSEGINFO;
98
99
100/*
101 * HLL Module (file)
102 */
103typedef struct _HLLModule
104{
105 HLLSEGINFO SegInfo0; /* Segment info entry 0. */
106 unsigned short overlay; /* unused. */
107 unsigned short iLib; /* Library number it came from. */
108 unsigned char cSegInfo; /* Number of segment info entries. */
109 unsigned char pad; /* 1 byte padding. */
110 unsigned short usDebugStyle; /* Debug style -'HL' */
111 unsigned char chVerMinor; /* HLL version - minor number. */
112 unsigned char chVerMajor; /* HLL version - major number. */
113 unsigned char cchName; /* Filename length. */
114 unsigned char achName[1]; /* Filename. (*) */
115 /* HLLSEGINFO aSegInfo[] */ /* Array of segment info, starting with entry 1. (Starts at achName[cchName]) */
116} HLLMODULE, *PHLLMODULE;
117
118
119/*
120 * HLL Public Symbols
121 */
122typedef struct _HLLPublicSymbol
123{
124 unsigned long off; /* 32-bit offset (into the LX object) of the symbol location. */
125 unsigned short iObject; /* LX Object number. */
126 unsigned short iType; /* Symbol type index (into the type info data). */
127 unsigned char cchName; /* Size of name. */
128 unsigned char achName[1]; /* Name (*) */
129} HLLPUBLICSYM, *PHLLPUBLICSYM;
130
131
132/*
133 * HLL First entry of the IBMSRC data.
134 */
135typedef union _HLLFirstEntry
136{
137 struct
138 {
139 unsigned short usLine;
140 unsigned char uchType;
141 unsigned char uchReserved;
142 unsigned short cEntries;
143 union
144 {
145 unsigned short cbFileNameTable;
146 unsigned short cPathTableEntries;
147 unsigned short offBase;
148 } u1;
149 } hll01;
150 struct
151 {
152 unsigned short usLine;
153 unsigned char uchType;
154 unsigned char uchReserved;
155 unsigned short cEntries;
156 unsigned short iSeg;
157 union
158 {
159 unsigned long cbFileNameTable;
160 unsigned long cPathTableEntries;
161 unsigned long offBase;
162 } u1;
163 } hll03, hll04;
164} HLLFIRSTENTRY, *PHLLFIRSTENTRY;
165
166
167/*
168 * HLL Source filename entry.
169 */
170typedef struct _HLLFilenameEntry
171{
172 unsigned long offSource;
173 unsigned long cSourceRecords;
174 unsigned long cSourceFiles;
175 unsigned char cchName;
176 unsigned char achName[1];
177} HLLFILENAMEENTRY, *PHLLFILENAMEENTRY;
178
179
180/*
181 * HLL Linenumber entry.
182 */
183typedef union _HLLLinenumberEntry
184{
185 struct
186 {
187 unsigned short usLine;
188 unsigned char ichSourceFile;
189 unsigned char chFlags;
190 unsigned long off;
191 } hll01;
192 struct
193 {
194 unsigned short usLine;
195 unsigned short iusSourceFile;
196 unsigned long off;
197 } hll03, hll04;
198} HLLLINENUMBERENTRY, *PHLLLINENUMBERENTRY;
199
200
201/*
202 * HLL Path entry (HLL 01)
203 */
204typedef struct _HLLPathEntry_HL01
205{
206 unsigned long off;
207 unsigned short usPathcode;
208} HLLPATHENTRY_HL01, *PHLLPATHENTRY_HL01;
209
210
211#pragma pack()
212
213#endif
Note: See TracBrowser for help on using the repository browser.