https://issues.dlang.org/show_bug.cgi?id=21770
LucienPe <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |DebugInfo CC| |[email protected] --- Comment #1 from LucienPe <[email protected]> --- There is two bugs: 1. `break prog.main` should say `Function "prog.main" not defined.` (because of https://issues.dlang.org/show_bug.cgi?id=21160), but it breaks somewhere else (end of f() in this case) --- void main() { int x = 123; void f() { x++; } } --- Removing `f()` produce `Function "prog.main" not defined.` ("normal" behaviour). 2. Using `writeln` writes wrong data in the dwarf debug infos. --- import std.stdio; void main() { writeln("x"); } --- `llvm-dwarfdump prog`: -- error: unexpected end of data at offset 0x804 while reading [0x15, 0x4d1d) error: unexpected end of data at offset 0x804 while reading [0x15, 0x4d1d) 0x00000789: DW_TAG_subprogram DW_AT_sibling (0x00000852) DW_AT_name ("std.exception.bailOut!(std.exception.ErrnoException).bailOut") DW_AT_MIPS_linkage_name ("_D3std9exception__T7bailOutHTCQBcQBb14ErrnoExceptionZQBiFNfAyamMAxaZv") DW_AT_decl_file ("phobos/std/exception.d") DW_AT_decl_line (512) DW_AT_low_pc (0x000000000004db00) DW_AT_high_pc (0x000000000004db7c) DW_AT_frame_base (0x00000214: [0x000000000004db00, 0x000000000004db01): DW_OP_breg7 RSP+8 [0x000000000004db01, 0x000000000004db03): DW_OP_breg7 RSP+16 [0x000000000004db03, 0x000000000004db7c): DW_OP_breg6 RBP+16) 0x00000828: DW_TAG_formal_parameter DW_AT_name ("msg") DW_AT_type (0x000004f0 "_Array_char") DW_AT_artificial (0x00) DW_AT_location (DW_OP_fbreg -64) --- Something in bailOut is not correctly emitted / not supported. --
