]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: revert "more compact representation of DW_AT_high_pc"
authorHeschi Kreinick <heschi@google.com>
Thu, 7 Sep 2017 02:05:24 +0000 (22:05 -0400)
committerHeschi Kreinick <heschi@google.com>
Thu, 7 Sep 2017 02:30:39 +0000 (02:30 +0000)
This reverts commit 84188296e93dd4d26cb0a75a03a9096794e01e2f AKA CL 60530.

Fixes #21783

Change-Id: I68038a77de7446dea68419a40dd25982ea6d7df5
Reviewed-on: https://go-review.googlesource.com/62151
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/cmd/internal/dwarf/dwarf.go

index e963f99e51eaf66961ec1463e813d82304e1df25..cee1821617fc7e3438203d31c5a6d64db93c6e9b 100644 (file)
@@ -292,7 +292,7 @@ var abbrevs = [DW_NABRV]dwAbbrev{
                []dwAttrForm{
                        {DW_AT_name, DW_FORM_string},
                        {DW_AT_low_pc, DW_FORM_addr},
-                       {DW_AT_high_pc, DW_FORM_udata},
+                       {DW_AT_high_pc, DW_FORM_addr},
                        {DW_AT_frame_base, DW_FORM_block1},
                        {DW_AT_external, DW_FORM_flag},
                },
@@ -373,7 +373,7 @@ var abbrevs = [DW_NABRV]dwAbbrev{
                DW_CHILDREN_yes,
                []dwAttrForm{
                        {DW_AT_low_pc, DW_FORM_addr},
-                       {DW_AT_high_pc, DW_FORM_udata},
+                       {DW_AT_high_pc, DW_FORM_addr},
                },
        },
 
@@ -740,7 +740,7 @@ func PutFunc(ctxt Context, info, loc, ranges Sym, name string, external bool, st
        Uleb128put(ctxt, info, DW_ABRV_FUNCTION)
        putattr(ctxt, info, DW_ABRV_FUNCTION, DW_FORM_string, DW_CLS_STRING, int64(len(name)), name)
        putattr(ctxt, info, DW_ABRV_FUNCTION, DW_FORM_addr, DW_CLS_ADDRESS, 0, startPC)
-       putattr(ctxt, info, DW_ABRV_FUNCTION, DW_FORM_udata, DW_CLS_CONSTANT, size, nil)
+       putattr(ctxt, info, DW_ABRV_FUNCTION, DW_FORM_addr, DW_CLS_ADDRESS, size, startPC)
        putattr(ctxt, info, DW_ABRV_FUNCTION, DW_FORM_block1, DW_CLS_BLOCK, 1, []byte{DW_OP_call_frame_cfa})
        var ev int64
        if external {
@@ -772,7 +772,7 @@ func putscope(ctxt Context, info, loc, ranges, startPC Sym, curscope int32, scop
                if len(scope.Ranges) == 1 {
                        Uleb128put(ctxt, info, DW_ABRV_LEXICAL_BLOCK_SIMPLE)
                        putattr(ctxt, info, DW_ABRV_LEXICAL_BLOCK_SIMPLE, DW_FORM_addr, DW_CLS_ADDRESS, scope.Ranges[0].Start, startPC)
-                       putattr(ctxt, info, DW_ABRV_LEXICAL_BLOCK_SIMPLE, DW_FORM_udata, DW_CLS_CONSTANT, scope.Ranges[0].End-scope.Ranges[0].Start, nil)
+                       putattr(ctxt, info, DW_ABRV_LEXICAL_BLOCK_SIMPLE, DW_FORM_addr, DW_CLS_ADDRESS, scope.Ranges[0].End, startPC)
                } else {
                        Uleb128put(ctxt, info, DW_ABRV_LEXICAL_BLOCK_RANGES)
                        putattr(ctxt, info, DW_ABRV_LEXICAL_BLOCK_RANGES, DW_FORM_sec_offset, DW_CLS_PTR, ranges.Len(), ranges)