Re: [PATCH 3/3] Kconfig.debug: split debug-level and DWARF-version into separate choices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 4, 2022 at 2:20 AM Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
>
> On Mon, Oct 03, 2022 at 03:11:07AM +0900, Masahiro Yamada wrote:
> > Commit f9b3cd245784 ("Kconfig.debug: make DEBUG_INFO selectable from
> > a choice") added CONFIG_DEBUG_INFO_NONE into the DWARF version choice,
> > but it should rather belong to the debug level choice.
> >
> > This commit consolidates CONFIG options into two choices:
> >
> >  - Debug info level (NONE / REDUCED / DEFAULT)
> >
> >  - DWARF format (DWARF_TOOLCHAIN_DEFAULT / DWARF4 / DWARF5)
> >
> > This is more consistent with compilers' policy because the -g0 compiler
> > flag means "no debug info".
> >
> >   GCC manual:
> >
> >     -g<level>
> >
> >       Request debugging information and also use level to specify how
> >       much information. The default level is 2.
> >
> >       Level 0 produces no debug information at all. Thus, -g0 negates -g.
> >
> >       Level 1 produces minimal information, enough for making backtraces
> >       in parts of the program that you don’t plan to debug. This includes
> >       descriptions of functions and external variables, and line number
> >       tables, but no information about local variables.
> >
> >       Level 3 includes extra information, such as all the macro
> >       definitions present in the program. Some debuggers support macro
> >       expansion when you use -g3.
> >
> >   Rustc Codegen manual:
> >
> >     debuginfo
> >
> >       This flag controls the generation of debug information. It takes
> >       one of the following values:
> >
> >       0: no debug info at all (the default).
> >       1: line tables only.
> >       2: full debug info.
> >
> > I moved CONFIG_DEBUG_INFO_REDUCED into the debug level choice.
> >
> > This change will make it easier to add another debug info level if
> > necessary.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> > Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> > Acked-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
>
> As far as I can tell, this will require updating defconfigs again to
> include an explicit 'CONFIG_DEBUG_INFO_DEFAULT=y', right? It might be
> nice to do that as part of this change to keep everything working, as
> there was some fallout from the last time:
>
> 92f89ec1b534 ("powerpc: Restore CONFIG_DEBUG_INFO in defconfigs")
> ddd366bf01de ("ARM: defconfig: address renamed CONFIG_DEBUG_INFO=y")
>
> Regardless, I think this is a good change.


Thanks.

I will do that in v2.









-- 
Best Regards
Masahiro Yamada




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux