1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:21:23 -06:00
Commit Graph

129 Commits

Author SHA1 Message Date
Russ Cox
69c4e9380b use append
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/2743042
2010-10-27 19:47:23 -07:00
Russ Cox
d86ab015f7 use copy
R=gri
CC=golang-dev
https://golang.org/cl/2763041
2010-10-26 21:52:54 -07:00
Russ Cox
da26e27c05 debug/gosym: do not run when cross-compiling
R=r
CC=golang-dev
https://golang.org/cl/2737041
2010-10-25 18:00:42 -07:00
Robert Griesemer
3478891d12 gofmt -s -w src misc
R=r, rsc
CC=golang-dev
https://golang.org/cl/2662041
2010-10-22 10:06:33 -07:00
Russ Cox
833c06581a fix build
R=ken2
CC=golang-dev
https://golang.org/cl/2621042
2010-10-21 12:50:23 -04:00
Russ Cox
085be1740a 5l, 6l, 8l: first pass cleanup
* Maintain Sym* list for text with individual
  prog lists instead of using one huge list and
  overloading p->pcond.
* Comment what each file is for.
* Move some output code from span.c to asm.c.
* Move profiling into prof.c, symbol table into symtab.c.
* Move mkfwd to ld/lib.c.
* Throw away dhog dynamic loading code.
* Throw away Alef become.
* Fix printing of WORD instructions in 5l -a.

Goal here is to be able to handle each piece of text or data
as a separate piece, both to make it easier to load the
occasional .o file and also to make it possible to split the
work across multiple threads.

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/2335043
2010-10-13 15:51:21 -04:00
Russ Cox
fb7e175d1f debug/proc: ... changes (fix build)
TBR=gri
CC=golang-dev
https://golang.org/cl/2229047
2010-09-24 13:12:50 -04:00
Ian Lance Taylor
7a2daa7d3a proc, eval: Don't assign address of an array to a slice.
R=rsc
CC=golang-dev
https://golang.org/cl/2084041
2010-08-30 13:47:40 -07:00
Ivan Krasin
5a0274399a syscall: regenerate syscall/z* files for linux/386, linux/amd64
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

Use <sys/user.h> instead of <linux/user.h>
See http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00834.html for more details.

R=imkrasin, rsc
CC=golang-dev
https://golang.org/cl/1957041
2010-08-20 09:12:21 -04:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Russ Cox
11f9c03986 fix build
R=gri
CC=golang-dev
https://golang.org/cl/1813042
2010-07-12 17:46:03 -07:00
Rob Pike
537e5f4b7e debug/dwarf: update PDF link.
Fixes #881.

R=iant
CC=golang-dev
https://golang.org/cl/1696044
2010-06-22 14:56:16 -07:00
Russ Cox
6aaef04469 misc cleanup: gofmt + &x -> x[0:] conversion
R=gri
CC=golang-dev
https://golang.org/cl/1620042
2010-06-08 17:51:57 -07:00
Russ Cox
bb84f4b5d2 changes &x -> x[0:] for array to slice conversion
R=gri
CC=golang-dev
https://golang.org/cl/1326042
2010-05-27 14:51:47 -07:00
Alex Brainman
f81d471940 rename GOOS=mingw to GOOS=windows
R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1015043
2010-04-29 23:45:14 -07:00
Evan Shaw
d77010547d debug/elf: Fix doc comments
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/849049
2010-04-11 14:49:44 -07:00
Robert Griesemer
f08ce18980 debug/proc: fix typo in package documentation
R=rsc
CC=golang-dev
https://golang.org/cl/829044
2010-04-02 16:20:47 -07:00
Robert Griesemer
d6589377c6 debug/macho: fix error message format
R=rsc
CC=golang-dev
https://golang.org/cl/836046
2010-04-01 15:58:10 -07:00
Robert Griesemer
4a6dfda4cc debug/macho: don't crash when reading non-Mach-O files
R=rsc
CC=golang-dev
https://golang.org/cl/838046
2010-04-01 15:36:44 -07:00
Russ Cox
1231382b9e single argument panic on non-darwin and in comments
R=r
CC=golang-dev
https://golang.org/cl/800042
2010-03-30 13:15:16 -07:00
Russ Cox
c7122a3c58 simplify various code using new map index rule
R=r
CC=golang-dev
https://golang.org/cl/833044
2010-03-30 10:51:11 -07:00
Robert Griesemer
e8a049b440 gofmt: modified algorithm for alignment of multi-line composite/list entries
- only manual changes are in src/pkg/go/printer/nodes.go
- use a heuristic to determine "outliers" such that not entire composites are
  forced to align with them
