From a2550b4809706313481be722aee9cabad2d32300 Mon Sep 17 00:00:00 2001 From: Alessandro Arzilli Date: Tue, 13 Oct 2020 00:05:28 +0200 Subject: [PATCH] proc: Remove (*Arch).Prologues method (#2192) It returns an unexported type and is only used in a single place. --- pkg/proc/arch.go | 6 ------ pkg/proc/disasm.go | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/proc/arch.go b/pkg/proc/arch.go index 17e726a7..a02a0cf1 100644 --- a/pkg/proc/arch.go +++ b/pkg/proc/arch.go @@ -59,12 +59,6 @@ func (a *Arch) MaxInstructionLength() int { return a.maxInstructionLength } -// Prologues returns a list of stack split prologues -// that are inserted at function entry. -func (a *Arch) Prologues() []opcodeSeq { - return a.prologues -} - // BreakpointInstruction is the instruction that will trigger a breakpoint trap for // the given architecture. func (a *Arch) BreakpointInstruction() []byte { diff --git a/pkg/proc/disasm.go b/pkg/proc/disasm.go index 94477990..808a11e9 100644 --- a/pkg/proc/disasm.go +++ b/pkg/proc/disasm.go @@ -83,7 +83,7 @@ func firstPCAfterPrologueDisassembly(p Process, fn *Function, sameline bool) (ui return fn.Entry, nil } - for _, prologue := range p.BinInfo().Arch.Prologues() { + for _, prologue := range p.BinInfo().Arch.prologues { if len(prologue) >= len(text) { continue }