* sim/ucsim/*.*, sim/ucsim/configure, sim/ucsim/configure.in:
[fw/sdcc] / sim / ucsim / sim.src / stackcl.h
index e4dd4e4c4c265fca58decb6f0f2fd9003b27fa5e..bd2f357c00ff458c9a0387fd6bb8bf9daf9eb359 100644 (file)
@@ -49,21 +49,21 @@ class cl_stack_op: public cl_base
 {
 protected:
   enum stack_op operation;
-  t_addr PC;   // of instruction
+  t_addr PC;    // of instruction
   t_addr SP_before;
   t_addr SP_after;
 public:
   cl_stack_op(enum stack_op op,
-             t_addr iPC, t_addr iSP_before, t_addr iSP_after);
+              t_addr iPC, t_addr iSP_before, t_addr iSP_after);
   virtual ~cl_stack_op(void);
   virtual class cl_stack_op *mk_copy(void);
-  static void info_head(class cl_console *con);
-  virtual void info(class cl_console *con, class cl_uc *uc);
+  static void info_head(class cl_console_base *con);
+  virtual void info(class cl_console_base *con, class cl_uc *uc);
 protected:
-  virtual void print_info(class cl_console *con);
+  virtual void print_info(class cl_console_base *con);
 public:
-  virtual char *get_op_name(void);
-  virtual char *get_matching_name(void) { return("unknown"); }
+  virtual const char *get_op_name(void);
+  virtual const char *get_matching_name(void) { return("unknown"); }
   virtual bool sp_increased(void);
   virtual int data_size(void);
   virtual bool match(class cl_stack_op *op);
@@ -83,13 +83,13 @@ protected:
   t_addr pushed_addr;
 public:
   cl_stack_call(t_addr iPC, t_addr called, t_addr pushed,
-               t_addr iSP_before, t_addr iSP_after);
+                t_addr iSP_before, t_addr iSP_after);
   virtual class cl_stack_op *mk_copy(void);
 protected:
-  virtual char *get_op_name(void);
-  virtual void print_info(class cl_console *con);
+  virtual const char *get_op_name(void);
+  virtual void print_info(class cl_console_base *con);
 public:
-  virtual char *get_matching_name(void);
+  virtual const char *get_matching_name(void);
   virtual enum stack_op get_matching_op(void);
   virtual bool match(class cl_stack_op *op);
 };
@@ -99,13 +99,13 @@ class cl_stack_intr: public cl_stack_call
 {
 public:
   cl_stack_intr(t_addr iPC, t_addr called, t_addr pushed,
-               t_addr iSP_before, t_addr iSP_after);
+                t_addr iSP_before, t_addr iSP_after);
   virtual class cl_stack_op *mk_copy(void);
 protected:
-  virtual char *get_op_name(void);
-  virtual void print_info(class cl_console *con);
+  virtual const char *get_op_name(void);
+  virtual void print_info(class cl_console_base *con);
 public:
-  virtual char *get_matching_name(void);
+  virtual const char *get_matching_name(void);
   virtual enum stack_op get_matching_op(void);
   virtual bool match(class cl_stack_op *op);
 };
@@ -119,10 +119,10 @@ public:
   cl_stack_push(t_addr iPC, t_mem idata, t_addr iSP_before, t_addr iSP_after);
   virtual class cl_stack_op *mk_copy(void);
 protected:
-  virtual char *get_op_name(void);
-  virtual void print_info(class cl_console *con);
+  virtual const char *get_op_name(void);
+  virtual void print_info(class cl_console_base *con);
 public:
-  virtual char *get_matching_name(void);
+  virtual const char *get_matching_name(void);
   virtual enum stack_op get_matching_op(void);
   virtual bool match(class cl_stack_op *op);
 };
@@ -134,9 +134,9 @@ public:
   cl_stack_ret(t_addr iPC, t_addr iaddr, t_addr iSP_before, t_addr iSP_after);
   virtual class cl_stack_op *mk_copy(void);
 protected:
-  virtual char *get_op_name(void);
+  virtual const char *get_op_name(void);
 public:
-  virtual char *get_matching_name(void);
+  virtual const char *get_matching_name(void);
   virtual enum stack_op get_matching_op(void);
   virtual bool match(class cl_stack_op *op);
 };
@@ -148,9 +148,9 @@ public:
   cl_stack_iret(t_addr iPC, t_addr iaddr, t_addr iSP_before, t_addr iSP_after);
   virtual class cl_stack_op *mk_copy(void);
 protected:
-  virtual char *get_op_name(void);
+  virtual const char *get_op_name(void);
 public:
-  virtual char *get_matching_name(void);
+  virtual const char *get_matching_name(void);
   virtual enum stack_op get_matching_op(void);
   virtual bool match(class cl_stack_op *op);
 };
@@ -162,9 +162,9 @@ public:
   cl_stack_pop(t_addr iPC, t_mem idata, t_addr iSP_before, t_addr iSP_after);
   virtual class cl_stack_op *mk_copy(void);
 protected:
-  virtual char *get_op_name(void);
+  virtual const char *get_op_name(void);
 public:
-  virtual char *get_matching_name(void);
+  virtual const char *get_matching_name(void);
   virtual enum stack_op get_matching_op(void);
   virtual bool match(class cl_stack_op *op);
 };
@@ -173,8 +173,6 @@ public:
 /*
  * All kind of stack errors
  */
