diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2024-01-15 01:00:19 -0800 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2024-01-15 03:31:35 -0800 |
commit | c02a969de74ae3118f4a66ae76860ad21603fc44 (patch) | |
tree | 399ac896091f9e9de7deac6799aa297368711f7f /gas/read.c | |
parent | ad9bd833d48cd56697406f82ff2769a6a1dc5db7 (diff) | |
download | gdb-c02a969de74ae3118f4a66ae76860ad21603fc44.zip gdb-c02a969de74ae3118f4a66ae76860ad21603fc44.tar.gz gdb-c02a969de74ae3118f4a66ae76860ad21603fc44.tar.bz2 |
gas: scfidw2gen: new functionality to prepare for SCFI
Define a new set of handlers for CFI directives for the purpose of SCFI.
The SCFI machinery ignores many of the user-specified CFI direcives when
SCFI is in effect. A warning ("Warning: SCFI ignores most
user-specified CFI directives") is issued once per file. The following
CFI directives, however, are not ignored:
- .cfi_sections
- .cfi_label
- .cfi_signal_frame
gas/
* Makefile.am: Add new files to GAS_CFILES and HFILES.
* Makefile.in: Likewise.
* gas/read.c (scfi_pop_insert): New define.
(pobegin): Use the SCFI handlers.
* scfidw2gen.c: New file.
* scfidw2gen.h: New file.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -38,6 +38,7 @@ #include "obstack.h" #include "ecoff.h" #include "dw2gencfi.h" +#include "scfidw2gen.h" #include "codeview.h" #include "wchar.h" #include "filenames.h" @@ -587,6 +588,10 @@ pop_insert (const pseudo_typeS *table) #define cfi_pop_insert() pop_insert(cfi_pseudo_table) #endif +#ifndef scfi_pop_insert +#define scfi_pop_insert() pop_insert(scfi_pseudo_table) +#endif + static void pobegin (void) { @@ -607,8 +612,18 @@ pobegin (void) pop_insert (potable); /* Now CFI ones. */ - pop_table_name = "cfi"; - cfi_pop_insert (); +#if defined (TARGET_USE_SCFI) && defined (TARGET_USE_GINSN) + if (flag_synth_cfi) + { + pop_table_name = "scfi"; + scfi_pop_insert (); + } + else +#endif + { + pop_table_name = "cfi"; + cfi_pop_insert (); + } } static void |