- improves several places that were not unligned before due too simple heuristic
- unalignes some cases that contain "outliers"
- gofmt -w src misc

Fixes #644.

R=rsc, r
CC=golang-dev
https://golang.org/cl/241041
2010-03-04 17:37:15 -08:00
Robert Griesemer
f44fa9b4c7 gofmt: experiment: align values in map composites where possible
- gofmt -w src misc
- looking for feedback

R=rsc, r
CC=golang-dev
https://golang.org/cl/223076
2010-03-02 13:46:51 -08:00
Joe Poirier
987e1198db Added mingw specific build stubs.
R=rsc
CC=golang-dev
https://golang.org/cl/198071
2010-02-04 13:09:09 -08:00
Russ Cox
3a295ab704 debug/gosym: fix test for new 6l
TBR=r
CC=golang-dev
https://golang.org/cl/199091
2010-02-03 16:53:19 -08:00
Rob Pike
d2fc5d68da Change type of Printf's args to ... interface{}
R=rsc
CC=golang-dev
https://golang.org/cl/197043
2010-02-02 10:53:37 +11:00
Russ Cox
758f2bc556 eliminate the package global name space assumption in object files
5g/6g/8g: add import statements to export metadata, mapping package path to package name.
	recognize "" as the path of the package in export metadata.
	use "" as the path of the package in object symbol names.

5c/6c/8c, 5a/6a/8a: rewrite leading . to "". so that ·Sin means Sin in this package.

5l/6l/8l: rewrite "" in symbol names as object files are read.

gotest: handle new symbol names.

gopack: handle new import lines in export metadata.

Collectively, these changes eliminate the assumption of a global
name space in the object file formats.  Higher level pieces such as
reflect and the computation of type hashes still depend on the
assumption; we're not done yet.

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/186263
2010-01-22 17:06:20 -08:00
Robert Griesemer
1c72959999 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
https://golang.org/cl/179067
2009-12-15 15:27:16 -08:00
Rob Pike
b0683bd77a move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
this breaks the dependency of package io on package bytes.

R=rsc
CC=golang-dev
https://golang.org/cl/163085
2009-12-02 22:02:14 -08:00
Robert Griesemer
c6f8df0827 fix for broken build (built-in new was invisible due to a parameter called 'new')
R=iant
https://golang.org/cl/160057
2009-11-24 14:11:53 -08:00
Robert Griesemer
001a8b11ff Change to container/vector interface:
- removed New(len int) in favor of new(Vector).Resize(len, cap)
- removed Init(len int) in favor of Resize(len, cap)
- runs all.bash

Fixes #294.

R=rsc, r, r1
https://golang.org/cl/157143
2009-11-24 13:43:18 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Russ Cox
9ac4449cb2 gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
2009-11-20 11:45:05 -08:00
Devon H. O'Dell
b3f538a4fd FreeBSD/i386 work
This patchset gets Go to pretty much the same state that
FreeBSD/amd64 is in.

R=rsc
https://golang.org/cl/157055
2009-11-17 23:58:51 -08:00
Devon H. O'Dell
0489a260da FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)

R=rsc, VenkateshSrinivas
https://golang.org/cl/152142
2009-11-17 08:20:58 -08:00
Robert Griesemer
baba292998 - replaced gofmt expression formatting algorithm with
rsc's algorithm
	- applied gofmt -w misc src
	- partial CL (remaining files in other CLs)

R=rsc, r
http://go/go-review/1026036
2009-11-09 21:13:17 -08:00
Robert Griesemer
40621d5c0d remove semis after statements in one-statement statement lists
R=rsc, r
http://go/go-review/1025029
2009-11-09 12:07:39 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Robert Griesemer
368f8cbc75 - fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)

R=r, rsc
CC=go-dev
http://go/go-review/1026006
2009-11-06 14:24:38 -08:00
Robert Griesemer
07b6becc88 - fix elf.go manually so it is idempotent for gofmt
- with this change, `gofmt -l src/pkg | wc` is 0

R=rsc
http://go/go-review/1025002
2009-11-05 22:05:43 -08:00
Robert Griesemer
0ea9dd815a gofmt the last outstanding files in src/pkg
- added a list of issues to printer/nodes.go

R=rsc
http://go/go-review/1024002
2009-11-05 18:14:47 -08:00
Robert Griesemer
8cd2e76404 - gofmt'ing of some stragglers, now with correct comment indentation
in special cases
- re-gofmt'ing of some files that are now improved

