diff options
author | Olivier Hainque <hainque@adacore.com> | 2022-09-26 16:05:48 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@adacore.com> | 2022-10-07 06:53:30 +0000 |
commit | 8dffd0e9621d93faabb6676e7a018cb5267dfa22 (patch) | |
tree | d0a90802d2284ff8d65a684481447d2b5551c45c /gcc/doc | |
parent | 8307b7d6d0335da952a87bf56015f830072ac431 (diff) | |
download | gcc-8dffd0e9621d93faabb6676e7a018cb5267dfa22.zip gcc-8dffd0e9621d93faabb6676e7a018cb5267dfa22.tar.gz gcc-8dffd0e9621d93faabb6676e7a018cb5267dfa22.tar.bz2 |
Introduce DWARF_VERSION_DEFAULT and redefine for VxWorks
This change introduces a target overridable macro to replace
the hardcoded value used to initialize dwarf_version from common.opt.
The main advantage compared to special code in a target
override_options hook is that redefinitions by target config files
are visible by both the compiler proper and by the driver, which
might refer to dwarf_version in ASM_DEBUG_SPECs and friends.
This is useful at least on VxWorks, where we usually need to
default to dwarf 4 or even 2 to accommodate non-gdb debuggers
provided by the environment, including for assembly sources
used in libgcc for some ports (witnessed with lse.S on aarch64).
2022-02-28 Olivier Hainque <hainque@adacore.com>
gcc/
* defaults.h (DWARF_DEFAULT_VERSION): Define if not
defined already.
* common.opt (gdwarf-): Use it.
* doc/tm.texi.in (DWARF_DEFAULT_VERSION): Document.
* doc/tm.texi: Update accordingly.
* config/vxworks.h (DWARF_DEFAULT_VERSION): Redefine.
* config/vxworks.cc: Remove code setting dwarf_version, now
handled by the DWARF_DEFAULT_VERSION redefinition.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 6 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 7590924f..110f8df 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -3294,6 +3294,12 @@ someone decided it was a good idea to use that register number to terminate the stack backtrace. New ports should avoid this. @end defmac +@defmac DWARF_VERSION_DEFAULT +A C expression whose value is the default dwarf standard version we'll honor +and advertise when generating dwarf debug information, in absence of +an explicit @option{-gdwarf-@var{version}} option on the command line. +@end defmac + @deftypefn {Target Hook} void TARGET_DWARF_HANDLE_FRAME_UNSPEC (const char *@var{label}, rtx @var{pattern}, int @var{index}) This target hook allows the backend to emit frame-related insns that contain UNSPECs or UNSPEC_VOLATILEs. The DWARF 2 call frame debugging diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 21b849e..501ddf1 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -2575,6 +2575,12 @@ someone decided it was a good idea to use that register number to terminate the stack backtrace. New ports should avoid this. @end defmac +@defmac DWARF_VERSION_DEFAULT +A C expression whose value is the default dwarf standard version we'll honor +and advertise when generating dwarf debug information, in absence of +an explicit @option{-gdwarf-@var{version}} option on the command line. +@end defmac + @hook TARGET_DWARF_HANDLE_FRAME_UNSPEC @hook TARGET_DWARF_POLY_INDETERMINATE_VALUE |