Skip to content

Lowering debug symbols to LLVM #7

@resetius

Description

@resetius

Currently, Qumir does not emit debug symbols in LLVM IR. For source-level debugging, we need to propagate source locations (line/column info) through all compiler layers down to LLVM.

Design Ideas

  • AST Annotation: Attach source location info (line, column, file) to all AST nodes during parsing (done)
  • IR Propagation: Preserve location info in IR nodes during lowering and transformations.
  • LLVM Metadata: At codegen, emit LLVM !dbg metadata for instructions, variables, and functions using DWARF standard.
  • Mapping Table: Maintain mapping from Qumir source lines to LLVM instructions for error reporting and debugging.
  • Pragmas/Flags: Allow enabling/disabling debug info via pragma or compiler flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions