From ace64c013878663bfa153c925e189094ef9abac0 Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Wed, 9 Mar 2022 14:45:26 +0800 Subject: [PATCH] Switch to use the DBG flag to build debug binaries With the merging of #108371, the old way to build the debug binaries won't work anymore. Signed-off-by: Dave Chen --- build/root/Makefile | 9 ++++----- hack/ginkgo-e2e.sh | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build/root/Makefile b/build/root/Makefile index e66bddd2409..754e824bab8 100644 --- a/build/root/Makefile +++ b/build/root/Makefile @@ -80,11 +80,10 @@ define ALL_HELP_INFO # make # make all # make all WHAT=cmd/kubelet GOFLAGS=-v -# make all GOLDFLAGS="" -# Note: Specify GOLDFLAGS as an empty string for building unstripped binaries, which allows -# you to use code debugging tools like delve. When GOLDFLAGS is unspecified, it defaults -# to "-s -w" which strips debug information. Other flags that can be used for GOLDFLAGS -# are documented at https://golang.org/cmd/link/ +# make all DBG=1 +# Note: Specify DBG=1 for building unstripped binaries, which allows you to use code debugging +# tools like delve. When DBG is unspecified, it defaults to "-s -w" which strips debug +# information. endef .PHONY: all ifeq ($(PRINT_HELP),y) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 1e444a6a8f2..678d08ab105 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -45,7 +45,7 @@ GINKGO_TOLERATE_FLAKES=${GINKGO_TOLERATE_FLAKES:-n} # - `dlv exec` if set to "delve" # - `gdb` if set to "gdb" # NOTE: for this to work the e2e.test binary has to be compiled with -# make WHAT=test/e2e/e2e.test GOGCFLAGS="all=-N -l" GOLDFLAGS="" +# make DBG=1 WHAT=test/e2e/e2e.test E2E_TEST_DEBUG_TOOL=${E2E_TEST_DEBUG_TOOL:-} : "${KUBECTL:="${KUBE_ROOT}/cluster/kubectl.sh"}"