03-19-2010 04:45 AM
Incase any failure occurrs ,our application will read the debug information from the stored/extracted file and give proper trace information to the user ( with source , line number where error occured etc debug information).
We are working on HP Itanium and we have code in Solaris and Linux which does the extraction of the debug information. But Solaris and Linux supports ELF STAB format while HP Itanium supports DWARF2 format. Basically we need to extract informations like function name , src file names . source code of functions/sybols , size of function, start offset in exe, 1st function in source file, last function in src file, etc(the information in STAB in Solaris) using the DWARF2 format.
In short this is more or less similar to a debugger code .
Is there any open source code or any API which we can re-use to attain this in HP Itanium ( DWARF2 reader )?
03-20-2010 01:40 AM
You would have to use +noobjdebug.
>we need to extract info like function name, src filenames. size of function, start offset in exe,
This info is already in the minimal line table and you don't need -g to include it.
03-22-2010 01:16 AM
It reads DWARF2 debugging information from binary.
You can download WDB and its source files from www.hp.com/go/wdb
The code that does this stuff is in file dwarf2read.c.
Hope this helps you.