Group section
Mark Wielaard
mark@klomp.org
Tue Mar 21 21:24:00 GMT 2017
On Tue, Mar 21, 2017 at 08:46:25PM +0000, SASHA NICOLAS DA ROCHA PINHEIRO wrote:
> That's the problem. It says "no error" once, in another call it says
> "no reference value", and in another call "no DWARF information".
> [...]
> > 106Â Â Â Â file_data = dwarf_begin_elf(file->e_elfp(), DWARF_C_READ, NULL);Â Â Â Â Â Â Â Â Â Â Â Â
> > 107Â Â Â Â cerr << "Error message:" << dwarf_errmsg(-1) << endl;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> > 108Â Â Â Â if (!file_data) {Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> > 109Â Â Â Â Â Â Â Â init_dwarf_status = dwarf_status_error;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> > 110Â Â Â Â Â Â Â Â return false;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> > 111Â Â Â Â }
Note that if file_data != NULL then the result of dwarf_errmsg (-1)
is undefined. You should first check file_data == NULL before calling
dwarf_errmsg (-1).
Cheers,
Mark
More information about the Elfutils-devel
mailing list