kernel module with debugging info

Peter Skvarka <[email protected]> Tue, 25 Mar 2025 13:10:15 +0100
Newsgroups gmane.os.netbsd.devel.toolchain
Organization Soft in Engines
Message-ID <[email protected]>
Hello,
I have kernel module built with -O0 -g2. When I load it into gdb with:
#gdb full_path_to_module.kmod
or
in opened gdb with:
gdb>add-symbol-file full_path_to_module.kmod

the result is:
Reading symbols from full_path_to_module.kmod...
(No debugging symbols found in full_path_to_module.kmod)
(gdb)

How to add debug info to kernel module ?

Peter