mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +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 }
|
||||
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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user