[Ubuntu Wiki] Update of "DebuggingProgramCrash" by lathiat

Ubuntu Wiki noreply at ubuntu.com
Mon Dec 9 09:05:58 UTC 2019


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ubuntu Wiki" for change notification.

The "DebuggingProgramCrash" page has been changed by lathiat:
http://wiki.ubuntu.com/DebuggingProgramCrash?action=diff&rev1=127&rev2=128

Comment:
add information about using find-dbgsym-packages

  
  == Automatically installing all debug symbols ==
  
+ You can use the 'find-dbgsym-packages' command from the 'debian-goodies' package to find debug symbols for a core file, running PID or binary path.
+ 
+ For a binary path it only finds debug symbols for the actual binary itself, and not any dynamically linked library dependencies or other libraries loaded at runtime. For that functionality to work you need to use either a core file or running PID which is the preferred method.
+ 
+ This tool will find both "-dbg" and "-dbgsym" style packages. However it only finds debug symbols for apt repositories that are currently enabled and updated, so you need to ensure that you enable at least the "ddebs.ubuntu.com" archive as described elsewhere on this page and for a Launchpad PPA or the Ubuntu Cloud Archive you need to add another source line with the component changed from "main" to "main/debug".
+ 
+ {{{
+ apt install debian-goodies
+ find-dbgsym-packages [core_path|running_pid|binary_path]
+ }}}
+ 
+ If the above tool is not working for you, there is an older shell script that attempts to do this by parsing the gdb output instead however often does not work correctly.
+ 
- This procedure would install every debug symbols, versus only the ones you may need, or are interested in. You can download the following [[attachment:list-symbols-packages-v2.1.sh |shell script (list-symbols-packages-v2.1.sh)]] to resolve all the dependencies. Attaching a debugger to an already running process may require elevated privileges even if you own the process. The following invocation will print out the list of files to install.
+ You can download the following [[attachment:list-symbols-packages-v2.1.sh |shell script (list-symbols-packages-v2.1.sh)]] to resolve all the dependencies. Attaching a debugger to an already running process may require elevated privileges even if you own the process. The following invocation will print out the list of files to install.
  {{{
  sudo bash ./list-symbols-packages-v2.sh -p $(pidof yelp)
  }}} To automatically install them apt can be called with the input from the script. The script is invoked with {{{-t}}} for a terse output without the descriptions of the packages and error messages are suppressed:{{{



More information about the Ubuntu-bugsquad mailing list