1
0
mirror of https://github.com/golang/go synced 2024-09-29 21:24:30 -06:00
The Go programming language
Go to file
Russ Cox a22c11b995 runtime: fix line number in first stack frame in printed stack trace
Originally traceback was only used for printing the stack
when an unexpected signal came in. In that case, the
initial PC is taken from the signal and should be used
unaltered. For the callers, the PC is the return address,
which might be on the line after the call; we subtract 1
to get to the CALL instruction.

Traceback is now used for a variety of things, and for
almost all of those the initial PC is a return address,
whether from getcallerpc, or gp->sched.pc, or gp->syscallpc.
In those cases, we need to subtract 1 from this initial PC,
but the traceback code had a hard rule "never subtract 1
from the initial PC", left over from the signal handling days.

Change gentraceback to take a flag that specifies whether
we are tracing a trap.

Change traceback to default to "starting with a return PC",
which is the overwhelmingly common case.

Add tracebacktrap, like traceback but starting with a trap PC.

Use tracebacktrap in signal handlers.

Fixes #7690.

LGTM=iant, r
R=r, iant
CC=golang-codereviews
https://golang.org/cl/167810044
2014-10-29 15:14:24 -04:00
api unicode: strconv: regexp: Upgrade to Unicode 7.0.0. 2014-08-18 20:26:10 +02:00
doc doc/go1.4.html: half of the small library changes 2014-10-29 08:15:58 -07:00
include liblink: require DATA lines to be ordered by offset, with no overlap 2014-10-14 23:25:12 -04:00
lib codereview: do not hit upload_complete on first patch 2014-08-06 16:12:24 -04:00
misc misc/makerelease/windows: fix 404 help URL in installer 2014-10-27 12:43:14 +11:00
src runtime: fix line number in first stack frame in printed stack trace 2014-10-29 15:14:24 -04:00
test runtime: fix line number in first stack frame in printed stack trace 2014-10-29 15:14:24 -04:00
.hgignore .hgignore: delete some dregs 2014-09-25 17:30:12 -07:00
.hgtags tag go1.3.3 2014-10-01 13:38:00 +10:00
AUTHORS A+C: Ron Hashimoto (individual CLA) 2014-10-08 07:10:04 -07:00
CONTRIBUTORS CONTRIBUTORS: add Austin Clements's google.com email (Google CLA) 2014-10-22 10:51:30 -04:00
favicon.ico
LICENSE
PATENTS
README README: Fix installation instructions 2013-11-20 13:47:37 -08:00
robots.txt

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install-source.html
in your web browser.

After installing Go, you can view a nicely formatted
doc/install-source.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install/source.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

--

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README).  You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:

    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin

See doc/install.html for more details.