From: Daniel Thompson <daniel.thompson@linaro.org>
To: Qian Cai <quic_qiancai@quicinc.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] configs/debug: set CONFIG_DEBUG_INFO=y properly
Date: Tue, 8 Mar 2022 10:42:15 +0000 [thread overview]
Message-ID: <20220308104215.q4asb6z3vicq2vja@maple.lan> (raw)
In-Reply-To: <20220301202920.18488-1-quic_qiancai@quicinc.com>
On Tue, Mar 01, 2022 at 03:29:20PM -0500, Qian Cai wrote:
> CONFIG_DEBUG_INFO can't be set by user directly,
What do you mean by "can't be set by user directly"? DEBUG_INFO
is fully controlable via menuconfig.
> so set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y instead.
> Otherwise, we end up with no debuginfo in vmlinux which is
> a big no-no for kernel debugging.
>
> Signed-off-by: Qian Cai <quic_qiancai@quicinc.com>
> ---
> kernel/configs/debug.config | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config
> index e9ffb0cc1eec..07df6d93c4df 100644
> --- a/kernel/configs/debug.config
> +++ b/kernel/configs/debug.config
> @@ -16,7 +16,7 @@ CONFIG_SYMBOLIC_ERRNAME=y
> #
> # Compile-time checks and compiler options
> #
> -CONFIG_DEBUG_INFO=y
> +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
Does this change actually work in the kernels it has merged into?
DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT existence is predicated on DEBUG_INFO
being set. It makes no sense at all to set the former without the later.
I tried this with ARCH=arm64 and it is clearly not working and should
probably be reverted from v5.17:
~~~
maple$ git describe
v5.17-rc7
maple$ make defconfig
*** Default configuration is based on 'defconfig'
#
# No change to .config
#
maple$ scripts/config --disable DEBUG_INFO && make oldconfig
#
# configuration written to .config
#
maple$ grep DEBUG_INFO .config
# CONFIG_DEBUG_INFO is not set
maple$ make debug.config
<removed-long-output-here>
maple$ grep DEBUG_INFO .config
# CONFIG_DEBUG_INFO is not set
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^
^
maple$ echo CONFIG_DEBUG_INFO=y kernel/configs/debug_info.config
CONFIG_DEBUG_INFO=y kernel/configs/debug_info.config
maple$ make debug_info.config
Using .config as base
Merging ./kernel/configs/debug_info.config
Value of CONFIG_DEBUG_INFO is redefined by fragment ./kernel/configs/debug_info.config:
Previous value: # CONFIG_DEBUG_INFO is not set
New value: CONFIG_DEBUG_INFO=y
#
# merged configuration written to .config (needs make)
#
#
# configuration written to .config
#
maple$ grep DEBUG_INFO .config
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_COMPRESSED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set
~~~
Daniel.
next prev parent reply other threads:[~2022-03-08 10:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 20:29 Qian Cai
2022-03-08 10:42 ` Daniel Thompson [this message]
2022-03-08 13:56 ` Qian Cai
2022-03-08 14:30 ` Daniel Thompson
2022-03-08 15:11 ` Qian Cai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220308104215.q4asb6z3vicq2vja@maple.lan \
--to=daniel.thompson@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_qiancai@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®