On Tue, Nov 05, 2024 at 04:24:29PM +0000, Ben Huntsman wrote: > Hi there! > Thanks for the reply! > > > Getting the debug build working might be more fruitful than starting at a > coarse-grained backtrace or debug-via-printf. > > I'm looking into this. On FreeBSD 14.1, we have both gcc 13.3.0 and clang > 18.1.5 installed. If we just run ./configure, it selects gcc by default. > Building with gcc compiles with a few changes, but throws all those CTF > errors. building with clang breaks on this: > > src/rx/rx_packet.c:1770:13: error: passing arguments to a function without a > prototype is deprecated in all versions of C and is not supported in C23 > [-Werror,-Wdeprecated-non-prototype] > 1770 | (*free) (amb); > | ^
That looks like a new compiler rightly complaining about super-janky code, on first look. It's vaguely possible that there are some preprocess ifdefs such that we shouldn't actually be trying to build that code for FreeBSD but it looks like that's the only implementation of rx_mb_to_packet() and the function is referenced from FBSD/rx_knet.c so I think we need to fix it. > Going back to the gcc build, I used the following configure options: > > --enable-transarc-paths --enable-kauth --enable-debug --enable-debug-kernel > --enable-debug-locks --enable-debug-lwp > > However, something doesn't look right in the kernel module. Shouldn't there > be more than this: > > objdump --syms /usr/vice/etc/libafs.ko | grep debug > 00000000000006c8 l O .bss 0000000000000008 debugvc > 000000000025c9f8 l O .bss 0000000000000004 debugsetsp > 000000000025a7c0 l O .bss 0000000000000008 rx_tq_debug > 0000000000000000 l d .gnu_debuglink 0000000000000000 .gnu_debuglink > > > When I run kgdb during the startup messages it prints this: > > Reading symbols from /usr/vice/etc/libafs.ko... > (No debugging symbols found in /usr/vice/etc/libafs.ko) > > Any idea how to actually enable debugging info on the kernel module? So, not speaking with certainty here, but we do leverage very heavily the stock FreeBSD kernel module build logic for our kmod build, which means that some of the OpenAFS-specific knobs may not be doing much. Are you running a kernel config with makeoptions DEBUG=-g? It looks like since a9c1939eeb36372872f3258a9ae7259a564332c3 we assume GENERIC is used, so if you're doing a custom kernel you'd need to pass --with-bsd-kernel-build to configure. -Ben _______________________________________________ OpenAFS-devel mailing list [email protected] https://lists.openafs.org/mailman/listinfo/openafs-devel
