Fix bug in debugging variable list compilation with structure and array disabling
--- a/stage4/generate_c/generate_var_list.cc Wed Jun 08 18:34:53 2011 +0200
+++ b/stage4/generate_c/generate_var_list.cc Thu Jun 09 17:47:57 2011 +0200
@@ -208,6 +208,14 @@
}
void declare_variable(symbol_c *symbol) {
+ // Arrays and structures are not supported in debugging
+ switch (this->current_var_type_category) {
+ case array_vtc:
+ case structure_vtc:
+ return;
+ default:
+ break;
+ }
print_var_number();
s4o.print(";");
switch (this->current_var_type_category) {
@@ -367,7 +375,7 @@
update_var_type_symbol(symbol->array_spec_init);
this->current_var_type_category = array_vtc;
- //declare_variables(symbol->var1_list);
+ declare_variables(symbol->var1_list);
/* Values no longer in scope, and therefore no longer used.
* Make an effort to keep them set to NULL when not in use
@@ -392,7 +400,8 @@
update_var_type_symbol(symbol->initialized_structure);
/* now to produce the c equivalent... */
- //declare_variables(symbol->var1_list);
+ this->current_var_type_category = structure_vtc;
+ declare_variables(symbol->var1_list);
/* Values no longer in scope, and therefore no longer used.
* Make an effort to keep them set to NULL when not in use