1 /*-------------------------------------------------------------------------
2 SDCCdebug.h - header file debug infrastructure
4 Copyright (C) 2003, Lenny Story and Bernhard Held
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 -------------------------------------------------------------------------*/
21 #ifndef _DEBUG_INCLUDE_
22 #define _DEBUG_INCLUDE_
24 typedef struct DebugFile
26 int (*openFile
) (const char *file
);
27 int (*closeFile
) (void);
28 int (*writeModule
) (const char *name
);
29 int (*writeFunction
) (symbol
*pSym
, iCode
*ic
);
30 int (*writeEndFunction
) (symbol
*pSym
, iCode
*ic
, int offset
);
31 int (*writeLabel
) (symbol
*pSym
, const iCode
*ic
);
32 int (*writeScope
) (iCode
*ic
);
33 int (*writeSymbol
) (symbol
*pSym
);
34 int (*writeType
) (structdef
*sdef
, int block
, int inStruct
, const char *tag
);
35 int (*writeCLine
) (iCode
*ic
);
36 int (*writeALine
) (const char *module
, int Line
);
37 int (*writeFrameAddress
) (const char *variable
, struct reg_info
*reg
, int offset
);
40 extern DEBUGFILE
*debugFile
;
42 void outputDebugStackSymbols (void);
43 void outputDebugSymbols (void);
44 void dumpSymInfo (const char *pcName
, memmap
*memItem
);
45 void emitDebuggerSymbol (const char * debugSym
);