diff options
| author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-23 12:52:34 +0200 |
|---|---|---|
| committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-23 12:52:34 +0200 |
| commit | 45fbea4f6603667baa877577a5ccf6326c53babd (patch) | |
| tree | 9932b82dccd6dbaf5f7cacf3eca4eee395fbd433 /gcc/ada/tracebak.c | |
| parent | faaf6d353899f263bfc6144b2bb7de1f674ad5bb (diff) | |
| download | gcc-45fbea4f6603667baa877577a5ccf6326c53babd.zip gcc-45fbea4f6603667baa877577a5ccf6326c53babd.tar.gz gcc-45fbea4f6603667baa877577a5ccf6326c53babd.tar.bz2 | |
[multiple changes]
2015-10-23 Olivier Hainque <hainque@adacore.com>
* tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
x86_64 linux
* tracebak.c: Rework x86 & x86_64 sections to resort to the
generic unwinder if __USING_SJLJ_EXCEPTIONS__.
2015-10-23 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Check_Function_Writable_Actuals): For function
calls restrict the check to elementary types, as requested by
RM 6.4.1(6.15/3)
2015-10-23 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Suppress initialization on
Decl_ARECnT since we are taking care of all initializations in
the generated code.
From-SVN: r229233
Diffstat (limited to 'gcc/ada/tracebak.c')
| -rw-r--r-- | gcc/ada/tracebak.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c index 3ea9531..c91f147 100644 --- a/gcc/ada/tracebak.c +++ b/gcc/ada/tracebak.c @@ -415,9 +415,9 @@ struct layout window of frame N-1 (positive offset from fp), in which we retrieve the saved return address. We then end up with our caller's return address. */ -/*------------------------------- x86 ----------------------------------*/ +/*---------------------------- x86 & x86_64 ---------------------------------*/ -#elif defined (__i386__) +#elif defined (__i386__) || defined (__x86_64__) #if defined (__WIN32) #include <windows.h> @@ -428,10 +428,12 @@ struct layout #define IS_BAD_PTR(ptr) 0 #endif -/* Starting with GCC 4.6, -fomit-frame-pointer is turned on by default for - 32-bit x86/Linux as well and DWARF 2 unwind tables are emitted instead. - See the x86-64 case below for the drawbacks with this approach. */ -#if defined (__linux__) && (__GNUC__ * 10 + __GNUC_MINOR__ > 45) +/* Use the dwarf2 unwinder when we expect to have dwarf2 tables at + hand. Backtraces will reliably stop on frames missing such tables, + but our only alternative is the generic unwinder which requires + compilation forcing a frame pointer to be reliable. */ + +#if defined (__linux__) && !defined (__USING_SJLJ_EXCEPTIONS__) #define USE_GCC_UNWINDER #else #define USE_GENERIC_UNWINDER @@ -444,9 +446,9 @@ struct layout }; #define FRAME_LEVEL 1 -/* builtin_frame_address (1) is expected to work on this target, and (0) might - return the soft stack pointer, which does not designate a location where a - backchain and a return address might be found. */ +/* builtin_frame_address (1) is expected to work on this family of targets, + and (0) might return the soft stack pointer, which does not designate a + location where a backchain and a return address might be found. */ #define FRAME_OFFSET(FP) 0 #define PC_ADJUST -2 @@ -478,23 +480,6 @@ struct layout || ((*((ptr) - 1) & 0xff) == 0xff) \ || (((*(ptr) & 0xd0ff) == 0xd0ff)))) -/*----------------------------- x86_64 ---------------------------------*/ - -#elif defined (__x86_64__) - -#define USE_GCC_UNWINDER -/* The generic unwinder is not used for this target because it is based - on frame layout assumptions that are not reliable on this target (the - rbp register is very likely used for something else than storing the - frame pointer in optimized code). Hence, we use the GCC unwinder - based on DWARF 2 call frame information, although it has the drawback - of not being able to unwind through frames compiled without DWARF 2 - information. -*/ - -#define PC_ADJUST -2 -/* The minimum size of call instructions on this architecture is 2 bytes */ - /*----------------------------- ia64 ---------------------------------*/ #elif defined (__ia64__) && (defined (__linux__) || defined (__hpux__)) |
