summaryrefslogtreecommitdiff
path: root/src/pkg/debug/dwarf/open.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-12-15 15:27:16 -0800
committerRobert Griesemer <gri@golang.org>2009-12-15 15:27:16 -0800
commit881d6064d23d9da5c7ff368bc7d41d271290deff (patch)
tree44d5d948e3f27cc7eff15ec8cd7ee5165d9a7e90 /src/pkg/debug/dwarf/open.go
parentd9dfea3ebd51cea89fef8afc6b2377c2958b24f1 (diff)
downloadgolang-881d6064d23d9da5c7ff368bc7d41d271290deff.tar.gz
1) Change default gofmt default settings for
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 2nd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/179067
Diffstat (limited to 'src/pkg/debug/dwarf/open.go')
-rw-r--r--src/pkg/debug/dwarf/open.go40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/pkg/debug/dwarf/open.go b/src/pkg/debug/dwarf/open.go
index a5cb1a103..3a1b00311 100644
--- a/src/pkg/debug/dwarf/open.go
+++ b/src/pkg/debug/dwarf/open.go
@@ -8,29 +8,29 @@
package dwarf
import (
- "encoding/binary";
- "os";
+ "encoding/binary"
+ "os"
)
// Data represents the DWARF debugging information
// loaded from an executable file (for example, an ELF or Mach-O executable).
type Data struct {
// raw data
- abbrev []byte;
- aranges []byte;
- frame []byte;
- info []byte;
- line []byte;
- pubnames []byte;
- ranges []byte;
- str []byte;
+ abbrev []byte
+ aranges []byte
+ frame []byte
+ info []byte
+ line []byte
+ pubnames []byte
+ ranges []byte
+ str []byte
// parsed data
- abbrevCache map[uint32]abbrevTable;
- addrsize int;
- order binary.ByteOrder;
- typeCache map[Offset]Type;
- unit []unit;
+ abbrevCache map[uint32]abbrevTable
+ addrsize int
+ order binary.ByteOrder
+ typeCache map[Offset]Type
+ unit []unit
}
// New returns a new Data object initialized from the given parameters.
@@ -52,14 +52,14 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat
str: str,
abbrevCache: make(map[uint32]abbrevTable),
typeCache: make(map[Offset]Type),
- };
+ }
// Sniff .debug_info to figure out byte order.
// bytes 4:6 are the version, a tiny 16-bit number (1, 2, 3).
if len(d.info) < 6 {
return nil, DecodeError{"info", Offset(len(d.info)), "too short"}
}
- x, y := d.info[4], d.info[5];
+ x, y := d.info[4], d.info[5]
switch {
case x == 0 && y == 0:
return nil, DecodeError{"info", 4, "unsupported version 0"}
@@ -71,10 +71,10 @@ func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Dat
return nil, DecodeError{"info", 4, "cannot determine byte order"}
}
- u, err := d.parseUnits();
+ u, err := d.parseUnits()
if err != nil {
return nil, err
}
- d.unit = u;
- return d, nil;
+ d.unit = u
+ return d, nil
}