mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 19:29:09 +02:00
* Patch from Vincent Snijders:
* 1. except.patch implements ExceptFrameCount and ExceptFrames * 2. arg.patch fixes a bug in the copying of the commandfilename to the arg array. The #0 character was not copied, so the pchar was not properly terminated. git-svn-id: trunk@461 -
This commit is contained in:
parent
67d640ad13
commit
13e3102954
@ -156,6 +156,8 @@ type
|
|||||||
{ Exception handling routines }
|
{ Exception handling routines }
|
||||||
function ExceptObject: TObject;
|
function ExceptObject: TObject;
|
||||||
function ExceptAddr: Pointer;
|
function ExceptAddr: Pointer;
|
||||||
|
function ExceptFrameCount: Longint;
|
||||||
|
function ExceptFrames: PPointer;
|
||||||
function ExceptionErrorMessage(ExceptObject: TObject; ExceptAddr: Pointer;
|
function ExceptionErrorMessage(ExceptObject: TObject; ExceptAddr: Pointer;
|
||||||
Buffer: PChar; Size: Integer): Integer;
|
Buffer: PChar; Size: Integer): Integer;
|
||||||
procedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer);
|
procedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer);
|
||||||
|
@ -362,6 +362,24 @@ begin
|
|||||||
Result:=RaiseList^.Addr;
|
Result:=RaiseList^.Addr;
|
||||||
end;
|
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;
|
function ExceptionErrorMessage(ExceptObject: TObject; ExceptAddr: Pointer;
|
||||||
Buffer: PChar; Size: Integer): Integer;
|
Buffer: PChar; Size: Integer): Integer;
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ begin
|
|||||||
Inc(Arglen);
|
Inc(Arglen);
|
||||||
until (pc[Arglen]=#0);
|
until (pc[Arglen]=#0);
|
||||||
allocarg(count,arglen);
|
allocarg(count,arglen);
|
||||||
move(pc^,argv[count]^,arglen);
|
move(pc^,argv[count]^,arglen+1);
|
||||||
{ Setup cmdline variable }
|
{ Setup cmdline variable }
|
||||||
cmdline:=GetCommandLine;
|
cmdline:=GetCommandLine;
|
||||||
{ process arguments }
|
{ process arguments }
|
||||||
|
Loading…
Reference in New Issue
Block a user