Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No stack trace details at Windows 64-bit #15

Open
r3code opened this issue Jan 22, 2020 · 1 comment
Open

No stack trace details at Windows 64-bit #15

r3code opened this issue Jan 22, 2020 · 1 comment

Comments

@r3code
Copy link
Owner

r3code commented Jan 22, 2020

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

@Thoupler
Copy link

Thoupler commented Feb 11, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants