From nobody Thu Aug 31 19:04:36 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 4Rc9ZZ1ZTWz4rVVp for ; Thu, 31 Aug 2023 19:04:38 +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) client-signature RSA-PSS (2048 bits)) (Client CN "mail.tutanota.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc9ZY4Kk3z4bC2 for ; Thu, 31 Aug 2023 19:04:37 +0000 (UTC) (envelope-from electricjozin@tutanota.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tutanota.com header.s=s1 header.b=lJnVfqZs; 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 C6527FBFBC0 for ; Thu, 31 Aug 2023 19:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1693508676; 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=C3+D+KxCSlJjzyzK+/KESyDYQHfzodoWLQmjP7s4PRk=; b=lJnVfqZstbT0WKj0W1qQUEMN8RCweGj4q10F5IJ/hM0yducE5MgfgKe5zZugdjkq jzYM+N+V6S/EqcwG3wm1CUvMvUiH45segwsz119iIcu6n4oY585tfh+T+O6RTi+aQOw RL3t5pjaQvn/+w9PzNzRHVjvxxt1zpOvpIY9gKvH8rSqDFbz8IWCPoD+h4cCP2f+Rii 3nqi9Z9VM0ik8+8G3Z7XDlDosZ25+vicVV8Vm+hNqROLkjm4XnDiAXGozmTQyaPcd5s x/GI1IQQ9t4pCesjKidwG9rtxsQyfuzg4ngZWETieumt0HIM4/KKeKQuzOqOAjWSgFN 5VNvPp/c/Q== Date: Thu, 31 Aug 2023 21:04:36 +0200 (CEST) From: electricjozin@tutanota.com To: Go Message-ID: Subject: [Patch] 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_195079_2034813232.1693508676806" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.09 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.89)[-0.887]; DMARC_POLICY_ALLOW(-0.50)[tutanota.com,quarantine]; RWL_MAILSPIKE_EXCELLENT(-0.40)[81.3.6.162:from]; R_DKIM_ALLOW(-0.20)[tutanota.com:s=s1]; R_SPF_ALLOW(-0.20)[+ip4:81.3.6.160/28:c]; MIME_GOOD(-0.10)[multipart/mixed,multipart/alternative,text/plain]; ONCE_RECEIVED(0.10)[]; MIME_UNKNOWN(0.10)[text/x-patch]; ASN(0.00)[asn:24679, ipnet:81.3.0.0/18, country:DE]; MLMMJ_DEST(0.00)[go@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[tutanota.com:+]; HAS_ATTACHMENT(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_NO_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[go@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4Rc9ZY4Kk3z4bC2 ------=_Part_195079_2034813232.1693508676806 Content-Type: multipart/alternative; boundary="----=_Part_195080_2085821375.1693508676806" ------=_Part_195080_2085821375.1693508676806 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_195080_2085821375.1693508676806 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_195080_2085821375.1693508676806-- ------=_Part_195079_2034813232.1693508676806 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_195079_2034813232.1693508676806--