R=r, rsc
http://go/go-review/1023003
2009-11-05 17:02:55 -08:00
Robert Griesemer
6a4940ee23 gofmt'ed debug
(excluding debug/gosym/symtab.go which has a small issue)

R=rsc
http://go/go-review/1019001
2009-11-05 15:35:02 -08:00
Ian Lance Taylor
f32cde88b6 Define constants for sizes of Sym structures.
R=rsc, agl
http://go/go-review/1016028
2009-11-02 12:53:06 -08:00
Adam Langley
72ec930fa7 Fix cgo for GCC 4.4
Firstly, with -Werror, GCC switched to printing warnings starting
with "error:". Widening the string matches solves this as the messages
are otherwise unchanged.

Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all
the offsets and requires the relocation section for .debug_info to be
processed in order to result in valid DWARF data. Thus we add minimal
handling for relocation sections, which is sufficient for our needs.

BUG=1
Fixes #1.

R=rsc, iant
CC=go-dev
http://go/go-review/1017003
2009-11-02 12:02:16 -08:00
Russ Cox
d2829faa7c files that are okay from the last gofmt round
R=gri
http://go/go-review/1015011
2009-10-27 22:47:54 -07:00
Kai Backman
dec1ec34bf all of pkg now compiles, fixes a few more tests
go/test: passes 90% (313/345)

R=rsc
APPROVED=rsc
DELTA=90  (83 added, 3 deleted, 4 changed)
OCL=36011
CL=36023
2009-10-23 11:00:59 -07:00
Russ Cox
357b770def base64 -> encoding/base64
base85 -> encoding/ascii85, encoding/git85
debug/binary -> encoding/binary

