diff options
| author | Roland McGrath <[email protected]> | 2009-08-28 15:26:24 -0700 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2009-08-28 15:26:24 -0700 |
| commit | 7367eb6f3f7c386afcea85b80ca1c6c21b561832 (patch) | |
| tree | 392fa78e3ca5d5cc9242728322deb6a8885f8ea8 /tests/print-die.cc | |
| parent | 785f2505c7ba0102e611fdbbaeac3f7629e85d53 (diff) | |
Fiddle stats output.
Diffstat (limited to 'tests/print-die.cc')
| -rw-r--r-- | tests/print-die.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/print-die.cc b/tests/print-die.cc index 728eb74a..6816632a 100644 --- a/tests/print-die.cc +++ b/tests/print-die.cc @@ -49,6 +49,7 @@ static bool sort_attrs; static bool elide_refs; static bool dump_refs; static bool no_print; +static bool output_stats; static enum { copy_none, copy_edit, copy_output } make_copy; @@ -107,6 +108,13 @@ print_die_main (int &argc, char **&argv, unsigned int &depth) ++argv; } + if (argc > 1 && !strcmp (argv[1], "--stats")) + { + output_stats = true; + --argc; + ++argv; + } + if (argc > 1 && !strcmp (argv[1], "--silent")) { no_print = true; @@ -315,6 +323,8 @@ print_file (const char *name, const file &dw, const unsigned int limit) { dwarf_output_collector c; // We'll just throw it away. print_file (dwarf_output (dw, c), limit); + if (output_stats) + c.stats (); } break; default: |
