Refactor: Remove addrrange type

This commit is contained in:
Derek Parker
2014-10-11 01:05:27 -05:00
parent 09e352bdf7
commit c60f3aafde
4 changed files with 24 additions and 21 deletions

View File

@ -50,15 +50,15 @@ func parseLength(ctx *parseContext) parsefunc {
return parseCIE
}
ctx.Frame = &FrameDescriptionEntry{Length: ctx.Length, CIE: ctx.Common, AddressRange: new(addrange)}
ctx.Frame = &FrameDescriptionEntry{Length: ctx.Length, CIE: ctx.Common}
return parseFDE
}
func parseFDE(ctx *parseContext) parsefunc {
r := ctx.Buf.Next(int(ctx.Length))
ctx.Frame.AddressRange.begin = binary.LittleEndian.Uint64(r[:8])
ctx.Frame.AddressRange.end = binary.LittleEndian.Uint64(r[8:16])
ctx.Frame.begin = binary.LittleEndian.Uint64(r[:8])
ctx.Frame.end = binary.LittleEndian.Uint64(r[8:16])
// Insert into the tree after setting address range begin
// otherwise compares won't work.