ctf_encoder: Add void (void) signature for functions not found on DWARF

Temporary hack till I figure out how to do more filtering on the functions on
the symtab that aren't in the DWARF info.

Problem is that if we don't put something on the table at encode time, we won't
find it at decode time, when we don't have DWARF to notice that its not there
because its not in DWARF.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-04-01 14:11:51 -03:00
parent deb509cf6c
commit b911a0aa7a
1 changed files with 5 additions and 1 deletions

View File

@ -277,21 +277,25 @@ int cu__encode_ctf(struct cu *self)
continue;
uint64_t addr = elf_sym__value(&sym);
int64_t position;
function = hashaddr__find_function(hash_addr, addr);
if (function == NULL) {
fprintf(stderr, "%4d: %-20s %#llx %5u NOT FOUND!\n",
id, sym_name,
(unsigned long long)addr, elf_sym__size(&sym));
err = ctf__add_function(ctf, 0, 0, 0, &position);
if (err != 0)
goto out_err_ctf;
continue;
}
const struct ftype *ftype = &function->proto;
int64_t position;
err = ctf__add_function(ctf, function->proto.tag.type,
ftype->nr_parms,
ftype->unspec_parms, &position);
if (err != 0) {
out_err_ctf:
fprintf(stderr,
"%4d: %-20s %#llx %5u failed encoding, "
"ABORTING!\n", id, sym_name,