add -mz80 support
[fw/sdcc] / debugger / mcs51 / sdcdb.h
index 02f8be0be22e88560fa36435f66e5a69ada96046..0021fd69ed3524fa6bb1617d8a5b6797a608f99b 100644 (file)
 
 /* #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 Dprintf(f, fs) {if (f) printf fs ; }
+#else
+#define Dprintf(f, fs) { }
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -48,20 +60,23 @@ typedef short bool;
 #define min(a,b) (a < b ? a : b)
 #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
+/* 
+ * #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)                   \
          typedef  type  t_##stack   ;                 \