|
@@ -24,7 +24,6 @@ interface
|
|
|
|
|
|
function GetLineInfo(addr:ptruint;var func,source:string;var line:longint) : boolean;
|
|
|
|
|
|
-
|
|
|
implementation
|
|
|
|
|
|
uses
|
|
@@ -85,11 +84,9 @@ begin
|
|
|
|
|
|
GetModuleByAddr(addr,baseaddr,filename);
|
|
|
{$ifdef DEBUG_LINEINFO}
|
|
|
- writeln(stderr,filename);
|
|
|
+ writeln(stderr,filename,' Baseaddr: ',hexstr(ptruint(baseaddr),sizeof(baseaddr)*2));
|
|
|
{$endif DEBUG_LINEINFO}
|
|
|
|
|
|
- e.processaddress:=e.processaddress-dword(baseaddr);
|
|
|
-
|
|
|
if not OpenExeFile(e,filename) then
|
|
|
exit;
|
|
|
if ReadDebugLink(e,dbgfn) then
|
|
@@ -98,6 +95,7 @@ begin
|
|
|
if not OpenExeFile(e,dbgfn) then
|
|
|
exit;
|
|
|
end;
|
|
|
+ e.processaddress:=e.processaddress+dword(baseaddr);
|
|
|
StabsFunctionRelative := E.FunctionRelative;
|
|
|
if FindExeSection(e,'.stab',stabofs,stablen) and
|
|
|
FindExeSection(e,'.stabstr',stabstrofs,stabstrlen) then
|
|
@@ -146,6 +144,10 @@ begin
|
|
|
{ processaddress is set in OpenStabs }
|
|
|
addr := addr - e.processaddress;
|
|
|
|
|
|
+{$ifdef DEBUG_LINEINFO}
|
|
|
+ writeln(stderr,'Addr: ',hexstr(addr,sizeof(addr)*2));
|
|
|
+{$endif DEBUG_LINEINFO}
|
|
|
+
|
|
|
fillchar(funcstab,sizeof(tstab),0);
|
|
|
fillchar(filestab,sizeof(tstab),0);
|
|
|
fillchar(dirstab,sizeof(tstab),0);
|