]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/dwarf: add DW_LNCT and DW_UT constant definitions
authorThan McIntosh <thanm@golang.org>
Mon, 18 Nov 2024 16:23:39 +0000 (11:23 -0500)
committerThan McIntosh <thanm@golang.org>
Sat, 22 Feb 2025 21:26:58 +0000 (13:26 -0800)
Add a set of constants for the DWARF version 5 line table content
description values found in the V5 line table prolog, and for the
new DWARF unit type encodings.

Updates #26379.

Change-Id: I8f4989ea6b6cbb303deda1a6a20ad243d73b46b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/633878
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/dwarf/dwarf_defs.go

index e2716e50629ed13126a636f374eaffb165fbf4a0..d2e4a69615367f3f872790cf6ad7607896fc061a 100644 (file)
@@ -446,6 +446,30 @@ const (
        DW_LNE_hi_user      = 0xff
 )
 
+// Table 7.27 (DWARF version 5), containing the encodings for the
+// line number header entry formats.
+const (
+       DW_LNCT_path            = 0x01
+       DW_LNCT_directory_index = 0x02
+       DW_LNCT_timestamp       = 0x03
+       DW_LNCT_size            = 0x04
+       DW_LNCT_md5             = 0x05
+       DW_LNCT_lo_user         = 0x2000
+       DW_LNCT_hi_user         = 0x3fff
+)
+
+// Table 7.2 (DWARF version 5), dwarf unit type encodings.
+const (
+       DW_UT_compile       = 0x01
+       DW_UT_type          = 0x02
+       DW_UT_partial       = 0x03
+       DW_UT_skeleton      = 0x04
+       DW_UT_split_compile = 0x05
+       DW_UT_split_type    = 0x06
+       DW_UT_lo_user       = 0x80
+       DW_UT_hi_user       = 0xff
+)
+
 // Table 39
 const (
        DW_MACINFO_define     = 0x01