wazevo: adds support for DWARF based stack trace (#1734)

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
Takeshi Yoneda
2023-09-25 10:54:19 +09:00
committed by GitHub
parent 3b8b3fba65
commit 09da2e94b2
16 changed files with 340 additions and 167 deletions

View File

@@ -126,6 +126,11 @@ func (m *machine) LowerConditionalBranch(b *ssa.Instruction) {
// LowerInstr implements backend.Machine.
func (m *machine) LowerInstr(instr *ssa.Instruction) {
if l := instr.SourceOffset(); l.Valid() {
info := m.allocateInstr().asEmitSourceOffsetInfo(l)
m.insert(info)
}
switch op := instr.Opcode(); op {
case ssa.OpcodeBrz, ssa.OpcodeBrnz, ssa.OpcodeJump, ssa.OpcodeBrTable:
panic("BUG: branching instructions are handled by LowerBranches")