mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 21:40:34 +02:00
* Future-proof CallerAddr
git-svn-id: trunk@30360 -
This commit is contained in:
parent
226c184d14
commit
e8da5e1170
@ -347,14 +347,18 @@ Const
|
|||||||
|
|
||||||
|
|
||||||
function CallerAddr: Pointer;
|
function CallerAddr: Pointer;
|
||||||
var
|
|
||||||
bp: Pointer;
|
Var
|
||||||
|
bp,pcaddr : pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
bp := get_caller_frame(get_frame);
|
Result:=Nil;
|
||||||
if bp <> nil then
|
bp:=get_frame;
|
||||||
Result := get_caller_addr(bp)
|
pcaddr:=get_pc_addr;
|
||||||
else
|
get_caller_stackinfo(bp,pcaddr);
|
||||||
Result := nil;
|
if bp<>Nil then
|
||||||
|
get_caller_stackinfo(bp,pcaddr);
|
||||||
|
result:=pcaddr;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function AddrsToStr(Addrs: Pointer): string;
|
function AddrsToStr(Addrs: Pointer): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user