Debug

From VideoLAN Wiki
Revision as of 15:10, 20 December 2009 by Thannoy (talk | contribs) (Add see also section.)
Jump to navigation Jump to search

When compiling VLC media player, you can compile a debug binary using --enable-debug on the ./configure script.

Those debug facts are common to every programs, not only VLC.

What it is used for

Of course, the binary compiled in debug mode will or should behave like the release one (more or less). Differences are

  • developers can cause VLC to crash when it reached a suspicious state for development purpose, while release version will not in the same suspicious state
  • binary backtraces are meaningful in this mode since symbols are embedded in it.


So its main usage is for developers to use debug-friendly binaries and to reproduce a crash and get its backtrace.

How to enable it

As said above, you basicly just have to add --enable-debug parameter at the ./configure stage. better is to also add --disable-optimization and not use --enable-release.


Backtraces

A backtrace is a snapshot of a process at the time it is about to crash.


What does it look like?

Here is a debug-friendly backtrace:

TODO insert a VLC backtrace with all symbols

Here is a not debug-friendly backtrace, unuseful in fact.

TODO insert a backtrace from a VLC release


As you can see, developers can't cope with last backtrace.


Is a backtrace enough to debug?

It is not enough for someone else than you to fix a bug. At least, you really should describe what you were doing, how to reproduce the bug if you can, etc.

If you try to fix a bug with someone else or if you are asking help on your backtrace, better is really to use an up-to-date VLC source-code. Otherwise, say so and maybe give the commit ID/VLC tag you are working on.


See also

  • Report_bugs
  • VLC_report