1/*****************************************************************************/
2/* */
3/* hlldbgsym.h */
4/* */
5/* Definitions for high level language debug symbols */
6/* */
7/* */
8/* */
9/* (C) 2011, Ullrich von Bassewitz */
10/* Roemerstrasse 52 */
11/* D-70794 Filderstadt */
12/* EMail: uz@cc65.org */
13/* */
14/* */
15/* This software is provided 'as-is', without any expressed or implied */
16/* warranty. In no event will the authors be held liable for any damages */
17/* arising from the use of this software. */
18/* */
19/* Permission is granted to anyone to use this software for any purpose, */
20/* including commercial applications, and to alter it and redistribute it */
21/* freely, subject to the following restrictions: */
22/* */
23/* 1. The origin of this software must not be misrepresented; you must not */
24/* claim that you wrote the original software. If you use this software */
25/* in a product, an acknowledgment in the product documentation would be */
26/* appreciated but is not required. */
27/* 2. Altered source versions must be plainly marked as such, and must not */
28/* be misrepresented as being the original software. */
29/* 3. This notice may not be removed or altered from any source */
30/* distribution. */
31/* */
32/*****************************************************************************/
33
34
35
36/* This module contains definitions for high level language symbols passed
37** down from the C compiler. They're collected in the assembler and written to
38** the object file in binary form, then again read by the linker and finally
39** placed in the debug info file.
40*/
41
42
43
44#ifndef HLLDBGSYM_H
45#define HLLDBGSYM_H
46
47
48
49/*****************************************************************************/
50/* Data */
51/*****************************************************************************/
52
53
54
55/* Flag bits that tell something about the symbol */
56#define HLL_TYPE_FUNC 0x0000U /* Function */
57#define HLL_TYPE_SYM 0x0001U /* Symbol */
58#define HLL_TYPE_MASK 0x0007U
59#define HLL_GET_TYPE(x) ((x) & HLL_TYPE_MASK)
60#define HLL_IS_FUNC(x) (HLL_GET_TYPE(x) == HLL_TYPE_FUNC)
61#define HLL_IS_SYM(x) (HLL_GET_TYPE(x) == HLL_TYPE_SYM)
62
63/* Storage class */
64#define HLL_SC_AUTO 0x0000U /* On stack */
65#define HLL_SC_REG 0x0008U /* Register */
66#define HLL_SC_STATIC 0x0010U /* Static linkage */
67#define HLL_SC_EXTERN 0x0018U /* External linkage */
68#define HLL_SC_MASK 0x0078U
69#define HLL_GET_SC(x) ((x) & HLL_SC_MASK)
70
71/* Other information */
72#define HLL_DATA_SYM 0x0080U /* Attached asm symbol */
73#define HLL_HAS_SYM(x) (((x) & HLL_DATA_SYM) != 0)
74
75
76
77/* End of hlldbgsyms.h */
78
79#endif
80