#define ARGP_tolerant 302
#define ARGP_ref 303
#define ARGP_nohl 304
+#define ARGP_dump_off 305
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
N_("Don't run high-level tests"), 0 },
{ "verbose", 'v', NULL, 0,
N_("Be verbose"), 0 },
+ { "dump-offsets", ARGP_dump_off, NULL, 0,
+ N_("Dump DIE offsets to stderr as the tree is iterated."), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
static bool be_tolerant = false; /* --tolerant */
static bool show_refs = false; /* --ref */
static bool do_high_level = true; /* ! --nohl */
+static bool dump_die_offsets = false; /* --dump-offsets */
/* True if coverage analysis of .debug_ranges vs. ELF sections should
be done. */
do_high_level = false;
break;
+ case ARGP_dump_off:
+ dump_die_offsets = true;
+ break;
+
case 'i':
tolerate_nodebug = true;
break;
prev_die_off = die_off;
got_die = true;
+ if (dump_die_offsets)
+ fprintf (stderr, "%s: abbrev %" PRId64 "\n",
+ where_fmt (&where, NULL), abbr_code);
/* Find the abbrev matching the code. */
prev_abbrev = abbrev;
struct relocation_data *reloc,
struct cu_coverage *cu_coverage)
{
+ if (dump_die_offsets)
+ fprintf (stderr, "%s: CU starts\n", where_fmt (&cu->where, NULL));
uint8_t address_size;
bool retval = true;