From 80c2c20282aae97e232df885461b828d5d6573b0 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 25 Feb 2014 16:35:36 +0100 Subject: [multiple changes] 2014-02-25 Robert Dewar * errout.adb: Various changes for better msgs for anonmous access subprogram types. * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character argument. (Buffer_Remove): Version with character argument. * sem_attr.adb (Resolve_Attribute, case Access): Better handling of mismatching conventions for access-to-subprogram case. * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous access types in record. * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access types, including in records. 2014-02-25 Doug Rupp * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment enhancements and corrections. 2014-02-25 Robert Dewar * gnat_rm.texi: New section "Conventions and Anonymous Access Types" From-SVN: r208143 --- gcc/ada/sigtramp.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'gcc/ada/sigtramp.h') diff --git a/gcc/ada/sigtramp.h b/gcc/ada/sigtramp.h index ef93e3f..59287f1 100644 --- a/gcc/ada/sigtramp.h +++ b/gcc/ada/sigtramp.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 2011, Free Software Foundation, Inc. * + * Copyright (C) 2011-2013, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -49,7 +49,25 @@ extern "C" { /* To be called from an established signal handler. Setup the DWARF CFI bits letting unwinders walk through the signal frame up into the interrupted application code, and then call HANDLER (SIGNO, SIGINFO, - SIGCONTEXT). */ + SIGCONTEXT). + + The sigtramp construct makes it so that the unwinder jumps over it + the + signal handler + the kernel frame. For a typical backtrace from the raise + function: + + #0 __gnat_Unwind_RaiseException + #1 Raise_From_Signal_Handler + #2 __gnat_map_signal + #3 __gnat_sigtramp + #4 __gnat_error_handler + #5 + #6 interrupted function + + The unwinder will unwind frames 0, 1 and 2 as usual. But the CFI of frame + 3 is set up as if the caller of frame 3 was frame 6 so, when frame 3 is + unwound, the unwinder ends up in frame 6 directly. It's possible to do so + since the kernel has saved the context of frame 3 and passed it on to + __gnat_sigtramp. */ #ifdef __cplusplus } -- cgit v1.1