diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-05-04 21:25:33 +0200 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-05-09 18:51:46 +0200 |
| commit | 2ae2ac33d9ddd1fb181e08a811d97b1bf238bced (patch) | |
| tree | a9b3d1f461ef443259d947f3840cb4e3da5e19b6 /src/link/Wasm/Atom.zig | |
| parent | 9b6b7034c20a0089b88e58b5142c91b2d26bcef8 (diff) | |
| download | zig-2ae2ac33d9ddd1fb181e08a811d97b1bf238bced.tar.gz zig-2ae2ac33d9ddd1fb181e08a811d97b1bf238bced.zip | |
wasm: Emit debug sections
This commit adds the ability to emit the following debug sections:
.debug_info
.debug_abbrev
.debug_line
.debug_str
Line information and files are now being loaded correctly by browser debuggers.
Diffstat (limited to 'src/link/Wasm/Atom.zig')
| -rw-r--r-- | src/link/Wasm/Atom.zig | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/link/Wasm/Atom.zig b/src/link/Wasm/Atom.zig index f56a0995bf..6f65b1b83a 100644 --- a/src/link/Wasm/Atom.zig +++ b/src/link/Wasm/Atom.zig @@ -90,15 +90,6 @@ pub fn getFirst(self: *Atom) *Atom { return tmp; } -/// Returns the atom for the given `symbol_index`. -/// This can be either the `Atom` itself, or one of its locals. -pub fn symbolAtom(self: *Atom, symbol_index: u32) *Atom { - if (self.sym_index == symbol_index) return self; - return for (self.locals.items) |*local_atom| { - if (local_atom.sym_index == symbol_index) break local_atom; - } else unreachable; // Used a symbol index not present in this atom or its children. -} - /// Returns the location of the symbol that represents this `Atom` pub fn symbolLoc(self: Atom) Wasm.SymbolLoc { return .{ .file = self.file, .index = self.sym_index }; |
