diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/flag-types.h | 6 | ||||
-rw-r--r-- | gcc/flags.h | 4 | ||||
-rw-r--r-- | gcc/opts.c | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 4fb1cb4..cc41b2a 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -31,7 +31,8 @@ enum debug_info_type DINFO_TYPE_VMS = 4, /* VMS debug info. */ DINFO_TYPE_CTF = 5, /* CTF debug info. */ DINFO_TYPE_BTF = 6, /* BTF debug info. */ - DINFO_TYPE_MAX = DINFO_TYPE_BTF /* Marker only. */ + DINFO_TYPE_BTF_WITH_CORE = 7, /* BTF debug info with CO-RE relocations. */ + DINFO_TYPE_MAX = DINFO_TYPE_BTF_WITH_CORE /* Marker only. */ }; #define NO_DEBUG (0U) @@ -47,6 +48,9 @@ enum debug_info_type #define CTF_DEBUG (1U << DINFO_TYPE_CTF) /* Write BTF debug info (using btfout.c). */ #define BTF_DEBUG (1U << DINFO_TYPE_BTF) +/* Write BTF debug info for BPF CO-RE usecase (using btfout.c). */ +#define BTF_WITH_CORE_DEBUG (1U << DINFO_TYPE_BTF_WITH_CORE) + /* Note: Adding new definitions to handle -combination- of debug formats, like VMS_AND_DWARF2_DEBUG is not recommended. This definition remains here for historical reasons. */ diff --git a/gcc/flags.h b/gcc/flags.h index afedef0..af61bcd 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -44,6 +44,10 @@ const char * debug_set_names (uint32_t w_symbols); extern bool btf_debuginfo_p (); +/* Return true iff BTF with CO-RE debug info is enabled. */ + +extern bool btf_with_core_debuginfo_p (); + /* Return true iff CTF debug info is enabled. */ extern bool ctf_debuginfo_p (); @@ -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 |