Skip to content
  • Jehan's avatar
    Bug 793514 - Adding version check for gdb. · 6975188d
    Jehan authored
    It seems that older GDB (under version 7) are not handling very well
    some common debug information format, in particular DWARF > 3. Such
    version of GDB is usually not a problem since it is quite old (more than
    10 years old, it would seem) so you don't see it anymore on any modern
    GNU/Linux distribution. On FreeBSD on the other hand, it is still
    available (probably for license reasons) and even installed by default!
    As a consequence, it makes debugging fail, even though LLDB is also
    installed by default.
    
    That is even more of a problem because it would seem that GIMP is killed
    (most likely by FreeBSD kernel according to the reporter tests) as a
    side-effect of GDB failing, which is seriously bad, in particular since
    we also use the debug dialog for non-fatal errors (which could therefore
    end up killing GIMP as side effect of a bad GDB!).
    
    So I add some GDB version check. I implement this without any dynamic
    memory management, as usual, since this needs to happen also during
    crash handling where the state is unstable and prone to memory
    allocation failure.
    I also add gimp_utils_backtrace_available() public API which can be used
    by the Preferences.
    6975188d