diff options
Diffstat (limited to 'libgcc/config')
-rw-r--r-- | libgcc/config/i386/sol2-unwind.h | 66 | ||||
-rw-r--r-- | libgcc/config/sparc/sol2-unwind.h | 112 |
2 files changed, 36 insertions, 142 deletions
diff --git a/libgcc/config/i386/sol2-unwind.h b/libgcc/config/i386/sol2-unwind.h index d93b60c..176fa69 100644 --- a/libgcc/config/i386/sol2-unwind.h +++ b/libgcc/config/i386/sol2-unwind.h @@ -1,5 +1,5 @@ /* DWARF2 EH unwinding support for AMD x86-64 and x86. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -144,55 +144,23 @@ x86_fallback_frame_state (struct _Unwind_Context *context, mcontext_t *mctx; long new_cfa; - if (/* Solaris 8 - single-threaded + if (/* Solaris 9 - single-threaded ---------------------------- - <sigacthandler+17>: mov 0x10(%ebp),%esi - <sigacthandler+20>: push %esi - <sigacthandler+21>: pushl 0xc(%ebp) - <sigacthandler+24>: mov 0x8(%ebp),%ecx - <sigacthandler+27>: push %ecx - <sigacthandler+28>: mov offset(%ebx),%eax - <sigacthandler+34>: call *(%eax,%ecx,4) - <sigacthandler+37>: add $0xc,%esp <--- PC - <sigacthandler+40>: push %esi ... */ - (*(unsigned long *)(pc - 20) == 0x5610758b - && *(unsigned long *)(pc - 16) == 0x8b0c75ff - && *(unsigned long *)(pc - 12) == 0x8b51084d - && *(unsigned char *)(pc - 8) == 0x83 - && *(unsigned long *)(pc - 4) == 0x8814ff00 - && *(unsigned long *)(pc - 0) == 0x560cc483) - - || /* Solaris 8 - multi-threaded - --------------------------- - <__sighndlr+0>: push %ebp - <__sighndlr+1>: mov %esp,%ebp - <__sighndlr+3>: pushl 0x10(%ebp) - <__sighndlr+6>: pushl 0xc(%ebp) - <__sighndlr+9>: pushl 0x8(%ebp) - <__sighndlr+12>: call *0x14(%ebp) - <__sighndlr+15>: leave <--- PC */ - (*(unsigned long *)(pc - 15) == 0xffec8b55 - && *(unsigned long *)(pc - 11) == 0x75ff1075 - && *(unsigned long *)(pc - 7) == 0x0875ff0c - && *(unsigned long *)(pc - 3) == 0xc91455ff) - - || /* Solaris 9 - single-threaded - ---------------------------- - <sigacthandler+16>: mov 0x244(%ebx),%ecx - <sigacthandler+22>: mov 0x8(%ebp),%eax - <sigacthandler+25>: mov (%ecx,%eax,4),%ecx - <sigacthandler+28>: pushl 0x10(%ebp) - <sigacthandler+31>: pushl 0xc(%ebp) - <sigacthandler+34>: push %eax - <sigacthandler+35>: call *%ecx - <sigacthandler+37>: add $0xc,%esp <--- PC - <sigacthandler+40>: pushl 0x10(%ebp) */ - (*(unsigned long *)(pc - 21) == 0x2448b8b - && *(unsigned long *)(pc - 17) == 0x458b0000 - && *(unsigned long *)(pc - 13) == 0x810c8b08 - && *(unsigned long *)(pc - 9) == 0xff1075ff - && *(unsigned long *)(pc - 5) == 0xff500c75 - && *(unsigned long *)(pc - 1) == 0xcc483d1) + <sigacthandler+16>: mov 0x244(%ebx),%ecx + <sigacthandler+22>: mov 0x8(%ebp),%eax + <sigacthandler+25>: mov (%ecx,%eax,4),%ecx + <sigacthandler+28>: pushl 0x10(%ebp) + <sigacthandler+31>: pushl 0xc(%ebp) + <sigacthandler+34>: push %eax + <sigacthandler+35>: call *%ecx + <sigacthandler+37>: add $0xc,%esp <--- PC + <sigacthandler+40>: pushl 0x10(%ebp) */ + (*(unsigned long *)(pc - 21) == 0x2448b8b + && *(unsigned long *)(pc - 17) == 0x458b0000 + && *(unsigned long *)(pc - 13) == 0x810c8b08 + && *(unsigned long *)(pc - 9) == 0xff1075ff + && *(unsigned long *)(pc - 5) == 0xff500c75 + && *(unsigned long *)(pc - 1) == 0xcc483d1) || /* Solaris 9 - multi-threaded, Solaris 10 --------------------------------------- diff --git a/libgcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h index 1458950..6458ae2 100644 --- a/libgcc/config/sparc/sol2-unwind.h +++ b/libgcc/config/sparc/sol2-unwind.h @@ -36,44 +36,25 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see static int sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) { - if (/* Solaris 8 - single-threaded + if (/* Solaris 9 - single-threaded ---------------------------- - <sigacthandler+24>: add %g5, %o7, %o2 - <sigacthandler+28>: ldx [ %o2 + 0xfa0 ], %g5 - <sigacthandler+32>: sra %i0, 0, %o0 - <sigacthandler+36>: sllx %o0, 3, %g4 + The pattern changes slightly in different versions of the + operating system, so we skip the comparison against pc[-6] for + Solaris 9. + + <sigacthandler+24>: sra %i0, 0, %l1 + + Solaris 9 5/02: + <sigacthandler+28>: ldx [ %o2 + 0xf68 ], %g5 + Solaris 9 9/05: + <sigacthandler+28>: ldx [ %o2 + 0xe50 ], %g5 + + <sigacthandler+32>: sllx %l1, 3, %g4 + <sigacthandler+36>: mov %l1, %o0 <sigacthandler+40>: ldx [ %g4 + %g5 ], %l0 <sigacthandler+44>: call %l0 <sigacthandler+48>: mov %i2, %o2 - <sigacthandler+52>: cmp %i3, 8 <--- PC */ - ( pc[-7] == 0x9401400f - && pc[-6] == 0xca5aafa0 - && pc[-5] == 0x913e2000 - && pc[-4] == 0x892a3003 - && pc[-3] == 0xe0590005 - && pc[-2] == 0x9fc40000 - && pc[-1] == 0x9410001a - && pc[ 0] == 0x80a6e008) - - || /* Solaris 9 - single-threaded - ---------------------------- - The pattern changes slightly in different versions of the - operating system, so we skip the comparison against pc[-6] for - Solaris 9. - - <sigacthandler+24>: sra %i0, 0, %l1 - - Solaris 9 5/02: - <sigacthandler+28>: ldx [ %o2 + 0xf68 ], %g5 - Solaris 9 9/05: - <sigacthandler+28>: ldx [ %o2 + 0xe50 ], %g5 - - <sigacthandler+32>: sllx %l1, 3, %g4 - <sigacthandler+36>: mov %l1, %o0 - <sigacthandler+40>: ldx [ %g4 + %g5 ], %l0 - <sigacthandler+44>: call %l0 - <sigacthandler+48>: mov %i2, %o2 - <sigacthandler+52>: cmp %l1, 8 <--- PC */ + <sigacthandler+52>: cmp %l1, 8 <--- PC */ ( pc[-7] == 0xa33e2000 /* skip pc[-6] */ && pc[-5] == 0x892c7003 @@ -147,8 +128,7 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) } else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x94100013) - /* This matches the call_user_handler pattern for Solaris 9 and - for Solaris 8 running inside Solaris Containers respectively + /* This matches the call_user_handler pattern for Solaris 9. We need to move up three frames: <signal handler> <-- context->cfa @@ -159,17 +139,6 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 3; - else /* cuh_pattern == 0xe0272010 */ - /* This is the default Solaris 8 case. - We need to move up two frames: - - <signal handler> <-- context->cfa - __sighndlr - sigacthandler - <kernel> - */ - *nframes = 2; - return 1; } @@ -211,8 +180,8 @@ sparc64_frob_update_context (struct _Unwind_Context *context, static int sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) { - if (/* Solaris 8, 9 - single-threaded - ------------------------------- + if (/* Solaris 9 - single-threaded + ---------------------------- The pattern changes slightly in different versions of the operating system, so we skip the comparison against pc[-6]. @@ -247,37 +216,6 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) return 1; } - if (/* Solaris 8 - multi-threaded - --------------------------- - <__libthread_segvhdlr+212>: clr %o2 - <__libthread_segvhdlr+216>: ld [ %fp + -28 ], %l0 - <__libthread_segvhdlr+220>: mov %i4, %o0 - <__libthread_segvhdlr+224>: mov %i1, %o1 - <__libthread_segvhdlr+228>: call %l0 - <__libthread_segvhdlr+232>: mov %i2, %o2 - <__libthread_segvhdlr+236>: ret <--- PC - <__libthread_segvhdlr+240>: restore - <__libthread_segvhdlr+244>: cmp %o1, 0 */ - pc[-6] == 0x94102000 - && pc[-5] == 0xe007bfe4 - && pc[-4] == 0x9010001c - && pc[-3] == 0x92100019 - && pc[-2] == 0x9fc40000 - && pc[-1] == 0x9410001a - && pc[ 0] == 0x81c7e008 - && pc[ 1] == 0x81e80000 - && pc[ 2] == 0x80a26000) - { - /* We need to move up one frame: - - <signal handler> <-- context->cfa - __libthread_segvhdlr - <kernel> - */ - *nframes = 1; - return 1; - } - if(/* Solaris 8+ - multi-threaded ---------------------------- <__sighndlr>: save %sp, -96, %sp @@ -332,8 +270,7 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) } else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b) - /* This matches the call_user_handler pattern for Solaris 9 and - for Solaris 8 running inside Solaris Containers respectively. + /* This matches the call_user_handler pattern for Solaris 9. We need to move up three frames: <signal handler> <-- context->cfa @@ -344,17 +281,6 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 3; - else /* cuh_pattern == 0x90100018 */ - /* This is the default Solaris 8 case. - We need to move up two frames: - - <signal handler> <-- context->cfa - __sighndlr - sigacthandler - <kernel> - */ - *nframes = 2; - return 1; } |