aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2021-09-07 11:16:53 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2021-09-07 11:16:53 -0700
commit053db9a49b00d422cd735bee4c0939b7ff07c40e (patch)
treea8d0e57d81aaf1040a352afe7aa5f6946b6d55f0 /gcc/opts.c
parentc03db573b9e619f9e4f7d7111f99877368c78e26 (diff)
downloadgcc-053db9a49b00d422cd735bee4c0939b7ff07c40e.zip
gcc-053db9a49b00d422cd735bee4c0939b7ff07c40e.tar.gz
gcc-053db9a49b00d422cd735bee4c0939b7ff07c40e.tar.bz2
debug: Add BTF_WITH_CORE_DEBUG debug format
To best handle BTF/CO-RE in GCC, a distinct BTF_WITH_CORE_DEBUG debug format is being added. This helps the compiler detect whether BTF with CO-RE relocations needs to be emitted. gcc/ChangeLog: * flag-types.h (enum debug_info_type): Add new enum DINFO_TYPE_BTF_WITH_CORE. (BTF_WITH_CORE_DEBUG): New bitmask. * flags.h (btf_with_core_debuginfo_p): New declaration. * opts.c (btf_with_core_debuginfo_p): New definition.
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index e050155..1d2d22d 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -135,6 +135,14 @@ btf_debuginfo_p ()
return (write_symbols & BTF_DEBUG);
}
+/* Return TRUE iff BTF with CO-RE debug info is enabled. */
+
+bool
+btf_with_core_debuginfo_p ()
+{
+ return (write_symbols & BTF_WITH_CORE_DEBUG);
+}
+
/* Return TRUE iff CTF debug info is enabled. */
bool