mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 20:49:14 +02:00
+ exceptions in system is default now
This commit is contained in:
parent
47a02cf8d3
commit
5b52f307e6
@ -141,6 +141,12 @@ SYSTEMUNIT=system
|
|||||||
ifdef EXCEPTIONS_IN_SYSTEM
|
ifdef EXCEPTIONS_IN_SYSTEM
|
||||||
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
|
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Insert exception handler in system unit
|
||||||
|
ifdef NO_EXCEPTIONS_IN_SYSTEM
|
||||||
|
override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
|
||||||
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# FPCDIR Setting
|
# FPCDIR Setting
|
||||||
#####################################################################
|
#####################################################################
|
||||||
@ -226,7 +232,7 @@ endif
|
|||||||
|
|
||||||
# Info
|
# Info
|
||||||
|
|
||||||
INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
|
INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Post Settings
|
# Post Settings
|
||||||
@ -1233,4 +1239,4 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
|
|||||||
# Other system-dependent RTL Units
|
# Other system-dependent RTL Units
|
||||||
#
|
#
|
||||||
|
|
||||||
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
|
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
|
@ -45,6 +45,12 @@ SYSTEMUNIT=system
|
|||||||
ifdef EXCEPTIONS_IN_SYSTEM
|
ifdef EXCEPTIONS_IN_SYSTEM
|
||||||
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
|
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Insert exception handler in system unit
|
||||||
|
ifdef NO_EXCEPTIONS_IN_SYSTEM
|
||||||
|
override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
|
||||||
|
endif
|
||||||
|
|
||||||
[postsettings]
|
[postsettings]
|
||||||
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
|
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
|
||||||
|
|
||||||
@ -167,4 +173,3 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
|
|||||||
#
|
#
|
||||||
|
|
||||||
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
|
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{$GOTO ON}
|
{$GOTO ON}
|
||||||
{$define IN_DPMIEXCP_UNIT}
|
{$define IN_DPMIEXCP_UNIT}
|
||||||
{$ifndef NO_EXCEPTIONS_IN_SYSTEM}
|
{$ifndef NO_EXCEPTIONS_IN_SYSTEM}
|
||||||
{ $ define EXCEPTIONS_IN_SYSTEM}
|
{$define EXCEPTIONS_IN_SYSTEM}
|
||||||
{$endif NO_EXCEPTIONS_IN_SYSTEM}
|
{$endif NO_EXCEPTIONS_IN_SYSTEM}
|
||||||
|
|
||||||
Unit DpmiExcp;
|
Unit DpmiExcp;
|
||||||
@ -32,8 +32,10 @@ Unit DpmiExcp;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$ifdef NO_EXCEPTIONS_IN_SYSTEM}
|
||||||
uses
|
uses
|
||||||
go32;
|
go32;
|
||||||
|
{$endif NO_EXCEPTIONS_IN_SYSTEM}
|
||||||
|
|
||||||
{$endif ndef IN_SYSTEM}
|
{$endif ndef IN_SYSTEM}
|
||||||
{ No stack checking ! }
|
{ No stack checking ! }
|
||||||
@ -167,17 +169,13 @@ function __djgpp_set_sigquit_key(new_key : longint) : longint;cdecl;
|
|||||||
external name '___djgpp_set_sigquit_key';
|
external name '___djgpp_set_sigquit_key';
|
||||||
function __djgpp__traceback_exit(sig : longint) : longint;cdecl;
|
function __djgpp__traceback_exit(sig : longint) : longint;cdecl;
|
||||||
external name '__djgpp__traceback_exit';
|
external name '__djgpp__traceback_exit';
|
||||||
{$endif CREATE_C_FUNCTIONS}
|
{$else CREATE_C_FUNCTIONS}
|
||||||
var
|
var
|
||||||
v2prt0_ds_alias : word;external name '___v2prt0_ds_alias';
|
v2prt0_ds_alias : word;external name '___v2prt0_ds_alias';
|
||||||
djgpp_ds_alias : word;external name '___djgpp_ds_alias';
|
djgpp_ds_alias : word;external name '___djgpp_ds_alias';
|
||||||
djgpp_exception_state_ptr : pexception_state;external name '___djgpp_exception_state_ptr';
|
|
||||||
endtext : longint;external name '_etext';
|
|
||||||
starttext : longint;external name 'start';
|
|
||||||
djgpp_old_kbd : tseginfo;external name '___djgpp_old_kbd';
|
djgpp_old_kbd : tseginfo;external name '___djgpp_old_kbd';
|
||||||
djgpp_hw_lock_start : longint;external name '___djgpp_hw_lock_start';
|
djgpp_hw_lock_start : longint;external name '___djgpp_hw_lock_start';
|
||||||
djgpp_hw_lock_end : longint;external name '___djgpp_hw_lock_end';
|
djgpp_hw_lock_end : longint;external name '___djgpp_hw_lock_end';
|
||||||
djgpp_hwint_flags : longint;external name '___djgpp_hwint_flags';
|
|
||||||
djgpp_dos_sel : word;external name '___djgpp_dos_sel';
|
djgpp_dos_sel : word;external name '___djgpp_dos_sel';
|
||||||
djgpp_exception_table : array[0..0] of pointer;external name '___djgpp_exception_table';
|
djgpp_exception_table : array[0..0] of pointer;external name '___djgpp_exception_table';
|
||||||
dosmemselector : word;external name '_core_selector';
|
dosmemselector : word;external name '_core_selector';
|
||||||
@ -188,7 +186,12 @@ procedure djgpp_npx_hdlr;external name '___djgpp_npx_hdlr';
|
|||||||
procedure djgpp_kbd_hdlr;external name '___djgpp_kbd_hdlr';
|
procedure djgpp_kbd_hdlr;external name '___djgpp_kbd_hdlr';
|
||||||
procedure djgpp_kbd_hdlr_pc98;external name '___djgpp_kbd_hdlr_pc98';
|
procedure djgpp_kbd_hdlr_pc98;external name '___djgpp_kbd_hdlr_pc98';
|
||||||
procedure djgpp_cbrk_hdlr;external name '___djgpp_cbrk_hdlr';
|
procedure djgpp_cbrk_hdlr;external name '___djgpp_cbrk_hdlr';
|
||||||
|
{$endif CREATE_C_FUNCTIONS}
|
||||||
|
var
|
||||||
|
endtext : longint;external name '_etext';
|
||||||
|
starttext : longint;external name 'start';
|
||||||
|
djgpp_exception_state_ptr : pexception_state;external name '___djgpp_exception_state_ptr';
|
||||||
|
djgpp_hwint_flags : longint;external name '___djgpp_hwint_flags';
|
||||||
|
|
||||||
{$ifdef CREATE_C_FUNCTIONS}
|
{$ifdef CREATE_C_FUNCTIONS}
|
||||||
var
|
var
|
||||||
@ -1095,12 +1098,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef CREATE_C_FUNCTIONS}
|
||||||
var
|
var
|
||||||
_swap_in : pointer;external name '_swap_in';
|
_swap_in : pointer;external name '_swap_in';
|
||||||
_swap_out : pointer;external name '_swap_out';
|
_swap_out : pointer;external name '_swap_out';
|
||||||
_exception_exit : pointer;external name '_exception_exit';
|
_exception_exit : pointer;external name '_exception_exit';
|
||||||
|
|
||||||
{$ifdef CREATE_C_FUNCTIONS}
|
|
||||||
procedure dpmiexcp_exit{(status : longint)};[public,alias : 'excep_exit'];
|
procedure dpmiexcp_exit{(status : longint)};[public,alias : 'excep_exit'];
|
||||||
{ We need to restore hardware interrupt handlers even if somebody calls
|
{ We need to restore hardware interrupt handlers even if somebody calls
|
||||||
`_exit' directly, or else we crash the machine in nested programs.
|
`_exit' directly, or else we crash the machine in nested programs.
|
||||||
@ -1133,17 +1136,9 @@ begin
|
|||||||
djgpp_exception_toggle;
|
djgpp_exception_toggle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else CREATE_C_FUNCTIONS}
|
|
||||||
procedure dpmiexcp_exit;external name 'excep_exit';
|
|
||||||
procedure dpmi_swap_in;external name 'swap_in';
|
|
||||||
procedure dpmi_swap_out;external name 'swap_out';
|
|
||||||
{$endif CREATE_C_FUNCTIONS}
|
|
||||||
|
|
||||||
var
|
var
|
||||||
___djgpp_app_DS : word;external name '___djgpp_app_DS';
|
___djgpp_app_DS : word;external name '___djgpp_app_DS';
|
||||||
___djgpp_our_DS : word;external name '___djgpp_our_DS';
|
___djgpp_our_DS : word;external name '___djgpp_our_DS';
|
||||||
|
|
||||||
{$ifdef CREATE_C_FUNCTIONS}
|
|
||||||
__djgpp_sigint_mask : word;external name '___djgpp_sigint_mask';
|
__djgpp_sigint_mask : word;external name '___djgpp_sigint_mask';
|
||||||
__djgpp_sigint_key : word;external name '___djgpp_sigint_key';
|
__djgpp_sigint_key : word;external name '___djgpp_sigint_key';
|
||||||
__djgpp_sigquit_mask : word;external name '___djgpp_sigquit_mask';
|
__djgpp_sigquit_mask : word;external name '___djgpp_sigquit_mask';
|
||||||
@ -1244,6 +1239,7 @@ begin
|
|||||||
{ This exits, does not return. }
|
{ This exits, does not return. }
|
||||||
do_faulting_finish_message(djgpp_exception_state_ptr=@fake_exception);
|
do_faulting_finish_message(djgpp_exception_state_ptr=@fake_exception);
|
||||||
___exit(-1);
|
___exit(-1);
|
||||||
|
__djgpp__traceback_exit:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure djgpp_exception_setup;
|
procedure djgpp_exception_setup;
|
||||||
@ -1426,7 +1422,10 @@ end;
|
|||||||
{$endif IN_SYSTEM}
|
{$endif IN_SYSTEM}
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.13 2000-03-10 09:53:17 pierre
|
Revision 1.14 2000-03-13 19:45:21 pierre
|
||||||
|
+ exceptions in system is default now
|
||||||
|
|
||||||
|
Revision 1.13 2000/03/10 09:53:17 pierre
|
||||||
* some clean up for exceptions in system
|
* some clean up for exceptions in system
|
||||||
|
|
||||||
Revision 1.12 2000/03/09 09:15:10 pierre
|
Revision 1.12 2000/03/09 09:15:10 pierre
|
||||||
|
@ -25,6 +25,10 @@ interface
|
|||||||
- list of args
|
- list of args
|
||||||
- list of env variables (PM) }
|
- list of env variables (PM) }
|
||||||
|
|
||||||
|
{$ifndef NO_EXCEPTIONS_IN_SYSTEM}
|
||||||
|
{$define EXCEPTIONS_IN_SYSTEM}
|
||||||
|
{$endif NO_EXCEPTIONS_IN_SYSTEM}
|
||||||
|
|
||||||
{ include system-independent routine headers }
|
{ include system-independent routine headers }
|
||||||
|
|
||||||
{$I systemh.inc}
|
{$I systemh.inc}
|
||||||
@ -1350,7 +1354,6 @@ end;
|
|||||||
{$I thread.inc}
|
{$I thread.inc}
|
||||||
{$endif MT}
|
{$endif MT}
|
||||||
|
|
||||||
{ define EXCEPTIONS_IN_SYSTEM}
|
|
||||||
{$ifndef RTLLITE}
|
{$ifndef RTLLITE}
|
||||||
{$ifdef EXCEPTIONS_IN_SYSTEM}
|
{$ifdef EXCEPTIONS_IN_SYSTEM}
|
||||||
{$define IN_SYSTEM}
|
{$define IN_SYSTEM}
|
||||||
@ -1403,7 +1406,10 @@ Begin
|
|||||||
End.
|
End.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.35 2000-03-09 09:15:10 pierre
|
Revision 1.36 2000-03-13 19:45:21 pierre
|
||||||
|
+ exceptions in system is default now
|
||||||
|
|
||||||
|
Revision 1.35 2000/03/09 09:15:10 pierre
|
||||||
+ support for djgpp v2.03 (added some new functions that are in v2.03 ofdpmiexcp.c)
|
+ support for djgpp v2.03 (added some new functions that are in v2.03 ofdpmiexcp.c)
|
||||||
+ code to integrate exception support inside the system unit
|
+ code to integrate exception support inside the system unit
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user