简体   繁体   中英

Getting debug symbols on UNIX


On windows we can get the debug symbols using the dbgHelp library.
How can we do it on UNIX/linux (with c++)?

thanks :)

This is dependent on exactly which Unix version or Linux distribution you are using. For Debian and Debian derived distributions such as Ubuntu you need to install the debug packages using your normal package manager. Fedora uses debuginfo rpms to add the debugging symbols. For other systems I'm afraid you'll have to search yourself.

I'm pretty sure that now all versions of unix used the same format for debugging. Linux for instance has used at least two formats, and several versions of the latter one. That one, DWARF (yes it is a word play, coming along with ELF which is the object format) is standardised and used by some other Unix. There are several variants of a libdwarf which is intended to help reading the debugging information. Look first if one is provided by your unix vendor (ISTR that IBM does on AIX for instance, several Linux distribution are doing the same), if not, search for one suitable on the web.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM