mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 09:53:09 +02:00
* fixed the stack traces under i8086-msdos (StackTop wasn't initialized)
git-svn-id: trunk@25863 -
This commit is contained in:
parent
28c16f31e6
commit
8066d12c87
@ -25,6 +25,7 @@
|
|||||||
extern _end ; defined by WLINK, indicates end of BSS
|
extern _end ; defined by WLINK, indicates end of BSS
|
||||||
|
|
||||||
extern __stklen
|
extern __stklen
|
||||||
|
extern __stktop
|
||||||
extern __stkbottom
|
extern __stkbottom
|
||||||
|
|
||||||
extern __nearheap_start
|
extern __nearheap_start
|
||||||
@ -141,6 +142,7 @@ skip_mem_realloc:
|
|||||||
sub bx, 2
|
sub bx, 2
|
||||||
mov sp, bx
|
mov sp, bx
|
||||||
|
|
||||||
|
mov word [__stktop], sp
|
||||||
add bx, 2
|
add bx, 2
|
||||||
sub bx, word [__stklen]
|
sub bx, word [__stklen]
|
||||||
and bl, 0FEh
|
and bl, 0FEh
|
||||||
|
@ -95,6 +95,7 @@ type
|
|||||||
PFarWord = ^Word;far;
|
PFarWord = ^Word;far;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
__stktop : pointer;public name '__stktop';
|
||||||
__stkbottom : pointer;public name '__stkbottom';
|
__stkbottom : pointer;public name '__stkbottom';
|
||||||
__nearheap_start: pointer;public name '__nearheap_start';
|
__nearheap_start: pointer;public name '__nearheap_start';
|
||||||
__nearheap_end: pointer;public name '__nearheap_end';
|
__nearheap_end: pointer;public name '__nearheap_end';
|
||||||
@ -329,8 +330,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
StackLength := CheckInitialStkLen(InitialStkLen);
|
StackTop := __stktop;
|
||||||
StackBottom := __stkbottom;
|
StackBottom := __stkbottom;
|
||||||
|
StackLength := __stktop - __stkbottom;
|
||||||
if DetectFPU then
|
if DetectFPU then
|
||||||
SysInitFPU;
|
SysInitFPU;
|
||||||
{ To be set if this is a GUI or console application }
|
{ To be set if this is a GUI or console application }
|
||||||
|
Loading…
Reference in New Issue
Block a user