sdcdb updates,ddd
[fw/sdcc] / debugger / mcs51 / sdcdb.h
index ad535b2c1dba5861433b2cc458b5ef44c5c63be5..586aa2cfa093d2be31b1fc7d734c33dc68b4aa55 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  0
+#define D_simi   1
+#define D_sdcdb  1
+#define D_symtab 0
+
+#define Dprintf(f, fs) {if (f) printf fs ; }
+#else
+#define Dprintf(f, fs) { }
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <limits.h>
 #include "sdccconf.h"
-#ifdef _NO_GC
-
-#define GC_malloc malloc
-#define GC_free free
-#define GC_realloc realloc
-
-#else
-
-#include "gc/gc.h"
-
-#endif
-
 #include "src/SDCCset.h"
 #include "src/SDCChasht.h"
 
@@ -60,13 +60,22 @@ typedef short bool;
 #define min(a,b) (a < b ? a : b)
 #endif
 
-#ifndef ALLOC
-#define  ALLOC(x,sz) if (!(x = GC_malloc(sz)))                          \
-         {                                                           \
-            fprintf(stderr,"sdcdb: out of memory\n"); \
-            exit (1);                                                \
-         }
-#endif
+/* 
+ * #ifndef ALLOC
+ * #define  ALLOC(x,sz) if (!(x = calloc(1, sz)))                          \
+ *          {                                                           \
+ *             fprintf(stderr,"sdcdb: out of memory\n"); \
+ *             exit (1);                                                \
+ *          }
+ * #endif
+ * #ifndef ALLOC_ATOMIC
+ * #define ALLOC_ATOMIC(x,sz)   if (!(x = calloc(1, sz)))   \
+ *          {                                               \
+ *             fprintf(stderr,"sdcdb: out of memory\n"); \
+ *             exit (1);                                    \
+ *          }
+ * #endif
+ */
 
 /* generalpurpose stack related macros */
 #define  STACK_DCL(stack,type,size)                   \
@@ -115,7 +124,7 @@ typedef short bool;
 #define  STACK_WALK(stack)    (w_##stack >= (stack + sizeof(stack)/sizeof(*stack)) \
                               ? NULL : *w_##stack++ )
 
-#include "../sdcc.src/SDCCbitv.h"
+#include "src/SDCCbitv.h"
 
 enum {
     SYM_REC = 1,
@@ -217,6 +226,9 @@ extern set *modules  ; /* set of modules   */
 extern set *functions; /* set of functions */
 extern set *symbols  ; /* set of symbols */
 
+extern char *currModName ;
+extern short userinterrupt ;
+extern short showfull ;
 extern int nStructs ;
 extern struct structdef **structs ; /* all structures */
 extern char *ssdirl; /* source directory search path */