Open Jalle19 opened 1 year ago
-ggdb should generally help. The other option is to run minisatip inside of gdb: gdb --args minisatip -f ....
What do you mean by -gdbg?
-ggdb should be in gcc arguments...this enabled debugging info for gdb
Seems like tvheadend does this:
CFLAGS += -g
ifeq ($(CONFIG_CCDEBUG),yes)
CFLAGS += -O0
else
CFLAGS += -O2 -D_FORTIFY_SOURCE=2
endif
Generally is really hard to debug with anything higher than -O0
Maybe we should just always build with -g -O0 on all builds then so when a crash happens we can always get a trace?
That wht I was thinking too… but on null deference this can still happen if running minisatip outside of gdb
There is also asan which can help with the stack traces but did not invest much time to look into that (make debug)
Is there anything special needed during compilation to make
addr2line
work? I got a rare crash recently and it sucks to not be able to see what actually happened.@catalinii help?