Browse Source

* fix 64bit address printing

peter 21 years ago
parent
commit
55486446a3
2 changed files with 11 additions and 5 deletions
  1. 5 2
      rtl/inc/lineinfo.pp
  2. 6 3
      rtl/inc/system.inc

+ 5 - 2
rtl/inc/lineinfo.pp

@@ -752,7 +752,7 @@ begin
   BackTraceStrFunc:=@SysBackTraceStr;
   GetLineInfo(dword(addr),func,source,line);
 { create string }
-  StabBackTraceStr:='  $'+HexStr(Longint(addr),8);
+  StabBackTraceStr:='  $'+HexStr(ptrint(addr),sizeof(ptrint)*2);
   if func<>'' then
    StabBackTraceStr:=StabBackTraceStr+'  '+func;
   if source<>'' then
@@ -781,7 +781,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.20  2004-02-06 20:17:12  daniel
+  Revision 1.21  2004-04-22 19:43:43  peter
+    * fix 64bit address printing
+
+  Revision 1.20  2004/02/06 20:17:12  daniel
     * Use $ for hex numbers instead of alien 0x
 
   Revision 1.19  2003/10/17 20:52:12  olle

+ 6 - 3
rtl/inc/system.inc

@@ -671,7 +671,7 @@ Begin
   { Show runtime error and exit }
   If erroraddr<>nil Then
    Begin
-     Writeln(stdout,'Runtime error ',Errorcode,' at $',hexstr(Longint(Erroraddr),8));
+     Writeln(stdout,'Runtime error ',Errorcode,' at $',hexstr(PtrInt(Erroraddr),sizeof(PtrInt)*2));
      { to get a nice symify }
      Writeln(stdout,BackTraceStrFunc(Erroraddr));
      dump_stack(stdout,ErrorBase);
@@ -702,7 +702,7 @@ end;
 
 function SysBackTraceStr (Addr: Pointer): ShortString;
 begin
-  SysBackTraceStr:='  $'+HexStr(Longint(addr),8);
+  SysBackTraceStr:='  $'+HexStr(Ptrint(addr),sizeof(PtrInt)*2);
 end;
 
 
@@ -881,7 +881,10 @@ end;
 
 {
   $Log$
-  Revision 1.55  2004-04-22 17:10:38  peter
+  Revision 1.56  2004-04-22 19:43:43  peter
+    * fix 64bit address printing
+
+  Revision 1.55  2004/04/22 17:10:38  peter
     * random(int64) added
 
   Revision 1.54  2004/02/20 11:01:20  daniel