Changeset f72aa03 in git for Singular/cntrlc.cc


Ignore:
Timestamp:
Oct 4, 2006, 2:37:42 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
28fc7b1bd7ee0ea859055dba375dfb0cbff37018
Parents:
8d73ea3098dd87269fe1b79862de4adec077bcb5
Message:
*hannes: segv handler for x86_64


git-svn-id: file:///usr/local/Singular/svn/trunk@9439 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    r8d73ea rf72aa03  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: cntrlc.cc,v 1.49 2005-07-27 09:59:26 Singular Exp $ */
     4/* $Id: cntrlc.cc,v 1.50 2006-10-04 12:37:42 Singular Exp $ */
    55/*
    66* ABSTRACT - interupt handling
     
    157157        unsigned long cr2;
    158158};
     159#define HAVE_SIGSTRUCT
    159160# endif
    160161typedef struct sigcontext_struct sigcontext;
    161 
    162 
     162#endif
     163#if defined(linux) && defined(x86_64_Linux)
     164struct sigcontext_struct {
     165        unsigned long r8;
     166        unsigned long r9;
     167        unsigned long r10;
     168        unsigned long r11;
     169        unsigned long r12;
     170        unsigned long r13;
     171        unsigned long r14;
     172        unsigned long r15;
     173        unsigned long rdi;
     174        unsigned long rsi;
     175        unsigned long rbp;
     176        unsigned long rbx;
     177        unsigned long rdx;
     178        unsigned long rax;
     179        unsigned long rcx;
     180        unsigned long rsp;
     181        unsigned long eip /*rip*/;
     182        unsigned long eflags;           /* RFLAGS */
     183        unsigned short cs;
     184        unsigned short gs;
     185        unsigned short fs;
     186        unsigned short __pad0;
     187        unsigned long err;
     188        unsigned long trapno;
     189        unsigned long oldmask;
     190        unsigned long cr2;
     191        struct _fpstate __user *fpstate;        /* zero when no FPU context */
     192        unsigned long reserved1[8];
     193};
     194#define HAVE_SIGSTRUCT
     195typedef struct sigcontext_struct sigcontext;
     196#endif
     197
     198
     199#if defined(linux) && defined(HAVE_SIGSTRUCT)
    163200/*2---------------------------------------------------------------------*/
    164201/**
     
    176213    fprintf(stderr,"Segment fault/Bus error occurred at %x because of %x (r:%d)\n"
    177214                   "please inform the authors\n",
    178                    (int)s.eip,(int)s.cr2,siRandomStart);
     215                   (long)s.eip,(long)s.cr2,siRandomStart);
    179216  }
    180217# ifdef __OPTIMIZE__
     
    260297  si_set_signal(SIGVTALRM,(si_hdl_typ)sigalarm_handler);
    261298}
    262 # endif /* PAGE_TEST */
     299#endif /* PAGE_TEST */
    263300
    264301/*2
Note: See TracChangeset for help on using the changeset viewer.