aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug
AgeCommit message (Collapse)Author
2013-11-01[release-branch.go1.2] debug/dwarf: add DWARF 4 form constantsAndrew Gerrand
««« CL 18460043 / 08e6655618f5 debug/dwarf: add DWARF 4 form constants Some versions of clang generate DWARF 4-format attributes even when using -gdwarf-2. We don't care much about the values, but we do need to be able to parse past them. This fixes a bug in Go 1.2 rc2 reported via private mail using a near-tip version of clang. R=golang-dev, iant, dvyukov CC=golang-dev https://golang.org/cl/18460043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/20470045
2013-10-14debug/dwarf: report the value of an unrecognized attribute formatIan Lance Taylor
R=golang-dev, r, minux.ma CC=golang-dev https://golang.org/cl/14669045
2013-10-09debug/dwarf: handle surprising clang encodingRuss Cox
Fixes a bug in cgo on OS X using clang. See golang.org/issue/6472 for details. Fixes #6472. R=golang-dev, iant CC=golang-dev https://golang.org/cl/14575043
2013-08-07runtime: convert .s textflags from numbers to symbolic constants.Keith Randall
Remove NOPROF/DUPOK from everything. Edits done with a script, except pclinetest.asm which depended on the DUPOK flag on main(). R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12613044
2013-08-05undo CL 12486043 / ab644299d124Brad Fitzpatrick
Uglier. ««« original CL description all: use strings.IndexByte instead of Index where possible R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/12485044
2013-08-05all: use strings.IndexByte instead of Index where possibleBrad Fitzpatrick
R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043
2013-07-23all: be more idiomatic when documenting boolean return values.Rob Pike
Phrases like "returns whether or not the image is opaque" could be describing what the function does (it always returns, regardless of the opacity) or what it returns (a boolean indicating the opacity). Even when the "or not" is missing, the phrasing is bizarre. Go with "reports whether", which is still clunky but at least makes it clear we're talking about the return value. These were edited by hand. A few were cleaned up in other ways. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/11699043
2013-07-19cmd/ld, runtime: remove unused fields from FuncRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/11604043
2013-07-19debug/gosym: put pclinetest file in temporary directoryKeith Randall
where it belongs. R=rsc CC=golang-dev https://golang.org/cl/11596043
2013-07-18debug/gosym: avoid test failure on WindowsRuss Cox
Would fix build if build hadn't already been broken with something else. TBR=golang-dev CC=golang-dev https://golang.org/cl/11525043
2013-07-18debug/gosym: update for Go 1.2 pcln tableRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/11495043
2013-06-21all: avoid leaking fds during testsDave Cheney
trivial: it is not a serious problem to leak a fd in a short lived process, but it was obscuring my investigation of issue 5593. R=golang-dev, iant, bradfitz CC=golang-dev https://golang.org/cl/10391043
2013-03-22debug/elf: repair GNU version symbols.Rémy Oudompheng
After the revert of revision 9ea9e7e6e0c8 the related revision 76ff7da868c6 must be reverted too. Fixes #5102. R=golang-dev, r CC=golang-dev https://golang.org/cl/7961044
2013-03-21debug/elf: restore Go 1.0 semantics for (*File).SymbolsRuss Cox
Also adjust the implementation of applyRelocationsAMD64 so that the test added in CL 6848044 still passes. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7686049
2013-03-19debug/dwarf: support for DWARF 3Ian Lance Taylor
R=rsc CC=golang-dev https://golang.org/cl/7662045
2013-03-11debug/macho: add doc comment for FormatErrorRob Pike
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7624044
2013-02-26cmd/ld, runtime: adjust symbol table representationRuss Cox
This CL changes the encoding used for the Go symbol table, stored in the binary and used at run time. It does not change any of the semantics or structure: the bits are just packed a little differently. The comment at the top of runtime/symtab.c describes the new format. Compared to the Go 1.0 format, the main changes are: * Store symbol addresses as full-pointer-sized host-endian values. (For 6g, this means addresses are 64-bit little-endian.) * Store other values (frame sizes and so on) varint-encoded. The second change more than compensates for the first: for the godoc binary on OS X/amd64, the new symbol table is 8% smaller than the old symbol table (1,425,668 down from 1,546,276). This is a required step for allowing the host linker (gcc) to write the final Go binary, since it will have to fill in the symbol address slots (so the slots must be host-endian) and on 64-bit systems it may choose addresses above 4 GB. R=golang-dev, iant CC=golang-dev https://golang.org/cl/7403054
2013-02-20debug/dwarf: add flag_present attribute encoding.Robin Eklind
ref: http://www.dwarfstd.org/doc/DWARF4.pdf Update #4829 R=minux.ma, iant CC=dave, golang-dev https://golang.org/cl/7354043
2013-01-27all: make tests able to run multiple times.Rémy Oudompheng
It is now possible to run "go test -cpu=1,2,4 std" successfully. Fixes #3185. R=golang-dev, dave, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/7196052
2013-01-04cmd/ld: use native-endian symbol values in symbol tableRuss Cox
The Plan 9 symbol table format defines big-endian symbol values for portability, but we want to be able to generate an ELF object file and let the host linker link it, as part of the solution to issue 4069. The symbol table itself, since it is loaded into memory at run time, must be filled in by the final host linker, using relocation directives to set the symbol values. On a little-endian machine, the linker will only fill in little-endian values during relocation, so we are forced to use little-endian symbol values. To preserve most of the original portability of the symbol table format, we make the table itself say whether it uses big- or little-endian values. If the table begins with the magic sequence fe ff ff ff 00 00 then the actual table begins after those six bytes and contains little-endian symbol values. Otherwise, the table is in the original format and contains big-endian symbol values. The magic sequence looks like an "end of table" entry (the fifth byte is zero), so legacy readers will see a little-endian table as an empty table. All the gc architectures are little-endian today, so the practical effect of this CL is to make all the generated tables little-endian, but if a big-endian system comes along, ld will not generate the magic sequence, and the various readers will fall back to the original big-endian interpretation. R=ken2 CC=golang-dev https://golang.org/cl/7066043
2012-12-18debug/elf: handle missing shstrndx in core filesDave Cheney
Fixes #4481. hello-world-core.gz was generated with a simple hello world c program and core dumped as suggested in the issue. Also: add support for gz compressed test fixtures. R=minux.ma, rsc, iant CC=golang-dev https://golang.org/cl/6936058
2012-11-15debug/elf: fix offset for GNU version symbolsJoel Sing
Since we no longer skip the first entry when reading a symbol table, we no longer need to allow for the offset difference when processing the GNU version symbols. Unbreaks builds on Linux. R=golang-dev, agl, iant CC=golang-dev https://golang.org/cl/6843057
2012-11-15debug/elf: do not skip first symbol in the symbol tableJoel Sing
Do not skip the first symbol in the symbol table. Any other indexes into the symbol table (for example, indexes in relocation entries) will now refer to the symbol following the one that was intended. Add an object that contains debug relocations, which debug/dwarf failed to decode correctly. Extend the relocation tests to cover this case. Note that the existing tests passed since the symbol following the symbol that required relocation is also of type STT_SECTION. Fixes #4107. R=golang-dev, mikioh.mikioh, iant, iant CC=golang-dev https://golang.org/cl/6848044
2012-10-09debug/pe: support PE files which contain no symbol table (if NumberOfSymbols ↵Robin Eklind
is equal to 0 in the IMAGE_FILE_HEADER structure). No longer assume that e_lfanew (in the IMAGE_DOS_HEADER strcuture) is always one byte. It is now regarded as a 4 byte uint32. Fixes #4177. R=golang-dev, alex.brainman, dave, minux.ma CC=golang-dev https://golang.org/cl/6587048
2012-09-22debug/pe: add symbol supportJoel Sing
Add support for processing the COFF symbol table. R=alex.brainman CC=golang-dev https://golang.org/cl/6551045
2012-08-03debug/elf: Add support for getting DynTag string table values.Mike Rosset
R=rsc CC=golang-dev https://golang.org/cl/6430064
2012-05-21debug/elf: Expose entry point from Header in File struct.Matthew Horsnell
Fixes #3470. R=rsc, golang-dev CC=golang-dev https://golang.org/cl/6195074
2012-04-09debug/gosym: in test, use temp binary name in /tmp, and clean up.Brad Fitzpatrick
This fixes all.bash on shared machines. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5992078
2012-02-19cmd/cgo: bug fixesRuss Cox
* disallow embedding of C type (Fixes issue 2552) * detect 0-length array (Fixes issue 2806) * use typedefs when possible, to avoid attribute((unavailable)) (Fixes issue 2888) * print Go types constructed from C types using original C types (Fixes issue 2612) This fix changes _cgo_export.h to repeat the preamble from import "C". Otherwise the fix to issue 2612 is impossible, since it cannot refer to types that have not been defined. If people are using //export and putting non-header information in the preamble, they will need to refactor their code. R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5672080
2012-02-17debug/dwarf: address TODO in doc comment for NewRob Pike
Fixes #2844. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5675072
2012-02-16debug/gosym: more carefully build the test binary.David Symonds
TBR=r CC=golang-dev https://golang.org/cl/5676062
2012-02-16debug/gosym: dump 6a/6l output to process stdout/stderr so we can see failures.David Symonds
TBR=r CC=golang-dev https://golang.org/cl/5671060
2012-02-16debug/gosym: Remove Makefile, rewrite test using go tool.David Symonds
Update #2573. R=r CC=golang-dev https://golang.org/cl/5656071
2012-02-10debug/macho: dropped monstrous URL from package commentAndrew Gerrand
Relax. It's still in macho.go. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5653054
2012-01-30build: remove Make.pkg, Make.toolRuss Cox
Consequently, remove many package Makefiles, and shorten the few that remain. gomake becomes 'go tool make'. Turn off test phases of run.bash that do not work, flagged with $BROKEN. Future CLs will restore these, but this seemed like a big enough CL already. R=golang-dev, r CC=golang-dev https://golang.org/cl/5601057
2012-01-14src: make use of runtime.GOOS, GOARCH instead of syscall.OS, ARCHMikio Hara
R=rsc, r CC=golang-dev https://golang.org/cl/5545048
2011-12-21go/build: add new +build tags 'cgo' and 'nocgo'Russ Cox
This lets us mark net's cgo_stub.go as only to be built when cgo is disabled. R=golang-dev, ality, mikioh.mikioh CC=golang-dev https://golang.org/cl/5489100
2011-12-20build: a round of fixesRuss Cox
TBR=r CC=golang-dev https://golang.org/cl/5503052
2011-12-05use new strconv APIRuss Cox
All but 3 cases (in gcimporter.go and hixie.go) are automatic conversions using gofix. No attempt is made to use the new Append functions even though there are definitely opportunities. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5447069
2011-12-02gofmt -s misc srcRuss Cox
R=golang-dev, bradfitz, gri CC=golang-dev https://golang.org/cl/5451079
2011-11-02all: sort importsRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/5319072
2011-11-01src/pkg/[a-m]*: gofix -r error -force=errorRuss Cox
R=golang-dev, iant CC=golang-dev https://golang.org/cl/5322051
2011-10-18gofix -r mapdeleteRuss Cox
R=golang-dev, r, adg, r, cw CC=golang-dev https://golang.org/cl/5266045
2011-09-14debug/elf: permit another case of SHT_NOBITS section overlap in testIan Lance Taylor
Lets test pass when using gccgo. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5018046
2011-07-20ld: remove overlap of ELF sections on dynamic binariesGustavo Niemeyer
The dynamic ELF sections were pointing to the proper data, but that data was already owned by the rodata and text sections. Some ELF references explicitly prohibit multiple sections from owning the same data, and strip behaves accordingly. The data for these sections was moved out and their ranges are now owned by their respective sections. This change makes strip happy both with and without -s being provided at link time. A test was added in debug/elf to ensure there are no regressions on this area in the future. Fixes #1242. Fixes #2022. NOTE: Tested on Linux amd64/386/arm only. R=rsc CC=golang-dev https://golang.org/cl/4808043
2011-07-18debug/proc: Remove.Ian Lance Taylor
The package was always GNU/Linux specific, and is no longer used by anything now that exp/ogle has been removed. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4757049
2011-07-14go/printer: changed max. number of newlines from 3 to 2Robert Griesemer
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go (cd src/cmd/gofix/testdata; gofmt -w *.in *.out) (cd src/pkg/go/printer; gotest -update) gofmt -w misc src runs all tests R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4715041
2011-07-13debug/elf: Read ELF Program headers.Matthew Horsnell
NewFile has been fixed to read ELF Program headers into the structs. Added test coverage. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4628062
2011-07-12debug/pe: fixes ImportedSymbols for Win64.Wei Guangjing
R=golang-dev, alex.brainman CC=golang-dev https://golang.org/cl/4639086
2011-06-28strings.Split: make the default to split all.Rob Pike
Change the signature of Split to have no count, assuming a full split, and rename the existing Split with a count to SplitN. Do the same to package bytes. Add a gofix module. R=adg, dsymonds, alex.brainman, rsc CC=golang-dev https://golang.org/cl/4661051