Difference between revisions of "Debugging"

From MythTV Official Wiki
Jump to: navigation, search
m (Updated HOWTO (MythTV Documentation) link.)
(Debugging source-based installs: Added some info about profile builds)
Line 6: Line 6:
  
 
[http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2 Section 22.2] of the [http://www.mythtv.org/docs/ MythTV Documentation], linked from the [http://www.mythtv.org MythTV website] provides details of debugging source-based installs.
 
[http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2 Section 22.2] of the [http://www.mythtv.org/docs/ MythTV Documentation], linked from the [http://www.mythtv.org MythTV website] provides details of debugging source-based installs.
 +
 +
Note, also, that in addition to <code>--compile-type=debug</code>, the MythTV configure script now supports an option, <code>--compile-type=profile</code>.  In many cases, a profile build will be acceptable for creating backtraces.  The main difference between the <code>debug</code> and <code>profile</code> builds is that the <code>debug</code> build disables optimizations.  Therefore, a <code>debug</code> build may perform significantly worse than a <code>profile</code> build.  If you need to run MythTV under gdb for a long time, it may be worthwhile to run a <code>profile</code> build.  If, however, a developer asks you to re-create the backtrace using a <code>debug</code> build, please do so without argument as some portions of the code can only be reliably debugged with a <code>debug</code> build.  However, if your system is sufficiently powerful to run a <code>debug</code> build, you may want to start with that so you can be certain the backtrace will be useful.
  
 
== Debugging package-based installs ==
 
== Debugging package-based installs ==

Revision as of 17:59, 19 March 2009

Debugging MythTV

If any of your MythTV programs crash (segfault), you must generate a proper backtrace before submitting a new bug report. Please also see the Ticket HOWTO for more information before submitting a bug report.

Debugging source-based installs

Section 22.2 of the MythTV Documentation, linked from the MythTV website provides details of debugging source-based installs.

Note, also, that in addition to --compile-type=debug, the MythTV configure script now supports an option, --compile-type=profile. In many cases, a profile build will be acceptable for creating backtraces. The main difference between the debug and profile builds is that the debug build disables optimizations. Therefore, a debug build may perform significantly worse than a profile build. If you need to run MythTV under gdb for a long time, it may be worthwhile to run a profile build. If, however, a developer asks you to re-create the backtrace using a debug build, please do so without argument as some portions of the code can only be reliably debugged with a debug build. However, if your system is sufficiently powerful to run a debug build, you may want to start with that so you can be certain the backtrace will be useful.

Debugging package-based installs

Note that rather than recompiling to perform the debugging, you may be able to use "debug" packages provided by your packagers. Debug packages simply install the debugging symbols for the already-installed packages you're using, meaning you do not have to uninstall or reinstall MythTV. Often using the debug packages requires enabling a special repo that contains the debug packages.

Debugging with ATrpms packages

Debugging with Ubuntu packages

Debugging with Gentoo ebuilds

Keywords:

* backtrace
* segfault
* tracepoint