Martins commands patch
[fw/sdcc] / debugger / mcs51 / sdcdb.h
index b91ae279891474d7e5b8f610a9539883953a006b..f73335a05d2676d19995baa93dccbf14e46e68b7 100644 (file)
 #ifndef  SDCDB_H
 #define  SDCDB_H
 
-/* #define SDCDB_DEBUG */
+#define SDCDB_DEBUG
+
+#ifdef SDCDB_DEBUG
+// set D_x to 0 to turn off, 1 to turn on.
+#define D_break  0x01
+#define D_simi   0x02
+#define D_sdcdb  0x04
+#define D_symtab 0x08
+
+extern int sdcdbDebug;
+
+#define Dprintf(f, fs) {if (f & sdcdbDebug) printf fs ; }
+#else
+#define Dprintf(f, fs) { }
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -122,6 +136,14 @@ enum {
     MOD_REC
 };
 
+enum {
+    FMT_NON =  0,
+    FMT_BIN =  1,
+    FMT_OCT =  2,
+    FMT_DEZ =  3,
+    FMT_HEX =  4
+};
+
 enum { SRC_CMODE = 1, SRC_AMODE };
 
 /*-----------------------------------------------------------------*/
@@ -157,6 +179,7 @@ typedef struct module {
     int   nasmLines;         /* # of lines in the assembler file */
     srcLine  **cLines;       /* actual source lines */    
     srcLine  **asmLines;     /* actual assembler source lines*/
+    set       *cfpoints;     /* set of double line execution points */   
 } module;
 
 /*-----------------------------------------------------------------*/
@@ -184,6 +207,8 @@ typedef struct function {
     set       *afpoints     ;/* set of all ASM execution points in func */
     unsigned   int laddr    ;/* last executed address                   */
     int        lline        ;/* last executed linenumber                */
+    unsigned   int stkaddr  ;/* stackpointer at beginning of function
+                              * (not reentrant ! ) only actual */
 } function ;
 
 /*-----------------------------------------------------------------*/
@@ -208,20 +233,41 @@ typedef struct context {
     int      level ;          /* current level number       */
 } context ;
 
+/*-----------------------------------------------------------------*/
+/*                     symbol display information                  */
+/*-----------------------------------------------------------------*/
+typedef struct _dsymbol
+{
+    char *name;
+    int  dnum;
+    int  fmt;
+    char *rs;
+} dsymbol;
+
+
 extern cdbrecs *recsRoot ;
 extern context *currCtxt ;
 extern set *modules  ; /* set of modules   */
 extern set *functions; /* set of functions */
 extern set *symbols  ; /* set of symbols */
+extern set *sfrsymbols;/* set of symbols of sfr or sbit */
 
+extern char *currModName ;
+extern char userinterrupt ;
+extern char nointerrupt ;
+extern short showfull ;
 extern int nStructs ;
 extern struct structdef **structs ; /* all structures */
 extern char *ssdirl; /* source directory search path */
 void **resize (void **, int );
 char  *alloccpy(char *,int );
+char *gc_strdup(const char *s);
 srcLine **loadFile (char *name, int *nlines);
 extern short fullname;
 extern int srcMode;
+extern char contsim;
 char *searchDirsFname (char *);
-
+char *getNextCmdLine(void );
+void setCmdLine( char * );
+void stopCommandList( void );
 #endif