aboutsummaryrefslogtreecommitdiff
path: root/src/debug/dwarf
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-03-01 23:21:55 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-03-02 00:13:47 +0000
commit5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch)
tree00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/debug/dwarf
parent8b4deb448e587802f67930b765c9598fc8cd36e5 (diff)
downloadgo-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.xz
all: single space after period.
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/debug/dwarf')
-rw-r--r--src/debug/dwarf/buf.go6
-rw-r--r--src/debug/dwarf/entry.go8
-rw-r--r--src/debug/dwarf/open.go4
-rw-r--r--src/debug/dwarf/type.go6
-rw-r--r--src/debug/dwarf/type_test.go2
-rw-r--r--src/debug/dwarf/typeunit.go4
6 files changed, 15 insertions, 15 deletions
diff --git a/src/debug/dwarf/buf.go b/src/debug/dwarf/buf.go
index 98fe7a6ec6..7443043c11 100644
--- a/src/debug/dwarf/buf.go
+++ b/src/debug/dwarf/buf.go
@@ -22,16 +22,16 @@ type buf struct {
err error
}
-// Data format, other than byte order. This affects the handling of
+// Data format, other than byte order. This affects the handling of
// certain field formats.
type dataFormat interface {
- // DWARF version number. Zero means unknown.
+ // DWARF version number. Zero means unknown.
version() int
// 64-bit DWARF format?
dwarf64() (dwarf64 bool, isKnown bool)
- // Size of an address, in bytes. Zero means unknown.
+ // Size of an address, in bytes. Zero means unknown.
addrsize() int
}
diff --git a/src/debug/dwarf/entry.go b/src/debug/dwarf/entry.go
index 5001bf85a2..6f72005e72 100644
--- a/src/debug/dwarf/entry.go
+++ b/src/debug/dwarf/entry.go
@@ -506,7 +506,7 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
}
// A Reader allows reading Entry structures from a DWARF ``info'' section.
-// The Entry structures are arranged in a tree. The Reader's Next function
+// The Entry structures are arranged in a tree. The Reader's Next function
// return successive entries from a pre-order traversal of the tree.
// If an entry has children, its Children field will be true, and the children
// follow, terminated by an Entry with Tag 0.
@@ -598,7 +598,7 @@ func (r *Reader) Next() (*Entry, error) {
}
// SkipChildren skips over the child entries associated with
-// the last Entry returned by Next. If that Entry did not have
+// the last Entry returned by Next. If that Entry did not have
// children or Next has not been called, SkipChildren is a no-op.
func (r *Reader) SkipChildren() {
if r.err != nil || !r.lastChildren {
@@ -625,13 +625,13 @@ func (r *Reader) SkipChildren() {
}
}
-// clone returns a copy of the reader. This is used by the typeReader
+// clone returns a copy of the reader. This is used by the typeReader
// interface.
func (r *Reader) clone() typeReader {
return r.d.Reader()
}
-// offset returns the current buffer offset. This is used by the
+// offset returns the current buffer offset. This is used by the
// typeReader interface.
func (r *Reader) offset() Offset {
return r.b.off
diff --git a/src/debug/dwarf/open.go b/src/debug/dwarf/open.go
index 7255195031..0e9c01c2e9 100644
--- a/src/debug/dwarf/open.go
+++ b/src/debug/dwarf/open.go
@@ -78,9 +78,9 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat
return d, nil
}
-// AddTypes will add one .debug_types section to the DWARF data. A
+// AddTypes will add one .debug_types section to the DWARF data. A
// typical object with DWARF version 4 debug info will have multiple
-// .debug_types sections. The name is used for error reporting only,
+// .debug_types sections. The name is used for error reporting only,
// and serves to distinguish one .debug_types section from another.
func (d *Data) AddTypes(name string, types []byte) error {
return d.parseTypes(name, types)
diff --git a/src/debug/dwarf/type.go b/src/debug/dwarf/type.go
index e4dc6480d8..9b39078a6f 100644
--- a/src/debug/dwarf/type.go
+++ b/src/debug/dwarf/type.go
@@ -356,7 +356,7 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
}
// Get Type referred to by Entry's AttrType field.
- // Set err if error happens. Not having a type is an error.
+ // Set err if error happens. Not having a type is an error.
typeOf := func(e *Entry) Type {
tval := e.Val(AttrType)
var t Type
@@ -549,7 +549,7 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
bito = f.ByteOffset * 8
}
if bito == lastFieldBitOffset && t.Kind != "union" {
- // Last field was zero width. Fix array length.
+ // Last field was zero width. Fix array length.
// (DWARF writes out 0-length arrays as if they were 1-length arrays.)
zeroArray(lastFieldType)
}
@@ -560,7 +560,7 @@ func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Off
if t.Kind != "union" {
b, ok := e.Val(AttrByteSize).(int64)
if ok && b*8 == lastFieldBitOffset {
- // Final field must be zero width. Fix array length.
+ // Final field must be zero width. Fix array length.
zeroArray(lastFieldType)
}
}
diff --git a/src/debug/dwarf/type_test.go b/src/debug/dwarf/type_test.go
index 2bd7a48961..0283466f08 100644
--- a/src/debug/dwarf/type_test.go
+++ b/src/debug/dwarf/type_test.go
@@ -34,7 +34,7 @@ var typedefTests = map[string]string{
}
// As Apple converts gcc to a clang-based front end
-// they keep breaking the DWARF output. This map lists the
+// they keep breaking the DWARF output. This map lists the
// conversion from real answer to Apple answer.
var machoBug = map[string]string{
"func(*char, ...) void": "func(*char) void",
diff --git a/src/debug/dwarf/typeunit.go b/src/debug/dwarf/typeunit.go
index 4032cd4745..ed42547386 100644
--- a/src/debug/dwarf/typeunit.go
+++ b/src/debug/dwarf/typeunit.go
@@ -9,11 +9,11 @@ import (
"strconv"
)
-// Parse the type units stored in a DWARF4 .debug_types section. Each
+// Parse the type units stored in a DWARF4 .debug_types section. Each
// type unit defines a single primary type and an 8-byte signature.
// Other sections may then use formRefSig8 to refer to the type.
-// The typeUnit format is a single type with a signature. It holds
+// The typeUnit format is a single type with a signature. It holds
// the same data as a compilation unit.
type typeUnit struct {
unit