| author | |
| committer | |
| log | 95c43e20b45aafa6b34b0aae927dbabbb0b65e32 |
| tree | 71cca30464014605e68fe53453965ad45d86066c |
| parent | 96737ef499e66d8ab3e32fd4641599b1843f5b8c |
This `pdb.Pdb.init` call can return `error.FileNotFound`, which was previously resulting in:
Unable to print stack trace: FileNotFound
which also aborts the stack trace printing (so any deeper stack traces are not printed).
It makes more sense to treat it as `MissingDebugInfo` which then gets printed as:
???:?:?: 0x7fffa8817033 in ??? (???)
and allows the stack trace to continue printing.
Note: locally, the error.FileNotFound was being triggered for me when looking for kernel32.pdb and ntdll.pdb1 files changed, 4 insertions(+), 1 deletions(-)
lib/std/debug.zig+4-1| ... | ... | @@ -864,7 +864,10 @@ fn readCoffDebugInfo(allocator: mem.Allocator, coff_file: File) !ModuleDebugInfo |
| 864 | 864 | defer allocator.free(path); |
| 865 | 865 | |
| 866 | 866 | di.debug_data = PdbOrDwarf{ .pdb = undefined }; |
| 867 | di.debug_data.pdb = try pdb.Pdb.init(allocator, path); | |
| 867 | di.debug_data.pdb = pdb.Pdb.init(allocator, path) catch |err| switch (err) { | |
| 868 | error.FileNotFound, error.IsDir => return error.MissingDebugInfo, | |
| 869 | else => return err, | |
| 870 | }; | |
| 868 | 871 | try di.debug_data.pdb.parseInfoStream(); |
| 869 | 872 | try di.debug_data.pdb.parseDbiStream(); |
| 870 | 873 |