# C13 Line Information

C13 line information lives in the module debug stream after the symbol and C13
signature sections. It is a sequence of aligned debug subsections. MoonPDB
parses the string, checksum, and line subsections and resolves segment-relative
code offsets to source paths and line numbers.

## Supported

- `kind`/`length` subsection framing with 4-byte alignment
- Ignore-bit masking and raw preservation of unknown subsections
- CodeView string tables addressed by byte offset
- File checksum entries, checksum kinds, bytes, and source paths
- Module StringTable and global PDB `/names` source-name lookup
- Line fragments with relocation segment, relocation offset, flags, and code size
- Line blocks linked through file-checksum offsets
- Line numbers encoded as start/end plus the statement bit
- Optional start/end column entries when `LF_HaveColumns` is set
- Nearest line lookup within a matching segment and line-fragment code range
- Limits for subsections, checksums, fragments, entries, and total bytes

## API

```moonbit
let dbi = msf.dbi(@moonpdb.DbiLimits::default())
let info = msf.module_c13_info(
  dbi,
  0,
  @moonpdb.SymbolLimits::default(),
  @moonpdb.C13Limits::default(),
)

let source = info.find_line(1, 0x1010)
let checksums = info.file_checksum_at(0)
```

`ModuleDebugStream::c13_info` parses an already extracted C13 buffer.
`parse_c13_debug_info` accepts the subsection bytes directly.

## Mapping Semantics

The line-fragment `CodeSize` is the code range. `LineBlockRecordSize` is only
the serialized size of the line block record and is not used as a machine-code
range. Address lookup selects the greatest line offset not greater than the
requested offset inside a matching fragment.

## Current Boundary

Segment offsets are mapped through PE in the separate PE and unified
symbolication layers. Inline-site line records, source-server retrieval, and a
multi-module match policy are subsequent milestones.

## Format References

- LLVM `DebugInfo/CodeView/DebugLinesSubsection.h`
- LLVM `DebugInfo/CodeView/DebugChecksumsSubsection.h`
- LLVM `DebugInfo/CodeView/DebugStringTableSubsection.h`
- Microsoft `microsoft-pdb` CodeView headers

The implementation is original MoonBit code. Referenced files are public
format documentation under their respective upstream licenses.
