diff --git a/_fixtures/testnextprog b/_fixtures/testnextprog index 70ada160..dd1b72cc 100755 Binary files a/_fixtures/testnextprog and b/_fixtures/testnextprog differ diff --git a/dwarf/frame/frame_table.go b/dwarf/frame/frame_table.go index 33929c2f..daa1e313 100644 --- a/dwarf/frame/frame_table.go +++ b/dwarf/frame/frame_table.go @@ -156,9 +156,6 @@ func (frame *FrameContext) ExecuteUntilPC(instructions []byte) { for frame.loc <= frame.address && frame.buf.Len() > 0 { executeDwarfInstruction(frame) } - // TODO: Why is this necessary? - executeDwarfInstruction(frame) - executeDwarfInstruction(frame) } func executeDwarfInstruction(frame *FrameContext) { diff --git a/dwarf/frame/frame_table_test.go b/dwarf/frame/frame_table_test.go index 60267f41..eba7f8bc 100644 --- a/dwarf/frame/frame_table_test.go +++ b/dwarf/frame/frame_table_test.go @@ -84,7 +84,7 @@ func TestFindReturnAddress(t *testing.T) { syscall.PtracePeekText(p.Pid, uintptr(addr), data) addr = binary.LittleEndian.Uint64(data) - end := uint64(0x400dff) + end := uint64(0x400d9f) if addr != end { t.Fatalf("return address not found correctly, expected %#v got %#v", end, addr) } diff --git a/dwarf/line/line_parser_test.go b/dwarf/line/line_parser_test.go index a8917499..c78b247c 100644 --- a/dwarf/line/line_parser_test.go +++ b/dwarf/line/line_parser_test.go @@ -42,7 +42,7 @@ func TestDebugLinePrologueParser(t *testing.T) { prologue = dbl.Prologue ) - if prologue.Length != uint32(59807) { + if prologue.Length != uint32(60685) { t.Fatal("Length was not parsed correctly", prologue.Length) } @@ -50,7 +50,7 @@ func TestDebugLinePrologueParser(t *testing.T) { t.Fatal("Version not parsed correctly", prologue.Version) } - if prologue.PrologueLength != uint32(5224) { + if prologue.PrologueLength != uint32(5363) { t.Fatal("Prologue Length not parsed correctly", prologue.PrologueLength) } @@ -85,7 +85,7 @@ func TestDebugLinePrologueParser(t *testing.T) { t.Fatal("Include dirs not parsed correctly") } - if len(dbl.FileNames) != 123 { + if len(dbl.FileNames) != 126 { t.Fatal("Filenames not parsed correctly", len(dbl.FileNames)) }