stage4/generate_c/generate_var_list.cc
changeset 317 5b687021c6e7
parent 300 092a6fa4926f
child 377 60b012b7793f
equal deleted inserted replaced
316:baa7a1585585 317:5b687021c6e7
   206         declare_variable(list->elements[i]);
   206         declare_variable(list->elements[i]);
   207       }
   207       }
   208     }
   208     }
   209     
   209     
   210     void declare_variable(symbol_c *symbol) {
   210     void declare_variable(symbol_c *symbol) {
       
   211       // Arrays and structures are not supported in debugging
       
   212       switch (this->current_var_type_category) {
       
   213       	case array_vtc:
       
   214       	case structure_vtc:
       
   215           return;
       
   216       	default:
       
   217       	  break;
       
   218       }
   211       print_var_number();
   219       print_var_number();
   212       s4o.print(";");
   220       s4o.print(";");
   213       switch (this->current_var_type_category) {
   221       switch (this->current_var_type_category) {
   214         case external_vtc:
   222         case external_vtc:
   215           s4o.print("EXT");
   223           s4o.print("EXT");
   365        * current_var_init_symbol private variables...
   373        * current_var_init_symbol private variables...
   366        */
   374        */
   367       update_var_type_symbol(symbol->array_spec_init);
   375       update_var_type_symbol(symbol->array_spec_init);
   368       
   376       
   369       this->current_var_type_category = array_vtc;
   377       this->current_var_type_category = array_vtc;
   370       //declare_variables(symbol->var1_list);
   378       declare_variables(symbol->var1_list);
   371     
   379     
   372       /* Values no longer in scope, and therefore no longer used.
   380       /* Values no longer in scope, and therefore no longer used.
   373        * Make an effort to keep them set to NULL when not in use
   381        * Make an effort to keep them set to NULL when not in use
   374        * in order to catch bugs as soon as possible...
   382        * in order to catch bugs as soon as possible...
   375        */
   383        */
   390        * current_var_init_symbol private variables...
   398        * current_var_init_symbol private variables...
   391        */
   399        */
   392       update_var_type_symbol(symbol->initialized_structure);
   400       update_var_type_symbol(symbol->initialized_structure);
   393     
   401     
   394       /* now to produce the c equivalent... */
   402       /* now to produce the c equivalent... */
   395       //declare_variables(symbol->var1_list);
   403       this->current_var_type_category = structure_vtc;
       
   404       declare_variables(symbol->var1_list);
   396     
   405     
   397       /* Values no longer in scope, and therefore no longer used.
   406       /* Values no longer in scope, and therefore no longer used.
   398        * Make an effort to keep them set to NULL when not in use
   407        * Make an effort to keep them set to NULL when not in use
   399        * in order to catch bugs as soon as possible...
   408        * in order to catch bugs as soon as possible...
   400        */
   409        */