Skip to main content

Class DwarfLineTable

The line number table in the DWARF debugging information (.debug_line) of a module, which maps the instructions to the positions in the source files. DWARF 4 and 5 are supported.

Assembly: WaaS.Core.dll​
View Source​
Declaration
public sealed class DwarfLineTable

Properties​

Rows​

The rows sorted by the offset, excluding the ends of the sequences.

View Source​
Declaration
public IReadOnlyList<DwarfLineRow> Rows { get; }

Files​

The paths of the source files as recorded, which may be relative to the directory of the compilation.

View Source​
Declaration
public IReadOnlyList<string> Files { get; }

Methods​

Read(Module)​

Reads the table of the module, or returns null if the module has no line number table.

View Source​
Declaration
public static DwarfLineTable Read(Module module)
Returns​

WaaS.Models.DwarfLineTable

Parameters​
TypeName
WaaS.Models.Modulemodule

Parse(ReadOnlySpan<byte>, ReadOnlySpan<byte>, ReadOnlySpan<byte>, uint)​

Parses .debug_line. <code class="paramref">codeOffset</code> is the offset of the contents of the code section in the module.

View Source​
Declaration
public static DwarfLineTable Parse(ReadOnlySpan<byte> debugLine, ReadOnlySpan<byte> debugLineStr, ReadOnlySpan<byte> debugStr, uint codeOffset)
Returns​

WaaS.Models.DwarfLineTable

Parameters​
TypeName
System.ReadOnlySpan<System.Byte>debugLine
System.ReadOnlySpan<System.Byte>debugLineStr
System.ReadOnlySpan<System.Byte>debugStr
System.UInt32codeOffset

TryFind(uint, out DwarfLineRow)​

Finds the row covering the instruction at the offset in the module.

View Source​
Declaration
public bool TryFind(uint offset, out DwarfLineRow row)
Returns​

System.Boolean

Parameters​
TypeName
System.UInt32offset
WaaS.Models.DwarfLineRowrow

GetFile(in DwarfLineRow)​

Gets the path of the file of a row.

View Source​
Declaration
public string GetFile(in DwarfLineRow row)
Returns​

System.String

Parameters​
TypeName
WaaS.Models.DwarfLineRowrow