r3code/lazarus-exception-logger

No stack trace details at Windows 64-bit

Opened this issue · 1 comments

I found this bug after updated the OS to Windows 10 64 bit.
All line numbers set to 0, no procedure name at stack trace.

Related to FPC Bug 0034234: Lineinfo doesn't work because no stabs is generated

I tried to dig into it and maybe my information helps you.

The function FindExeSection in the unit CustomLineInfo returns False on both calls in lines 211 and 212. Therefore the function GetLineInfo in the unit UStackTrace will not getting any information.

  e.processaddress := ptruint(baseaddr) - e.processaddress;
  StabsFunctionRelative := E.FunctionRelative;
  if FindExeSection(e,'.stab',stabofs,stablen) and
     FindExeSection(e,'.stabstr',stabstrofs,stabstrlen) then         // both return false
    begin
      stabcnt:=stablen div sizeof(tstab);
      OpenStabs:=true;
    end
  else
    begin
      CloseExeFile(e);
      exit;
    end;
end;

Maybe this modified version of the unit dbginforeader.pas by alrieckert is helping?
https://github.com/alrieckert/lazarus/blob/master/components/leakview/dbginforeader.pas

The comment says:

This file is a modified copy of the FreePascal units lnfodwrf and lineinfo

It has the variables HasStabs and HasDwarf in line 24.

Hope it helps.