Commit 975e781e authored by rdubner's avatar rdubner

Debug

parent ae63ab14
......@@ -48,7 +48,7 @@
using namespace std;
#define DUMPING
//#define DUMPING
void
scan_test(const string &filename)
......
......@@ -1136,15 +1136,49 @@ VARIABLE_TREE::Consolidive(VAR_NODE *node,const DATA_DESCRIPTIONS &data_descript
// We do! Save the index
index = data_description.GetIndex(program_id,base_symbol,offset);
node->data_description_index = index;
node->base_symbol = data_description[index].c_symbol;
node->offset = data_description[index].field_data_offset ;
node->best_size = data_description[index].field_size ;
node->best_picture = data_description[index].picture_string ;
node->attr_type = data_description[index].attr_type ;
node->attr_digits = data_description[index].attr_digits ;
node->attr_scale = data_description[index].attr_scale ;
node->attr_flags = data_description[index].attr_flags ;
DATA_DESCRIPTION symbol = data_description[index];
// Here is where we combine the VARIABLE_TREE data with the DATA_DESCRIPTIONS
// data to create everything we need:
node->base_symbol = base_symbol;
if( symbol.storage_size EQ 0 ) {
node->best_size = symbol.field_size;
} else if( symbol.field_size EQ 0 ) {
node->best_size = symbol.storage_size;
} else {
node->best_size = symbol.field_size;
}
if( node->picture.empty() ) {
node->best_picture = symbol.picture_string;
} else if ( symbol.picture_string.empty() ) {
node->best_picture = node->picture;
} else {
// If they're both on, go with the one from the listing file
node->best_picture = node->picture;
}
if( node->level EQ 66 ) {
// The .cbl.lst file doesn't have good offset information
// for 66 REDEFINES. But the symbol *might* have good information,
// which it gets from the f_ field_attribute record when the 66
// variable is referenced in the code.
node->offset = symbol.field_data_offset ;
}
node->base_symbol = symbol.c_symbol ;
node->attr_type = symbol.attr_type ;
node->attr_digits = symbol.attr_digits ;
node->attr_scale = symbol.attr_scale ;
node->attr_flags = symbol.attr_flags ;
} else {
node->best_size = node->size;
node->best_picture = node->picture;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment