Project

General

Profile

Bug #17585 » ruby-addr2line-dwarf5.patch

xtkoba (Tee KOBAYASHI), 02/05/2021 05:12 AM

View differences:

addr2line.c
}
static void
di_skip_die_attributes(char **p)
{
for (;;) {
uint64_t at = uleb128(p);
uint64_t form = uleb128(p);
if (!at && !form) break;
switch (form) {
default:
break;
case DW_FORM_implicit_const:
sleb128(p);
break;
}
}
}
static void
di_read_debug_abbrev_cu(DebugInfoReader *reader)
{
uint64_t prev = 0;
......
prev = abbrev_number;
uleb128(&p); /* tag */
p++; /* has_children */
/* skip content */
for (;;) {
uint64_t at = uleb128(&p);
uint64_t form = uleb128(&p);
if (!at && !form) break;
}
di_skip_die_attributes(&p);
}
}
......
/* skip 255th record */
uleb128(&p); /* tag */
p++; /* has_children */
/* skip content */
for (;;) {
uint64_t at = uleb128(&p);
uint64_t form = uleb128(&p);
if (!at && !form) break;
}
di_skip_die_attributes(&p);
for (uint64_t n = uleb128(&p); abbrev_number != n; n = uleb128(&p)) {
if (n == 0) {
fprintf(stderr,"%d: Abbrev Number %"PRId64" not found\n",__LINE__, abbrev_number);
......
}
uleb128(&p); /* tag */
p++; /* has_children */
/* skip content */
for (;;) {
uint64_t at = uleb128(&p);
uint64_t form = uleb128(&p);
if (!at && !form) break;
}
di_skip_die_attributes(&p);
}
return p;
}
......
case DW_AT_ranges:
ranges_set(&ranges, &v);
break;
case DW_AT_entry_pc:
goto skip_die;
case DW_AT_declaration:
goto skip_die;
case DW_AT_inline:
(1-1/3)