mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 15:09:33 +02:00
+ return a small, fake backtrace for WebAssembly, so that in case of a runtime
error, the message 'Runtime error XXX at $EEEEEEEE' appears.
This commit is contained in:
parent
c0cec218d6
commit
d9eb8d75b9
@ -36,10 +36,24 @@ procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
||||
function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;
|
||||
{$define FPC_SYSTEM_HAS_GET_PC_ADDR}
|
||||
Function Get_pc_addr : CodePointer;
|
||||
begin
|
||||
result:=nil;
|
||||
{ dummy, produces a small, fake backtrace, otherwise programs terminate
|
||||
with no output at all, in case of a runtime error }
|
||||
result:=CodePointer($eeeeeeef);
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
||||
function get_caller_addr(framebp:pointer;addr:codepointer=nil):pointer;
|
||||
begin
|
||||
{ dummy, produces a small, fake backtrace, otherwise programs terminate
|
||||
with no output at all, in case of a runtime error }
|
||||
if addr=CodePointer($eeeeeeef) then
|
||||
result:=CodePointer($eeeeeeee)
|
||||
else
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user