R=r
DELTA=3190  (1884 added, 1297 deleted, 9 changed)
OCL=35923
CL=35929
2009-10-20 13:00:16 -07:00
Russ Cox
d5337e9829 fix linux build:
i renamed sys to runtime but didn't remember this file.
(and the darwin build doesn't use it.)

TBR=r
OCL=35826
CL=35826
2009-10-15 23:57:04 -07:00
Austin Clements
049501ce4c Implement error handling on process monitor exit. Now, before
sending any message to the monitor, the sender must check a
"ready" channel.  Before exiting, the monitor records its exit
error and closes this channel, ensuring that all later reads
from the ready channel will immediately return false.

Inspired by
http://chplib.wordpress.com/2009/09/30/poison-concurrent-termination/

R=rsc
APPROVED=rsc
DELTA=47  (27 added, 11 deleted, 9 changed)
OCL=35782
CL=35784
2009-10-15 12:59:59 -07:00
Russ Cox
094f1d5990 more lgtm files from gofmt
R=gri
OCL=35485
CL=35488
2009-10-08 15:14:54 -07:00
Russ Cox
22c98a3314 gofmt on crypto, debug
R=gri
DELTA=2560  (127 added, 177 deleted, 2256 changed)
OCL=35388
CL=35395
2009-10-06 14:55:06 -07:00
Austin Clements
4211384976 Switch ogle to in-tree gosym package. Delete my private sym
package.  If a Sym is a function symbol, include a reference
to the Func so it's easily accessible when you're traversing
the list of all symbols.  This diff is more interesting than
the proc switch because the gosym interface differs from the
old sym interface.

R=rsc
APPROVED=rsc
DELTA=1957  (34 added, 1868 deleted, 55 changed)
OCL=34969
CL=35008
2009-09-25 09:39:08 -07:00
Russ Cox
a4d09c2aa3 add Size method to dwarf.Type
R=r
DELTA=30  (24 added, 3 deleted, 3 changed)
OCL=34950
CL=34974
2009-09-24 11:43:38 -07:00
Austin Clements
ffe83e582e Switch ogle over to the in-tree debug/proc package. Fix
debug/proc to install to the right place.  Delete the old
ptrace package.  The diff looks huge, but it's mostly
s/ptrace/proc/.

R=rsc
APPROVED=rsc
DELTA=1940  (10 added, 1835 deleted, 95 changed)
OCL=34966
CL=34968
2009-09-24 09:07:47 -07:00
Russ Cox
b428456df6 nacl syscall package.
similar tweaks to make debug/proc, net, os build.

R=r
DELTA=861  (855 added, 4 deleted, 2 changed)
OCL=34877
CL=34890
2009-09-22 07:49:31 -07:00
Russ Cox
2e5a588718 fix build again; this time for sure. sigh
TBR=r
OCL=34803
CL=34803
2009-09-18 12:56:18 -07:00
Russ Cox
99f54911cd fix build - missing file
TBR=r
OCL=34800
CL=34800
2009-09-18 12:45:34 -07:00
Russ Cox
92f773dc77 add DWARF method to elf.File.
test both ELF and Mach-O in dwarf package.

R=r
DELTA=83  (44 added, 10 deleted, 29 changed)
OCL=34717
CL=34790
2009-09-18 11:50:24 -07:00
Russ Cox
bf69025825 Mach-O file reading
R=r
DELTA=784  (784 added, 0 deleted, 0 changed)
OCL=34715
CL=34788
2009-09-18 11:49:22 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Russ Cox
1bbc044df9 parse and present DWARF type information
R=r
DELTA=940  (929 added, 1 deleted, 10 changed)
OCL=34679
CL=34686
2009-09-16 10:43:27 -07:00
Russ Cox
f249c4114c basic DWARF reading.
R=r
DELTA=949  (949 added, 0 deleted, 0 changed)
OCL=34676
CL=34678
2009-09-15 21:58:45 -07:00
Russ Cox
98c98192ec final batch for "declared and not used"
* update mksyscall.sh and rebuild syscall/z*.go
 * fix a few linux-only files

R=r
DELTA=455  (12 added, 1 deleted, 442 changed)
OCL=34637
CL=34655
2009-09-15 13:51:33 -07:00
Russ Cox
ca6a0fee1b more "declared and not used".
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=

R=r
OCL=34624
CL=34638
2009-09-15 09:41:59 -07:00
Austin Clements
eabcb10a32 Don't crash in Sym.ReceiverName for symbols like "x.x"
R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=34404
CL=34406
2009-09-04 16:12:50 -07:00
Russ Cox
74bb34c107 fix linux 386 build
R=austin
DELTA=140  (128 added, 0 deleted, 12 changed)
OCL=34344
CL=34347
2009-09-03 16:17:21 -07:00
Austin Clements
37aa6c9962 Fix uninstalling of breakpoints when a process exits. Process
exit is still handled poorly.

R=rsc
APPROVED=rsc
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=34288
CL=34315
2009-09-03 10:55:20 -07:00
Russ Cox
a03764aa50 fix build
TBR=gri
OCL=34264
CL=34264
2009-09-02 13:13:40 -07:00
Russ Cox
f56e6fd786 make debug/proc "build" on more architectures
R=austin
DELTA=17  (0 added, 16 deleted, 1 changed)
OCL=34213
CL=34218
2009-09-01 16:19:14 -07:00
Russ Cox
f277ebfc76 import debug/gosym from usr/austin/sym
R=austin
DELTA=958  (956 added, 0 deleted, 2 changed)
OCL=34180
CL=34212
2009-09-01 16:11:17 -07:00
Russ Cox
dd87082ab8 import debug/proc from usr/austin/ptrace
R=austin
DELTA=1892  (1892 added, 0 deleted, 0 changed)
OCL=34183
CL=34197
2009-09-01 11:51:05 -07:00
Russ Cox
f0492f4e27 elf file parser
R=austin
DELTA=448  (447 added, 0 deleted, 1 changed)
OCL=34139
CL=34150
2009-08-31 16:48:44 -07:00
Russ Cox
60222bf538 package debug/binary
R=austin
DELTA=320  (320 added, 0 deleted, 0 changed)
OCL=33983
CL=34143
2009-08-31 16:10:16 -07:00
Russ Cox
819543986d translate C ld/elf.h into Go
R=austin
DELTA=1630  (1630 added, 0 deleted, 0 changed)
OCL=34001
CL=34142
2009-08-31 16:08:12 -07:00
Brian Kernighan
d82b11e4a4 last-minute fix: convert to ANSI C
R=dmr
DELTA=3  (2 added, 0 deleted, 1 changed)
1988-04-01 02:03:04 -05:00
Brian Kernighan
0744ac9691 convert to Draft-Proposed ANSI C
R=dmr
DELTA=5  (2 added, 0 deleted, 3 changed)
1988-04-01 02:02:04 -05:00
Brian Kernighan
0bb0b61d6a convert to C
R=dmr
DELTA=6  (0 added, 3 deleted, 3 changed)
1974-01-20 01:02:03 -04:00
Brian Kernighan
7d7c6a97f8 hello, world
R=ken
DELTA=7  (7 added, 0 deleted, 0 changed)
1972-07-18 19:05:45 -05:00