From nobody Sat Sep 02 10:20:16 2023 X-Original-To: go@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 4Rd9rg5808z4rVbw for ; Sat, 2 Sep 2023 10:20:19 +0000 (UTC) (envelope-from electricjozin@tutanota.com) Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.tutanota.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rd9rf1HCKz4M89 for ; Sat, 2 Sep 2023 10:20:18 +0000 (UTC) (envelope-from electricjozin@tutanota.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tutanota.com header.s=s1 header.b="b6/9CWdZ"; spf=pass (mx1.freebsd.org: domain of electricjozin@tutanota.com designates 81.3.6.162 as permitted sender) smtp.mailfrom=electricjozin@tutanota.com; dmarc=pass (policy=quarantine) header.from=tutanota.com Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 23D25FBF977 for ; Sat, 2 Sep 2023 10:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1693650016; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Yw9cHm7Hihlb/qJZcZuovinOwqR+HInt73UFZauXnik=; b=b6/9CWdZxRfCYjNBNni50C06VMxO9qDz/11jC/Vb99MoD8gGh+3gjcYjyd1iAsIR gtiVbgEZVhevNj/aXWMtBWQbFRNZ43eS7fyAD7t14XPv5qGOfn99XpxINWrf+1nPD5i oO+7R8u+4vqmrAzvYx7fhiH1/w2+2S1MqLb0yUcIxMEJ4EQShYizaOlasKNIudH0ODU 7154dxTc/Uezfh7QIvsPLfV3dzLHKApGPGmb5XrWNaOgbW5/8yxQ319SnLvWvMeVoVf xxvYtUA+s8Ap9cWdbUn/xhuwGnFm5YjR2Oi1pU1Iel6BROyM0SSMZ0uGEn4/dM1Lz2Z mqckGol81Q== Date: Sat, 2 Sep 2023 12:20:16 +0200 (CEST) From: electricjozin@tutanota.com To: Go Message-ID: Subject: [Path] to ease debugging of ports utilizing go List-Id: Go language ports maintenance List-Archive: https://lists.freebsd.org/archives/freebsd-go List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-go@freebsd.org X-BeenThere: freebsd-go@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_288106_788768906.1693650016136" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.17 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.97)[-0.971]; DMARC_POLICY_ALLOW(-0.50)[tutanota.com,quarantine]; RWL_MAILSPIKE_EXCELLENT(-0.40)[81.3.6.162:from]; R_SPF_ALLOW(-0.20)[+ip4:81.3.6.160/28]; R_DKIM_ALLOW(-0.20)[tutanota.com:s=s1]; MIME_GOOD(-0.10)[multipart/mixed,multipart/alternative,text/plain]; ONCE_RECEIVED(0.10)[]; MIME_UNKNOWN(0.10)[text/x-patch]; RCPT_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~]; ASN(0.00)[asn:24679, ipnet:81.3.0.0/18, country:DE]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[go@freebsd.org]; MLMMJ_DEST(0.00)[go@freebsd.org]; FROM_NO_DN(0.00)[]; HAS_ATTACHMENT(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[tutanota.com:+]; TO_DN_ALL(0.00)[] X-Rspamd-Queue-Id: 4Rd9rf1HCKz4M89 ------=_Part_288106_788768906.1693650016136 Content-Type: multipart/alternative; boundary="----=_Part_288107_1374960687.1693650016136" ------=_Part_288107_1374960687.1693650016136 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, I recently needed to debug sysutils/docker (with gdb) utilizing the WITH_DEBUG_PORTS variable and I noticed some variables got "optimized out". In the attachment is a patch (diff for Mk/Uses/go.mk) that fixes just that. The solution is based on the "Introduction" section here: https://go.dev/doc/gdb Thanks! ------=_Part_288107_1374960687.1693650016136 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi,
I recently needed to debug sysutils/docker (with gdb) utilizing the WITH_DEBUG_PORTS variable and I noticed some variables got "optimized out". In the attachment is a patch (diff for Mk/Uses/go.mk) that fixes just that.
The solution is based on the "Introduction" section here: https://go.dev/doc/gdb

Thanks!
------=_Part_288107_1374960687.1693650016136-- ------=_Part_288106_788768906.1693650016136 Content-Type: text/x-patch; charset=us-ascii; name=go.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=go.patch 99,100c99,102 < . if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) < GO_BUILDFLAGS+= -ldflags=-s --- > . if defined(WITH_DEBUG) > GO_BUILDFLAGS+= -gcflags=all="-N -l" > . elif empty(GO_BUILDFLAGS:M-ldflags*) > GO_BUILDFLAGS+= -ldflags=-s -w ------=_Part_288106_788768906.1693650016136--