rust-minidump / rust-minidump

Type definitions, parsing, and analysis for the minidump file format.
MIT License
428 stars 63 forks source link

SimpleSymbolSupplier fails to parse symbol file #903

Open Poldraunic opened 12 months ago

Poldraunic commented 12 months ago

Hi!

I am trying to use stackwalker, but it fails on trying to parse .sym file. Currently I am making dumps using Google Crashpad, but for dumping symbols and stackwalking I am using Rust implementation.

I tried to use dump_syms from Google Breakpad, but nothing has changed. Dumped files seem identical. I also tried chaning file encoding from UTF16 to UTF8 as Google Breakpad stackwalker was not working with UTF16 files for whatever reason.

TRACE: starting stack unwind of thread 19284
TRACE: locating symbols for module C:\programming\crashpad_test\crashpad_test.exe
TRACE:symbols{module="crashpad_test.exe"}:locate_file{file_kind=BreakpadSym module="crashpad_test.exe"}: SimpleSymbolSupplier search
TRACE:symbols{module="crashpad_test.exe"}:locate_file{file_kind=BreakpadSym module="crashpad_test.exe"}: SimpleSymbolSupplier found file C:\programming\crashpad_test\symbols\crashpad_test.pdb/741DE467A2C34063A9EEB3800D41F25142/crashpad_test.sym
TRACE unwind_thread{tid=19284 tname=""}:symbols{module="crashpad_test.exe"}: SimpleSymbolSupplier failed: parse error: failed to parse file at line 0

Any tips?

gabrielesvelto commented 12 months ago

It's hard to tell what's wrong without knowing the contents of crashpad_test.sym. That being said since the parser is failing on line 0 then that file is likely to have some major issue.

Poldraunic commented 12 months ago

Oh, absolutely, it just slipped my mind :D

Here are the .sym files generated by Google Breakpad and Rust implementations:

Sending as .txt because GitHub didn't want to accept .sym. Do you also need a dump file?