Debugging (with GDB)
ARB functions useful for debugging
- GB_dump(GBDATA*)
prints a dump of the database element. Crashes easily - see below on how to continue.
- GB_dump_db_path(GBDATA*)
prints the hierarchical path from DB root to given element
gdb usage e.g.:
p GB_dump(variable)
Continuing after assertions
Since ARB heavily uses assertions the debugger will easily stop execution with a segmentation fault. Here are some commands making it possible to continue nevertheless:
- return [returnvalue]
returns from the currently selected stackframe (with returnvalue if given). All stackframes below are discarded.
- jump [linespec]
jump to linespec (e.g. behind the currently failed assertion)
- signal 0
Works like continue, but discards a previously signaled signal (e.g. SIGSEGV)
