mirror of https://github.com/golang/go.git
parent
e1a9b6ee77
commit
e9047d1fc2
|
|
@ -6,6 +6,9 @@
|
|||
#include "amd64_darwin.h"
|
||||
#include "signals.h"
|
||||
|
||||
extern void _rt0_amd64_darwin();
|
||||
byte* startsym = (byte*)_rt0_amd64_darwin;
|
||||
|
||||
typedef uint64 __uint64_t;
|
||||
|
||||
/* From /usr/include/mach/i386/_structs.h */
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
#include "amd64_linux.h"
|
||||
#include "signals.h"
|
||||
|
||||
extern void _rt0_amd64_linux();
|
||||
byte* startsym = (byte*)_rt0_amd64_linux;
|
||||
|
||||
/* From /usr/include/asm-x86_64/sigcontext.h */
|
||||
struct _fpstate {
|
||||
uint16 cwd;
|
||||
|
|
|
|||
|
|
@ -94,11 +94,10 @@ int32
|
|||
inlinetrap(int32 sig, byte* pc)
|
||||
{
|
||||
extern void etext();
|
||||
extern void _rt0_amd64_darwin();
|
||||
|
||||
if(sig != 5) /* SIGTRAP */
|
||||
return 0;
|
||||
if(pc-2 < (byte*)_rt0_amd64_darwin || pc >= (byte*)etext)
|
||||
if(pc-2 < startsym || pc >= (byte*)etext)
|
||||
return 0;
|
||||
if(pc[-2] != 0xcd) /* INTB */
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ G* allg;
|
|||
int32 goidgen;
|
||||
extern int32 gomaxprocs;
|
||||
extern int32 panicking;
|
||||
extern byte *startsym;
|
||||
|
||||
/*
|
||||
* common functions and data
|
||||
|
|
|
|||
Loading…
Reference in New Issue