* fixed the stack traces under i8086-msdos (StackTop wasn't initialized)

git-svn-id: trunk@25863 -
This commit is contained in:
nickysn 2013-10-27 13:53:16 +00:00
parent 28c16f31e6
commit 8066d12c87
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@
extern _end ; defined by WLINK, indicates end of BSS
extern __stklen
extern __stktop
extern __stkbottom
extern __nearheap_start
@ -141,6 +142,7 @@ skip_mem_realloc:
sub bx, 2
mov sp, bx
mov word [__stktop], sp
add bx, 2
sub bx, word [__stklen]
and bl, 0FEh

View File

@ -95,6 +95,7 @@ type
PFarWord = ^Word;far;
var
__stktop : pointer;public name '__stktop';
__stkbottom : pointer;public name '__stkbottom';
__nearheap_start: pointer;public name '__nearheap_start';
__nearheap_end: pointer;public name '__nearheap_end';
@ -329,8 +330,9 @@ begin
end;
begin
StackLength := CheckInitialStkLen(InitialStkLen);
StackTop := __stktop;
StackBottom := __stkbottom;
StackLength := __stktop - __stkbottom;
if DetectFPU then
SysInitFPU;
{ To be set if this is a GUI or console application }