### -*-Midas-*-
###
-### $Id: i386.m4,v 1.47 1997/05/05 06:59:35 cph Exp $
+### $Id: i386.m4,v 1.48 1998/04/18 05:32:48 cph Exp $
###
-### Copyright (c) 1992-97 Massachusetts Institute of Technology
+### Copyright (c) 1992-98 Massachusetts Institute of Technology
###
### This material was developed by the Scheme project at the
### Massachusetts Institute of Technology, Department of
')
')
-IF_WIN32(`use_external_data(EVR(winnt_address_delta))')
+ifdef(`HACK_SEGMENT_REGS',`use_external_data(EVR(winnt_address_delta))')
define_data(i387_presence)
allocate_longword(i387_presence)
define_data(C_Frame_Pointer)
allocate_longword(C_Frame_Pointer)
-IF_WIN32(`define(HACK_SEGMENT_REGS,1)')
-
ifdef(`HACK_SEGMENT_REGS',`
define_data(Scheme_Transfer_Address)
/* -*-C-*-
-$Id: config.h,v 9.97 1996/12/16 04:53:17 cph Exp $
+$Id: config.h,v 9.98 1998/04/18 05:31:11 cph Exp $
-Copyright (c) 1987-96 Massachusetts Institute of Technology
+Copyright (c) 1987-98 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define HEAP_FREE(address)
#endif
+/* !WINNT_RAW_ADDRESSES is useful only for Windows 3.1, which we no
+ longer support -- so define it always. */
+#ifdef WINNT
+#ifndef WINNT_RAW_ADDRESSES
+#define WINNT_RAW_ADDRESSES
+#endif
+#endif
+
#if defined(WINNT) && !defined(WINNT_RAW_ADDRESSES)
/* This kludge exists because of Win32s which allocates
/* -*-C-*-
-$Id: nttrap.c,v 1.15 1998/02/01 05:35:33 cph Exp $
+$Id: nttrap.c,v 1.16 1998/04/18 05:31:50 cph Exp $
Copyright (c) 1992-98 Massachusetts Institute of Technology
extern void EXFUN (NT_initialize_traps, (void));
extern void EXFUN (NT_restore_traps, (void));
+#ifndef WINNT_RAW_ADDRESSES
extern unsigned short
Scheme_Code_Segment_Selector,
Scheme_Data_Segment_Selector,
C_Data_Segment_Selector,
C_Extra_Segment_Selector,
C_Stack_Segment_Selector;
+#endif
extern DWORD
C_Stack_Pointer,
bufptr += (sprintf (bufptr, "\ncontext->Eip = 0x%lx.", context->Eip));
bufptr += (sprintf (bufptr, "\ncontext->Esp = 0x%lx.", context->Esp));
bufptr += (sprintf (bufptr, "\nStack_Pointer = 0x%lx.", Stack_Pointer));
+#ifndef WINNT_RAW_ADDRESSES
bufptr += (sprintf (bufptr, "\nwinnt_address_delta = 0x%lx.", winnt_address_delta));
+#endif
bufptr += (sprintf (bufptr, "\nadj (Stack_Pointer) = 0x%lx.",
(ADDR_TO_SCHEME_ADDR (Stack_Pointer))));
+#ifndef WINNT_RAW_ADDRESSES
bufptr += (sprintf (bufptr, "\nCS = 0x%04x;\tC CS = 0x%04x;\tS CS = 0x%04x.",
context->SegCs,
C_Code_Segment_Selector,
context->SegSs,
C_Stack_Segment_Selector,
Scheme_Stack_Segment_Selector));
+#endif
}
#endif /* W32_TRAP_DEBUG */
Stack_Pointer, context->Esp));
scheme_sp = (context->Esp);
}
+#ifndef WINNT_RAW_ADDRESSES
else if (context->SegSs == Scheme_Stack_Segment_Selector)
{
IFVERBOSE (TellUserEx (MB_OKCANCEL,
"continue_from_trap: SS = Scheme SS."));
scheme_sp = ((long) (SCHEME_ADDR_TO_ADDR (context->Esp)));
}
+#endif
else
{
IFVERBOSE (TellUserEx (MB_OKCANCEL, "continue_from_trap: SS unknown!"));
IFVERBOSE (TellUserEx (MB_OKCANCEL, "continue_from_trap: CS = C CS."));
the_pc = (context->Eip & PC_VALUE_MASK);
}
+#ifndef WINNT_RAW_ADDRESSES
else if (context->SegCs == Scheme_Code_Segment_Selector)
{
IFVERBOSE (TellUserEx (MB_OKCANCEL, "continue_from_trap: CS = Scheme CS"));
/* Assume in Scheme. Of course, it could be in a builtin. */
the_pc = ((long) (SCHEME_ADDR_TO_ADDR (context->Eip & PC_VALUE_MASK)));
}
+#endif
else
{
IFVERBOSE (TellUserEx (MB_OKCANCEL, "continue_from_trap: CS unknown"));
if (pc_in_scheme && (! (win32_under_win32s_p ())))
{
+#ifndef WINNT_RAW_ADDRESSES
context->SegCs = C_Code_Segment_Selector;
context->SegDs = C_Data_Segment_Selector;
context->SegEs = C_Extra_Segment_Selector;
context->SegSs = C_Stack_Segment_Selector;
+#endif
context->Esp = C_Stack_Pointer;
context->Ebp = C_Frame_Pointer;
if (pc_in_scheme)