From 72c8dbfa43348495f53bb0a3a32bd42d4e2788eb Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 5 Jun 2000 13:04:11 +0000 Subject: [PATCH] * StabOfs for OS2 changed, hopefully correct now --- rtl/inc/lineinfo.pp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/rtl/inc/lineinfo.pp b/rtl/inc/lineinfo.pp index 3654f75366..b4211b1aa3 100644 --- a/rtl/inc/lineinfo.pp +++ b/rtl/inc/lineinfo.pp @@ -320,10 +320,19 @@ begin begin Seek (F, EmxHeader.AoutOfs); BlockRead (F, AoutHeader, SizeOf (TAoutHeader)); - StabOfs := (Succ (EmxHeader.AoutOfs div StartPageSize)) * StartPageSize - + AoutHeader.TextSize + AoutHeader.DataSize + 4; + + if AOutHeader.Magic=$10B then + StabOfs := StartPageSize + else + StabOfs :=EmxHeader.AoutOfs + SizeOf (TAoutHeader); + StabOfs := StabOfs + + AoutHeader.TextSize + + AoutHeader.DataSize + + AoutHeader.TextRelocSize + + AoutHeader.DataRelocSize; (* I don't really know, where this "+ 4" comes from, *) (* but it seems to be correct. :-) - TH *) +(* Maybe not PM *) StabCnt := AoutHeader.SymbSize div SizeOf (TStab); StabStrOfs := StabOfs + AoutHeader.SymbSize; StabsFunctionRelative:=false; @@ -629,7 +638,10 @@ finalization end. { $Log$ - Revision 1.10 2000-05-08 13:23:46 peter + Revision 1.11 2000-06-05 13:04:11 pierre + * StabOfs for OS2 changed, hopefully correct now + + Revision 1.10 2000/05/08 13:23:46 peter * export function so ppl can use it in their own programs Revision 1.9 2000/04/20 13:03:41 pierre @@ -659,4 +671,4 @@ end. Revision 1.1 2000/02/06 17:19:22 peter * lineinfo unit added which uses stabs to get lineinfo for backtraces -} +} \ No newline at end of file