This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Group section


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]