From: Andrew Morton <akpm@linux-foundation.org>
To: Dmitrii Bundin <dmitrii.bundin.a@gmail.com>
Cc: masahiroy@kernel.org, michal.lkml@markovi.net,
ndesaulniers@google.com, nathan@kernel.org, peterz@infradead.org,
keescook@chromium.org, jpoimboe@kernel.org,
dan.j.williams@intel.com, isabbasso@riseup.net,
edumazet@google.com, vbabka@suse.cz, linux@rasmusvillemoes.dk,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] kbuild: add option to set max level of debug info
Date: Thu, 11 Aug 2022 14:58:28 -0700 [thread overview]
Message-ID: <20220811145828.89b64e663a18fbb8d7fdea06@linux-foundation.org> (raw)
In-Reply-To: <20220804223504.4739-1-dmitrii.bundin.a@gmail.com>
On Fri, 5 Aug 2022 01:35:04 +0300 Dmitrii Bundin <dmitrii.bundin.a@gmail.com> wrote:
> When compiling with -g3 option and debugging with gdb it provides some
> extra abilities like macro expand, info macro etc... It's sometimes
> useful to unerstand behavior of complicated macros.
>
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -304,6 +304,15 @@ config DEBUG_INFO_REDUCED
> DEBUG_INFO build and compile times are reduced too.
> Only works with newer gcc versions.
>
> +config DEBUG_INFO_MAXLEVEL
> + bool "Maximum debug information level"
> + depends on !DEBUG_INFO_REDUCED
> + default n
> + help
> + Sets the maximum level of debug information compilers may generate
> + (-g3). Enabling this option will require significantly more disk space
> + and increase built time, but it's useful for debugging purposes.
> +
> config DEBUG_INFO_COMPRESSED
> bool "Compressed debugging information"
> depends on $(cc-option,-gz=zlib)
> diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug
> index 9f39b0130551..7e1d8beecfc4 100644
> --- a/scripts/Makefile.debug
> +++ b/scripts/Makefile.debug
> @@ -2,6 +2,8 @@ DEBUG_CFLAGS :=
>
> ifdef CONFIG_DEBUG_INFO_SPLIT
> DEBUG_CFLAGS += -gsplit-dwarf
> +else ifdef CONFIG_DEBUG_INFO_MAXLEVEL
> +DEBUG_CFLAGS += -g3
> else
> DEBUG_CFLAGS += -g
> endif
What happens when the gcc developers add -g4? Or if a user wants -g2?
In other words, can we make this a Kconfig-selectable level, with the
default `1'?
next prev parent reply other threads:[~2022-08-11 21:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 22:35 [PATCH] kbuild: add option to set max level of debug info Dmitrii Bundin
2022-08-11 21:58 ` Andrew Morton [this message]
2022-08-12 0:33 ` Dmitrii Bundin
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=20220811145828.89b64e663a18fbb8d7fdea06@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=dmitrii.bundin.a@gmail.com \
--cc=edumazet@google.com \
--cc=isabbasso@riseup.net \
--cc=jpoimboe@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=vbabka@suse.cz \
/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