mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 16:59:11 +02:00
morphos/lineinfo: updated the address adjustment comment added in r40857, no functional change
git-svn-id: trunk@40860 -
This commit is contained in:
parent
893a5e8f71
commit
fd1a09a254
@ -434,11 +434,12 @@ begin
|
|||||||
Store:=BackTraceStrFunc;
|
Store:=BackTraceStrFunc;
|
||||||
BackTraceStrFunc:=@SysBackTraceStr;
|
BackTraceStrFunc:=@SysBackTraceStr;
|
||||||
|
|
||||||
{ for valid stacktraces at least you have to substract sizeof(pointer)
|
{ on most architectures, (but not everywhere, Sparc is a notable exception)
|
||||||
from the trace address otherwise the lineinfo might be off-by-one,
|
for valid stacktraces you have to substract sizeof(pointer), or similar
|
||||||
because of course the backtrace addresses don't point to the jump
|
instruction length from the trace address otherwise the lineinfo might
|
||||||
instructions, but the following address, which might belong to a
|
be off-by-one, because of course the backtrace addresses don't point to
|
||||||
different source line entirely (KB) }
|
the jump instructions, but the following address, which might belong to
|
||||||
|
a different source line entirely (KB) }
|
||||||
Success:=GetLineInfo(ptruint(addr-sizeof(pointer)),func,source,line);
|
Success:=GetLineInfo(ptruint(addr-sizeof(pointer)),func,source,line);
|
||||||
|
|
||||||
{ create string }
|
{ create string }
|
||||||
|
Loading…
Reference in New Issue
Block a user