Skip to content

Debugging the c code

Peter Willendrup edited this page Jan 14, 2026 · 5 revisions

Debugging tips

If you get core-dumps, segfaults etc., there is no way around debugging your code to figure out what is happening...

Linux and windows

Use GDB: First, compile the generated c-code including debugging symbols.

gcc -g Instrument_stripped.c -o Instrument_stripped.out

On windows it may be preferrable to use the .exe-suffix for the executable.

Then start the debugger with

gdb Instrument_stripped.out

macOS

Use LLVM, here is a list of command equivalences https://lldb.llvm.org/use/map.html

Clone this wiki locally