Re: How to compile modules with debug symbols

From: Andrey V. Elsukov <bu7cher_at_yandex.ru>
Date: Tue, 22 Apr 2025 07:50:11 UTC
On 22.04.2025 02:56, Farhan Khan wrote:
>>>> On Dec 18, 2024, at 4:40 AM, Stasia Powless <stasiapowlessjkk42@gmail.com> wrote:
>>>>
>>>> 
>>>> Hi, everyone. I just learned how to develop modules 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.

Hi,

I think just add DEBUG_FLAGS should help keep debug version.

   make DEBUG_FLAGS=-g

-- 
WBR, Andrey V. Elsukov