diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2021-05-20 11:15:52 -0700 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2021-06-28 18:47:20 +0200 |
commit | b7e215a8ee81d44281d9e0a2a25eceb47b6911dd (patch) | |
tree | 121afbbec2428c85a68b6119ac8c0f25f6cd9fab /gcc/common.opt | |
parent | 532617d6367c29803d5909f2432b1ebfb9ee1886 (diff) | |
download | gcc-b7e215a8ee81d44281d9e0a2a25eceb47b6911dd.zip gcc-b7e215a8ee81d44281d9e0a2a25eceb47b6911dd.tar.gz gcc-b7e215a8ee81d44281d9e0a2a25eceb47b6911dd.tar.bz2 |
CTF/BTF debug formats
This commit introduces support for generating CTF debugging
information and BTF debugging information from GCC.
2021-06-28 Indu Bhagat <indu.bhagat@oracle.com>
David Faust <david.faust@oracle.com>
Jose E. Marchesi <jose.marchesi@oracle.com>
Weimin Pan <weimin.pan@oracle.com>
gcc/
* Makefile.in: Add ctfc.*, ctfout.c and btfout.c files to
GTFILES. Add new object files.
* common.opt: Add CTF and BTF debug info options.
* btfout.c: New file.
* ctfc.c: Likewise.
* ctfc.h: Likewise.
* ctfout.c: Likewise.
* dwarf2ctf.c: Likewise.
* dwarf2ctf.h: Likewise.
* dwarf2cfi.c (dwarf2out_do_frame): Acknowledge CTF_DEBUG and
BTF_DEBUG.
* dwarf2out.c (dwarf2out_source_line): Likewise.
(dwarf2out_finish): Skip emitting DWARF if CTF or BTF are to
be generated.
(debug_format_do_cu): New function.
(dwarf2out_early_finish): Traverse DIEs and emit CTF/BTF for
them if requested.
Include dwarf2ctf.c.
* final.c (dwarf2_debug_info_emitted_p): Acknowledge DWARF-based debug
formats.
* flag-types.h (enum debug_info_type): Add CTF_DEBUG and BTF_DEBUG.
(CTF_DEBUG): New bitmask.
(BTF_DEBUG): Likewise.
(enum ctf_debug_info_levels): New enum.
* gengtype.c (open_base_files): Handle ctfc.h.
(main): Handle uint32_t type.
* flags.h (btf_debuginfo_p): New definition.
(dwarf_based_debuginfo_p): Likewise.
* opts.c (debug_type_names): Add entries for CTF and BTF.
(btf_debuginfo_p): New function.
(dwarf_based_debuginfo_p): Likewise.
(common_handle_option): Handle -gctfN and -gbtf options.
(set_debug_level): Set CTF_DEBUG, BTF_DEBUG whenever appropriate.
* toplev.c (process_options): Inform the user and ignore -gctfLEVEL if
frontend is not C.
include/
* ctf.h: New file.
* btf.h: Likewise.
libiberty/
* simple-object.c (handle_lto_debug_sections): Copy over .ctf
sections.
Diffstat (limited to 'gcc/common.opt')
-rw-r--r-- | gcc/common.opt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt index a1353e0..1dd4456 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -122,6 +122,11 @@ enum debug_info_levels debug_info_level = DINFO_LEVEL_NONE Variable bool use_gnu_debug_info_extensions +; Level of CTF debugging information we are producing. See flag-types.h +; for the definitions of the different possible levels. +Variable +enum ctf_debug_info_levels ctf_debug_info_level = CTFINFO_LEVEL_NONE + ; Original value of maximum field alignment in bytes, specified via ; -fpack-struct=<value>. Variable @@ -3183,6 +3188,16 @@ gcolumn-info Common Driver Var(debug_column_info,1) Init(1) Record DW_AT_decl_column and DW_AT_call_column in DWARF. +; The CTF generation process feeds off DWARF dies. This option implicitly +; updates the debug_info_level to DINFO_LEVEL_NORMAL. +gctf +Common Driver RejectNegative JoinedOrMissing +Generate CTF debug information at default level. + +gbtf +Common Driver RejectNegative JoinedOrMissing +Generate BTF debug information at default level. + gdwarf Common Driver JoinedOrMissing Negative(gdwarf-) Generate debug information in default version of DWARF format. |