Skip to content

Commit

Permalink
debug/dwarf, debug/elf: support DWARF 5
Browse files Browse the repository at this point in the history
Change-Id: I6e9d47865c198299d497911c58235cd40f775e34
Reviewed-on: https://go-review.googlesource.com/c/go/+/175138
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
  • Loading branch information
ianlancetaylor committed Sep 3, 2019
1 parent 663680b commit adf20ee
Show file tree
Hide file tree
Showing 7 changed files with 470 additions and 51 deletions.
12 changes: 12 additions & 0 deletions src/debug/dwarf/buf.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ func (b *buf) uint16() uint16 {
return b.order.Uint16(a)
}

func (b *buf) uint24() uint32 {
a := b.bytes(3)
if a == nil {
return 0
}
if b.dwarf.bigEndian {
return uint32(a[2]) | uint32(a[1])<<8 | uint32(a[0])<<16
} else {
return uint32(a[0]) | uint32(a[1])<<8 | uint32(a[2])<<16
}
}

func (b *buf) uint32() uint32 {
a := b.bytes(4)
if a == nil {
Expand Down
Loading

0 comments on commit adf20ee

Please sign in to comment.