]> Cypherpunks repositories - gostls13.git/commitdiff
debug/gosym: accept PC quantum of 2 (for s390x)
authorMichael Munday <munday@ca.ibm.com>
Mon, 21 Mar 2016 17:30:50 +0000 (13:30 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 12 Apr 2016 15:41:21 +0000 (15:41 +0000)
Needed for the header check to accept the header generated for
s390x as Go 1.2 style rather than Go 1.1 style.

Change-Id: I7b3713d4cc7514cfc58f947a45702348f6d7b824
Reviewed-on: https://go-review.googlesource.com/20966
Reviewed-by: Minux Ma <minux@golang.org>
src/debug/gosym/pclntab.go

index 01a9f11f0548390d307e8161d16f123797d2ee50..291f102262238351eefe8514be46ae3bf4c7f3da 100644 (file)
@@ -167,7 +167,7 @@ func (t *LineTable) go12Init() {
        // Check header: 4-byte magic, two zeros, pc quantum, pointer size.
        t.go12 = -1 // not Go 1.2 until proven otherwise
        if len(t.Data) < 16 || t.Data[4] != 0 || t.Data[5] != 0 ||
-               (t.Data[6] != 1 && t.Data[6] != 4) || // pc quantum
+               (t.Data[6] != 1 && t.Data[6] != 2 && t.Data[6] != 4) || // pc quantum
                (t.Data[7] != 4 && t.Data[7] != 8) { // pointer size
                return
        }