Debugging Bluefish: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
m (SVN replace CVS)
(Update. Added special information for Debian.)
Line 10: Line 10:
  svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish/
  svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish/


=== Compile with debugging output===
=== Debugging symbols===
* ./configure
 
* make clean
To create a meaningful backtrace you'll need a binary with the debugging symbols attached. Otherwise your backtrace will contain a lot of question marks and won't be useful.
* make
 
'''do not run ''make install''''' since it strips the debugging symbols from the executable!
==== Compile with debugging symbols from source ====
 
To compile the bluefish source with debugging symbols, CFLAGS must contain '''-g'''.
 
The stable version of bluefish, namely 1.0.X at the time of writing, currently strips the debugging symbols during the installation step ('''make install'''). In this case only re-compile the sources and run the resulting binary '''src/bluefish''' in the GNU Debugger.
 
==== Install debugging symbols on Debian/Ubuntu systems ====
 
To receive debugging symbols for the 1.0 stable series of bluefish in [http://packages.debian.org/bluefish Debian]/[http://packages.ubuntu.com/bluefish  Ubuntu] the sources must be recompiled without stripping the resulting binary. This is done by following these steps <ref>More to find in the [http://wiki.debian.org/HowToGetABacktrace Debian Wiki]</ref>:
 
DEB_BUILD_OPTIONS="nostrip noopt" fakeroot apt-get -b source bluefish
 
For the current development series 1.3 the [http://debian.wgdd.de/debian/ Debian] and [http://debian.wgdd.de/debian/#ubuntu Ubuntu] packages come with a package shipping the debugging symbols: '''bluefish-unstable-dbg'''. Just install it the usual way. You might need some more packages of this type: '''libc6-dbg''', '''libglib2.0-0-dbg''', '''libgtk2.0-0-dbg''', '''libpcre3-dbg''', '''libxml2-dbg'''. This requires some space on your harddrive, but will help us to track down your problem and help '''you'''.
 
References: <references/>


=== Run Bluefish in the debugger===
=== Run Bluefish in the debugger===

Revision as of 14:30, 10 October 2009

Howto provide Bluefish debugging information

For a specific release

  • get the source of this release

For the latest development release

svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish/

Debugging symbols

To create a meaningful backtrace you'll need a binary with the debugging symbols attached. Otherwise your backtrace will contain a lot of question marks and won't be useful.

Compile with debugging symbols from source

To compile the bluefish source with debugging symbols, CFLAGS must contain -g.

The stable version of bluefish, namely 1.0.X at the time of writing, currently strips the debugging symbols during the installation step (make install). In this case only re-compile the sources and run the resulting binary src/bluefish in the GNU Debugger.

Install debugging symbols on Debian/Ubuntu systems

To receive debugging symbols for the 1.0 stable series of bluefish in Debian/Ubuntu the sources must be recompiled without stripping the resulting binary. This is done by following these steps <ref>More to find in the Debian Wiki</ref>:

DEB_BUILD_OPTIONS="nostrip noopt" fakeroot apt-get -b source bluefish

For the current development series 1.3 the Debian and Ubuntu packages come with a package shipping the debugging symbols: bluefish-unstable-dbg. Just install it the usual way. You might need some more packages of this type: libc6-dbg, libglib2.0-0-dbg, libgtk2.0-0-dbg, libpcre3-dbg, libxml2-dbg. This requires some space on your harddrive, but will help us to track down your problem and help you.

References: <references/>

Run Bluefish in the debugger

use 'gdb src/bluefish' to run bluefish in the debugger, ('gdb src/bluefish-unstable'for development tree) do not* run gdb bluefish or gdb /usr/local/bin/bluefish since these binaries do not have any debugging symbols anymore

  • type 'r' to start
  • reproduce the crash
  • copy & paste the last 50 lines of debugging output to an email
  • type 'bt' to get the backstrace info, and copy it also to the mail (if it is over 50 lines, the first lines of the backtrace info are the most interesting)
  • send the mail to the general address, the mailinglist or a specific developer

This is what a Backtrace Should Look Like.

What other information you should provide to the developers

  • the platform you are using
  • the gtk version you are using
  • the compiler version you are using
  • any non-default ./configure options
  • the pcre version you are using if you think that is related
  • the gnome-vfs version you are using if you think that is related
  • the libaspell version you are using if you think that is related

debugging a Gtk-Critical error

If you set the environment var GDEBUG to fatalwarnings (export GDEBUG=fatalwarnings with bash), it should assert when there is an error. If you then launch your program with gdb, you can get a backtrace.