How to compile modules with debug symbols
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Dec 2024 14:33:43 UTC
Hi, everyone. I just learned how to develop device drivers in FreeBSD. A simple one with this Makefile. ``` KMOD= hello SRCS= hello.c .include <bsd.kmod.mk> ``` Type `make` and it works. But no debug symbols by default. I followed `bsd.kmod.mk` and found `sys/conf/kmod.mk`. There are dozens of variables in `sys/conf/kmod.mk` which control the compiling process. But I did not find one that helps to add debug symbols or add `-g` into the CFLAGS. Thanks.