[Ubuntu Wiki] Update of "DebuggingProgramCrash" by pitti

Ubuntu Wiki noreply at ubuntu.com
Wed Jul 11 10:05:56 UTC 2012


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 pitti:
http://wiki.ubuntu.com/DebuggingProgramCrash?action=diff&rev1=112&rev2=113

Comment:
document apport-retrace

  <<Include(Debugging/Header)>>
  ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>||
  
- This document describes how to install debug packages on Ubuntu, which will aid in providing information for bugs.
+ This document describes how to debug Ubuntu package crashes and install debug packages on Ubuntu, which will aid in providing information for bugs.
+ 
+ == Using apport-retrace ==
+ 
+ If you want to debug a crash in packaged Ubuntu software, [[https://wiki.ubuntu.com/Apport|Apport]] will usually pick it up, create a `.crash` report in `/var/crash/` and report the crashed program. From there it is easiest to use [[http://manpages.ubuntu.com/apport-retrace|apport-retrace]].
+ 
+ `apport-retrace` regenerates  the  stack  traces  (both the simple and the threaded one) from an apport crash report from the included core dump, or gives you a Terminal window with gdb in an environment with debugging symbols, reproducing the situation of the crash through the core dump. For this it figures out the set of necessary packages  and their accompanying debug symbol packages, so that the regenerated stack trace will be fully symbolic and thus become much more useful for developers to fix the problem.
+ 
+ `apport-retrace` has two modes: By default it will just regenerate traces based on the packages  which are  currently  installed  in  the system, i. e. it assumes that all necessary debug symbols for the report are installed (see the next paragraph for this). When specifying the `-S` option, it creates a temporary "sandbox" and  downloads and installs all necessary packages and debug symbols there. It will not do any changes to your system and does not require any special privileges.
+ 
+ Please see the [[http://manpages.ubuntu.com/apport-retrace|apport-retrace manpage]] for details and some examples how to run it.
+ 
+ You can also invoke this directly from the Apport crash notification, by clicking the "Examine locally" button:
+ 
+  {{attachment:apport-examine-locally.png}}
+ 
+ This will collect some package information and then ask you in which mode you want to run `apport-retrace`:
+ 
+  {{attachment:apport-retrace-gui.png}}
+ 
+ Normally you want to keep the first option, which will get you in a gdb session
+ in the sandbox:
+ 
+  {{attachment:apport-retrace-gdb.png}}
+ 
+ If you do not want an interactive gdb session but just want it to update the already existing `.crash` file with fully symbolic stack traces, you can select the third option.
  
  == Debug Symbol Packages ==
+ If you want to debug a crash in a project you are developing yourself or from a third-party package, or need the debug symbols for particular libraries very often, it is helpful to install those permanently into your system.
  
  First, check if there is a package with a -dbg suffix in the main Ubuntu repositories. These are the debug symbol packages, and are equivalent to '-dbgsym' described below. You can safely use either one, but not both at once. Try installing the package, adding -dbg to its name, for example:
  {{{



More information about the Ubuntu-bugsquad mailing list