Commit 288485a3 authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

new dumper,

fixed default flag in enum

[r5325]
parent 8eb0a125
......@@ -352,7 +352,8 @@ typedef enum {
dump_verbosity_onlyPrimitiveTypes = 0x000BF000, /**< dump only primitive types */
dump_verbosity_onlyEnumerationTypes=0x0007F000, /**< dump only enumeration types */
dump_verbosity_max = 0x4FF00FFE /**< turn on all verbosity.
dump_verbosity_max = 0x4FF00FBE /**< turn on all verbosity.
Do not turn on negative flags!
@@@ Because of a bug in gcc 3.2 we can not set the
first two bits. */
} dump_verbosity;
......@@ -390,6 +391,11 @@ void dump_type (type *tp);
*/
void dump_types_as_text(unsigned verbosity, const char *suffix);
/** Dumps all global variables as text.
*
*/
void dump_globals_as_text(unsigned verbosity, const char *suffix);
/* **************************************************************************** */
/* FLAGS */
/* **************************************************************************** */
......
......@@ -977,3 +977,31 @@ void dump_types_as_text(unsigned verbosity, const char *suffix) {
fclose (F);
if (CSV) fclose (CSV);
}
void dump_globals_as_text(unsigned verbosity, const char *suffix) {
const char *basename;
FILE *F, *CSV = NULL;
type *g = get_glob_type();
int i, n_mems = get_class_n_members(g);
basename = irp_prog_name_is_set() ? get_irp_prog_name() : "TextGlobals";
F = text_open (basename, suffix, "-globals", ".txt");
if (verbosity & dump_verbosity_csv) {
CSV = text_open (basename, suffix, "-types", ".csv");
//fprintf(CSV, "Class, Field, Operation, L0, L1, L2, L3\n");
}
for (i = 0; i < n_mems; ++i) {
entity *e = get_class_member(g, i);
dump_entity_to_file(F, e, verbosity);
if (CSV) {
//dump_entitycsv_to_file_prefix(CSV, e, "", verbosity, ""???);
}
}
fclose (F);
if (CSV) fclose (CSV);
}
Supports Markdown
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