[Ubuntu Wiki] Update of "DebuggingProgramCrash" by staticd-growthecommons

Ubuntu Wiki noreply at ubuntu.com
Mon Mar 10 13:24:20 UTC 2014


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 staticd-growthecommons:
http://wiki.ubuntu.com/DebuggingProgramCrash?action=diff&rev1=117&rev2=118

Comment:
added new version of file. previous version failed to get the debugsyms for many packages due to interfering arch info on the line.

  }}}
  You can also use the Synaptic Package Manager to search for 'yelp-dbgsym' and install it from there.
  
- The above procedure will install the debug symbol package for yelp only. Chances are that yelp uses shared libraries in other packages and debug symbols for them might be required in order to obtain a readable stack trace. You can download the [[attachment:list-symbols-packages-v2.sh]] shell script and run it (after a chmod a+x list-symbols-packages-v2.sh) this way:
+ The above procedure will install the debug symbol package for yelp only. Chances are that yelp uses shared libraries in other packages and debug symbols for them might be required in order to obtain a readable stack trace or perform other debugging tasks. 
  
- /!\ we updated [[attachment:list-dbgsym-packages-v2.sh]] to [[attachment:list-symbols-packages-v2.sh]]. This is the first change to make it compatible with newer GDB (which does not, by default, load all libraries at start anymore). -v2 is currently only working if you run it against a currently-executing binary (i.e., with '-p $(pidof <whatever>').
+ 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.
+  {{{#!highlight bash
+ 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.
+ 
+  {{{#!highlight bash
-  {{{
- bash list-symbols-packages-v2.sh yelp
- }}}
- in order to obtain a more complete list of symbol packages to install. The script may also attach to a running process and in this case it gives an even more complete list of symbol packages to install, and this is recommended if the problem you are having does not prevent you from running the program. You can usually get the process ID of a running process using <code>pidof</code>, so while you have yelp running you might run:
-  {{{
- bash list-symbols-packages-v2.sh -p $(pidof -s yelp)
+ sudo bash ./list-symbols-packages-v2.sh -t -p $(pidof yelp) 2>/dev/null|\
- }}}
- to get a list of packages that should be installed for best debug information. If the running process is a server (daemon), you might have to run 'list-symbols-packages.sh' with sudo.
+ xargs -d $'\n' sudo apt-get install }}}
+ 
+ /!\ Version 2 of this script makes it compatible with the newer GDB (which no longer loads all libraries at startup by default). -v2 currently only works if you run it against a currently-executing binary (i.e., with '-p $(pidof <whatever>'). The [[attachment:list-symbols-packages.sh|older version]] of the script is also available.
  
   a. Now you make a [[Backtrace]].
   a. You can also run [[Valgrind]], if the program crashes with a "Segmentation fault" or "Bus error".



More information about the Ubuntu-bugsquad mailing list