From 05b6118139d880a5bced23da9d07bdb0db8e7084 Mon Sep 17 00:00:00 2001 From: Alessandro Arzilli Date: Thu, 4 Jun 2020 16:59:06 +0200 Subject: debug/dwarf: add support for DWARFv5 to (*Data).Ranges Updates the (*Data).Ranges method to work with DWARFv5 which uses the new debug_rnglists section instead of debug_ranges. This does not include supporting DW_FORM_rnglistx. General support for DWARFv5 was added by CL 175138. Change-Id: I01f919a865616a3ff12f5bf649c2c9abf89fcf52 Reviewed-on: https://go-review.googlesource.com/c/go/+/236657 Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Trust: Emmanuel Odeke --- src/debug/dwarf/const.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/debug/dwarf/const.go') diff --git a/src/debug/dwarf/const.go b/src/debug/dwarf/const.go index b11bf90c37..c60709199b 100644 --- a/src/debug/dwarf/const.go +++ b/src/debug/dwarf/const.go @@ -461,3 +461,15 @@ const ( utSplitCompile = 0x05 utSplitType = 0x06 ) + +// Opcodes for DWARFv5 debug_rnglists section. +const ( + rleEndOfList = 0x0 + rleBaseAddressx = 0x1 + rleStartxEndx = 0x2 + rleStartxLength = 0x3 + rleOffsetPair = 0x4 + rleBaseAddress = 0x5 + rleStartEnd = 0x6 + rleStartLength = 0x7 +) -- cgit v1.2.1