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
Parameters
| Type | Name |
|---|---|
| WaaS.Models.Module | module |
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
Parameters
| Type | Name |
|---|---|
System.ReadOnlySpan<System.Byte> | debugLine |
System.ReadOnlySpan<System.Byte> | debugLineStr |
System.ReadOnlySpan<System.Byte> | debugStr |
System.UInt32 | codeOffset |
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
| Type | Name |
|---|---|
System.UInt32 | offset |
| WaaS.Models.DwarfLineRow | row |
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
| Type | Name |
|---|---|
| WaaS.Models.DwarfLineRow | row |