- Online Community Forums » Installation, Setup & Configuration » Allegro "debug" library files

This thread is locked; no one can reply to it. rss feed Print
Allegro "debug" library files
Member #11,279
August 2009

What's the difference between the "debug" library files and the others?

Member #3,861
September 2003

There are debugging symbols so the debugger won't display garbage ?

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Member #907
January 2001

To expand and this answer : Typically, the "debug" version of a library keeps track of data which would otherwise not be preserved during compilation, such as function names.
Also, line numbers relative to the original code, and it's compiled with less optimizations, which makes the executable behave more like the source code, and thus easier to follow in a debugger if you have the corresponding source code.
(With maximum optimization, the compiler could remove variables as it uses registers instead, and do some very smart stuff like inline functions and loop unrolling...)

Chris Katko
Member #1,881
January 2002

In otherwords if your game crashes, it'll say:

??? + ???                 //actual place where it exploded
??? + ???
??? + ???

Without debug symbols. And this:

allegro_function4()+[linenumber] //actual place where it exploded

With debug symbols. If the error blows up in Allegro (or a syscall) you want those symbols.

Also, debugging (usually) shuts off optimization because often times aggressive optimizations change the structure of the code so much that the symbols become difficult for a compiler to figure out. The compiled code is vastly different from the SOURCE code (because it was changed to optimize it), so it has a much harder time trying to link "line X of source file Y" to "bytecode 320282" in memory.

“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Member #7,827
October 2006

Additionally, Allegro's debug libraries enable internal asserts. E.g. if you pass NULL to al_draw_bitmap, you'll get an assert as opposed to a segfault. Additionally, the debug versions of the library will log things to a log file (this can be enabled in release versions as well, so it's just a change in the default).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: