addapt new syntax of s51
[fw/sdcc] / debugger / mcs51 / sdcdb.h
index 0021fd69ed3524fa6bb1617d8a5b6797a608f99b..5b1ce24b2ee44ffad3c98bcf5dc19e1d688ace58 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  1
-#define D_simi   1
-#define D_sdcdb  1
-#define D_symtab 1
+#define D_break  0x01
+#define D_simi   0x02
+#define D_sdcdb  0x04
+#define D_symtab 0x08
 
-#define Dprintf(f, fs) {if (f) printf fs ; }
+extern int sdcdbDebug;
+
+#define Dprintf(f, fs) {if (f & sdcdbDebug) printf fs ; }
 #else
 #define Dprintf(f, fs) { }
 #endif
@@ -134,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 };
 
 /*-----------------------------------------------------------------*/
@@ -169,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;
 
 /*-----------------------------------------------------------------*/
@@ -196,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 ;
 
 /*-----------------------------------------------------------------*/
@@ -220,20 +233,42 @@ 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