public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix write_symbols for supporting multiple debug formats
@ 2021-05-05 23:45 Indu Bhagat
  2021-05-05 23:45 ` [PATCH 1/2] opts: change write_symbols to support bitmasks Indu Bhagat
  2021-05-05 23:45 ` [PATCH 2/2] dwarf: new dwarf_debuginfo_p predicate Indu Bhagat
  0 siblings, 2 replies; 7+ messages in thread
From: Indu Bhagat @ 2021-05-05 23:45 UTC (permalink / raw)
  To: gcc-patches

Hello,

Over the last year, we have discussed and agreed that in order to support
multiple debug formats, we keep DWARF as the default internal debug format; Any
new debug format to be supported feeds off DWARF dies. This requirement
specification has worked well for addition for CTF/BTF overall. 

There are some existing issues that need to discussed and fixed in this regard,
however. One of them is the definition and handling of write_symbols.

The current issue is that write_symbols is defined as 

   enum debug_info_type write_symbols = NO_DEBUG;

This means any new combination of debug formats needs to be explicitly
enumerated, like CTF_AND_DWARF2_DEBUG, VMS_AND_DWARF2_DEBUG etc. So to support
say, "-gctf -gbtf -g" or to make other combinations of debug formats possible,
each one needs to spelled out explicitly; this will make the handling ugly.

We discussed over IRC about the possibility of write_symbols to use bitmasks
instead. Please take a look at the patch set and let me know what you think.

BTW, the patch 2/2 [dwarf: new dwarf_debuginfo_p predicate] in this series is
the same as the one sent earlier in the CTF patch series (and has been
approved). I just include it in this patch series as it fits better here.

In a subsequent patch after these current two patches, I can work on removing
the VMS_AND_DWARF2_DEBUG symbol and replacing its usages with the appropriate
bitmasks. I would also like to review the usages of debug_type_names [] in code
diagnostics around PCH (in c-family/c-opts.c and c-family/c-pch.c) in terms of
what combination of debug formats would be allowed and such. But at this
time, the patch retains the current behaviour by simply adjusting the approach
to access the debug_type_name [].

Boostrapped and regression tested on x86_64.

Thanks,
Indu Bhagat (2):
  opts: change write_symbols to support bitmasks
  dwarf: new dwarf_debuginfo_p predicate

 gcc/c-family/c-lex.c  |   4 +-
 gcc/c-family/c-opts.c |  10 +++--
 gcc/c-family/c-pch.c  |  12 +++---
 gcc/common.opt        |   2 +-
 gcc/config/c6x/c6x.c  |   3 +-
 gcc/dwarf2cfi.c       |   9 ++--
 gcc/final.c           |  15 +++----
 gcc/flag-types.h      |  29 ++++++++++---
 gcc/flags.h           |  21 ++++++++-
 gcc/objc/objc-act.c   |   2 +-
 gcc/opts.c            | 117 +++++++++++++++++++++++++++++++++++++++++++++-----
 gcc/targhooks.c       |   2 +-
 gcc/toplev.c          |  15 ++++---
 13 files changed, 186 insertions(+), 55 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-12 21:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 23:45 [PATCH 0/2] Fix write_symbols for supporting multiple debug formats Indu Bhagat
2021-05-05 23:45 ` [PATCH 1/2] opts: change write_symbols to support bitmasks Indu Bhagat
2021-05-10 13:11   ` Richard Biener
2021-05-11 14:26     ` Indu Bhagat
2021-05-12  7:31       ` Richard Biener
2021-05-12 21:55         ` Indu Bhagat
2021-05-05 23:45 ` [PATCH 2/2] dwarf: new dwarf_debuginfo_p predicate Indu Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).