-//extern class cl_error_class error_stack_class;
-//class cl_error_stack: public cl_error
 class cl_error_stack: public cl_error
 {
 private:
@@ -188,41 +186,33 @@ public:
  */
 class cl_error_stack_tracker: public cl_error_stack
 {
-private:
-  static class cl_error_class *error_stack_tracker_class;
 public:
   cl_error_stack_tracker(void);
 };
 
 class cl_error_stack_tracker_wrong_handle: public cl_error_stack_tracker
 {
-private:
-  static class cl_error_class *error_stack_tracker_wrong_handle_class;
 public:
   bool write_operation;
 public:
   cl_error_stack_tracker_wrong_handle(bool write_op);
 
-  virtual void print(class cl_commander *c);
+  virtual void print(class cl_commander_base *c);
 };
 
 class cl_error_stack_tracker_empty: public cl_error_stack_tracker
 {
-private:
-  static class cl_error_class *error_stack_tracker_empty_class;
 protected:
   class cl_stack_op *operation;
 public:
   cl_error_stack_tracker_empty(class cl_stack_op *op);
   virtual ~cl_error_stack_tracker_empty(void);
 
-  virtual void print(class cl_commander *c);
+  virtual void print(class cl_commander_base *c);
 };
 
 class cl_error_stack_tracker_unmatch: public cl_error_stack_tracker
 {
-private:
-  static class cl_error_class *error_stack_tracker_unmatch_class;
 protected:
   class cl_stack_op *top, *operation;
 public:
@@ -230,25 +220,29 @@ public:
                                 class cl_stack_op *op);
   virtual ~cl_error_stack_tracker_unmatch(void);
 
-  virtual void print(class cl_commander *c);
+  virtual void print(class cl_commander_base *c);
 };
 
 class cl_error_stack_tracker_inconsistent: public cl_error_stack_tracker
 {
-private:
-  static class cl_error_class *error_stack_tracker_inconsistent_class;
 protected:
   class cl_stack_op *operation;
   int unread_data_size;
 public:
   cl_error_stack_tracker_inconsistent(class cl_stack_op *op,
-                                     int the_unread_data_size);
+                                      int the_unread_data_size);
   virtual ~cl_error_stack_tracker_inconsistent(void);
 
-  virtual void print(class cl_commander *c);
+  virtual void print(class cl_commander_base *c);
 };
 
+class cl_stack_error_registry: public cl_error_registry
+{
+public:
+  cl_stack_error_registry(void);
+};
 
 #endif
 
+
 /* End of sim.src/stackcl.h */