From nobody Fri Apr 18 17:54:11 2025 X-Original-To: drivers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZfMq00VYNz5t8BP for ; Fri, 18 Apr 2025 17:54:52 +0000 (UTC) (envelope-from paige@paige.bio) Received: from outbound.pv.icloud.com (p-west1-cluster6-host12-snip6-10.eps.apple.com [IPv6:2a01:b747:3003:204::7b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZfMpy4rgXz42Rf for ; Fri, 18 Apr 2025 17:54:50 +0000 (UTC) (envelope-from paige@paige.bio) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=paige.bio header.s=sig1 header.b=LVzk3ykM; dmarc=pass (policy=reject) header.from=paige.bio; spf=pass (mx1.freebsd.org: domain of paige@paige.bio designates 2a01:b747:3003:204::7b as permitted sender) smtp.mailfrom=paige@paige.bio DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paige.bio; s=sig1; bh=uYgjxn2VbyQwkzA/4Jo3TIEMcWoOrAYPfvVr0WDYygM=; h=Content-Type:From:Mime-Version:Date:Subject:Message-Id:To:x-icloud-hme; b=LVzk3ykMwpAHacbOkEIeeqEbmlEKiiREsLtEnMSU5cmL5fcmwCUFC6J6HXqn9JudB 2F3qjMB5Revd2y32PLJJNW8nRdfYGofAy1AMFZ70xYdu0CCC41mTaUyIhH6kcVJwOo kFZ8V6iMMFacHJcS3ObDB64L8re6qL7VwdznxFLwHycmOBcp7iTJW/2o7EOjyJ9EvF b+D0wYSHBa1N8pCtBT6SpqexjQj1WSx73ObZVghfMwGdXvYBOVxrZMfUMzhJeobxTS RT7dTXSMZ+XwydN7mWkvRth6lwfHTcPihD5nxc6wuUwY5yG2tT2kSu0W3Q9Z4kQ+0+ nLUE9nJcb9x5A== Received: from outbound.pv.icloud.com (localhost [127.0.0.1]) by outbound.pv.icloud.com (Postfix) with ESMTPS id DC2A21802739 for ; Fri, 18 Apr 2025 17:54:42 +0000 (UTC) Received: from smtpclient.apple (pv-asmtp-me-k8s.p00.prod.me.com [17.56.9.36]) by outbound.pv.icloud.com (Postfix) with ESMTPSA id 17B1C1800A9D for ; Fri, 18 Apr 2025 17:54:42 +0000 (UTC) Content-Type: multipart/alternative; boundary=Apple-Mail-0CFC528E-9D9B-44DB-B737-2B09FE7A5C09 Content-Transfer-Encoding: 7bit From: paige@paige.bio List-Id: Writing device drivers for FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-drivers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-drivers@FreeBSD.org Mime-Version: 1.0 (1.0) Date: Fri, 18 Apr 2025 10:54:11 -0700 Subject: How to compile modules with debug symbols Message-Id: <9B8B88AA-90C3-4ECF-B1A0-F847F46BB558@paige.bio> References: <62B2D776-F339-4715-A3CE-603F0973F850@paige.bio> To: drivers@freebsd.org X-Mailer: iPhone Mail (22E240) X-Spamd-Result: default: False [-1.49 / 15.00]; NEURAL_SPAM_LONG(1.00)[0.999]; NEURAL_HAM_MEDIUM(-0.96)[-0.960]; NEURAL_HAM_SHORT(-0.73)[-0.729]; DMARC_POLICY_ALLOW(-0.50)[paige.bio,reject]; MIME_HTML_ONLY(0.20)[]; R_DKIM_ALLOW(-0.20)[paige.bio:s=sig1]; R_SPF_ALLOW(-0.20)[+ip6:2a01:b747:3003:200::/56:c]; MIME_GOOD(-0.10)[multipart/alternative]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[paige.bio:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; APPLE_IOS_MAILER_COMMON(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:714, ipnet:2a01:b747:3003::/48, country:US]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_NO_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[drivers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[drivers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+,1:~] X-Rspamd-Queue-Id: 4ZfMpy4rgXz42Rf X-Spamd-Bar: - --Apple-Mail-0CFC528E-9D9B-44DB-B737-2B09FE7A5C09 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
=
Sent from my iPhone

Begin forward= ed message:

From:= paige@paige.bio
Date: April 18, 2025 at 10:51:51=E2=80=AFAM P= DT
To: Stasia Powless <stasiapowlessjkk42@gmail.com>
S= ubject: Re: How to compile modules with debug symbols

=EF=BB=BF
makeopt= ions     DEBUG=3D-g             &nbs= p;  # Build kernel with gdb(1) debug symbols
options   &= nbsp;     INVARIANTS
options        = INVARIANT_SUPPORT
options         WITNESS
options         WITNESS_SKIPSPIN
option= s         DEBUG_LOCKS
options     &n= bsp;   DEBUG_VFS_LOCKS
options         DI= AGNOSTIC

These were all helpful to me for debugging= , I think you just want -g though 

Sent from my iPhone

On D= ec 18, 2024, at 4:40=E2=80=AFAM, Stasia Powless <stasiapowlessjkk42@gmail= .com> wrote:

=EF=BB=BF
Hi, everyone. I just learned how to develop module= s in FreeBSD.
A simple= one with this Makefile
```
KMOD=3D   hello
SRCS=3D   hello.c
<= div>
.include <bsd.kmod.mk>
<= div class=3D"gmail-protonmail_signature_block-proton">```
Type `make` and it works. But no d= ebug symbols by default.

Th= ere are variables in `sys/conf/kmod.mk<= /span>` which control the compiling process. But I did not find anyone that c= an help to add debug symbols.

Thanks.
= --Apple-Mail-0CFC528E-9D9B-44DB-B737-2B09FE7A5C09--