* 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:
florian 2005-06-21 12:55:45 +00:00
parent 67d640ad13
commit 13e3102954
3 changed files with 21 additions and 1 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 }