diff --git a/rtl/objpas/sysutils/sysutilh.inc b/rtl/objpas/sysutils/sysutilh.inc index ee5dfff075..c04139592c 100644 --- a/rtl/objpas/sysutils/sysutilh.inc +++ b/rtl/objpas/sysutils/sysutilh.inc @@ -156,6 +156,8 @@ type { Exception handling routines } function ExceptObject: TObject; function ExceptAddr: Pointer; + function ExceptFrameCount: Longint; + function ExceptFrames: PPointer; function ExceptionErrorMessage(ExceptObject: TObject; ExceptAddr: Pointer; Buffer: PChar; Size: Integer): Integer; procedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer); diff --git a/rtl/objpas/sysutils/sysutils.inc b/rtl/objpas/sysutils/sysutils.inc index 45c355278e..3772d0e09e 100644 --- a/rtl/objpas/sysutils/sysutils.inc +++ b/rtl/objpas/sysutils/sysutils.inc @@ -362,6 +362,24 @@ begin Result:=RaiseList^.Addr; end; +function ExceptFrameCount: Longint; + +begin + If RaiseList=Nil then + Result:=0 + else + Result:=RaiseList^.Framecount; +end; + +function ExceptFrames: PPointer; + +begin + If RaiseList=Nil then + Result:=Nil + else + Result:=RaiseList^.Frames; +end; + function ExceptionErrorMessage(ExceptObject: TObject; ExceptAddr: Pointer; Buffer: PChar; Size: Integer): Integer; diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index 3c31f4d283..4085d44588 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -177,7 +177,7 @@ begin Inc(Arglen); until (pc[Arglen]=#0); allocarg(count,arglen); - move(pc^,argv[count]^,arglen); + move(pc^,argv[count]^,arglen+1); { Setup cmdline variable } cmdline:=GetCommandLine; { process arguments }