Skip to content

Commit

Permalink
CI debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mmat11 committed Oct 2, 2023
1 parent f3ef8ad commit ff6322e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion non-GPL/Events/Lib/EbpfEvents.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ static int resolve_btf_field_off_recur(struct btf *btf,

for (int i = 0; i < btf_vlen(t); i++, m++) {
const char *name = btf__name_by_offset(btf, m->name_off);
printf("field off: %s @ %d+%d", name, base_off, m->offset);
if (name == NULL)
continue;
if (strcmp(name, field) == 0)
if (strcmp(name, field) == 0) {
printf("[OK] %s @ %d+%d", name, base_off, m->offset);
return base_off + m->offset;
}

const struct btf_type *m_type = btf__type_by_id(btf, m->type);
if (!btf_is_struct(m_type) && !btf_is_union(m_type))
Expand All @@ -86,6 +89,7 @@ static int resolve_btf_field_off_recur(struct btf *btf,
return ret;
}

printf("not found: %d+%d", base_off, m->offset);
return -1;
}

Expand Down

0 comments on commit ff6322e

Please sign in to comment.