Uh oh!
There was an error while loading. Please reload this page.
llvm: improve emitted debug info - #13675
Conversation
* ensure parameter debug info is in the subroutine di scope * slit sub file path into basename and dirname Closesziglang#12257Closesziglang#12665
kubkon
commented
Nov 28, 2022
kubkon
commented
Nov 28, 2022
The issue #13315 still persists: |
nektro
commented
Nov 28, 2022
13224 currently fails with |
Vexu
commented
Nov 28, 2022
But do you get a stack trace? |
nektro
commented
Nov 28, 2022
https://bpa.st/raw/2EMA yeah but thats even on master, so the issue no longer repros for me with that input |
micahswitzer
commented
Nov 29, 2022
The change to how the LLVM backend emits the path to the source file leads to a duplicated parent directory with correct DWARF parsing. This can be observed with There's more context as to my changes to the DWARF parsing code on Discord: https://discord.com/channels/605571803288698900/1041373573908021248/1041386215733215352 Example: // src/main.zigconstb=@import("a/b.zig");
pubfnmain() void {
b.doTest();
}// src/a/b.zigpubfndoTest() void {
@panic("test");
}Before this patch: $ llvm-dwarfdump -n doTest mainmain: file format elf64-x86-640x000041c6: DW_TAG_subprogram DW_AT_low_pc (0x000000000020bc30) DW_AT_high_pc (0x000000000020bc56) DW_AT_frame_base (DW_OP_reg6 RBP) DW_AT_linkage_name ("a.b.doTest") DW_AT_name ("doTest") DW_AT_decl_file ("src/a/b.zig") DW_AT_decl_line (1) DW_AT_type (0x00003ccd "void")With this patch: $ llvm-dwarfdump -n doTest mainmain: file format elf64-x86-640x00004156: DW_TAG_subprogram DW_AT_low_pc (0x000000000020bc30) DW_AT_high_pc (0x000000000020bc56) DW_AT_frame_base (DW_OP_reg6 RBP) DW_AT_linkage_name ("a.b.doTest") DW_AT_name ("doTest") DW_AT_decl_file ("src/src/a/b.zig") DW_AT_decl_line (1) DW_AT_type (0x00003c79 "void") |
Closes#12257
Closes#12665
Might also resolve the following: #13224 and #13315 but I haven't been able to reproduce those.