Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-04

Stack traces under Win64

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

denisgolovan

Hi all

I am trying to get stack traces for Win64 for exception, but BackTraceStrFunc still returns only hex representation. My stack dumper is called via ExceptProc global variable. Basically the procedure dumping exception stack follows below.

procedure TLogger.DumpExceptionBackTrace;
var
  FrameNumber,
  FrameCount   : longint;
  Frames       : PPointer;
begin
  if RaiseList=nil then
    exit;
  Log(BackTraceStrFunc(RaiseList^.Addr));
  FrameCount:=RaiseList^.Framecount;
  Frames:=RaiseList^.Frames;
  for FrameNumber := 0 to FrameCount-1 do
    Log(BackTraceStrFunc(Frames[FrameNumber]));
end;

Some info:
Actually I am doing cross-compilation from Linux x64 if it matters. Linux version of the same application works fine.
I added both -gh and -gl parameters for compiler.

Am I doing something wrong?
Should I force the compiler to save debug info in some specific format on Win64? Please comment.

Regards, Denis Golovan