aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-02-03 06:54:41 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-02-03 06:54:41 +0000
commit06caa02ccf41c3d32fb9e4cb91ebbd2daeda40ce (patch)
treec9fbab9c042a0361d5e78a65eee1132843133999 /libgo
parente2bd26b72289a01eed0248a80abb5fb3687497d4 (diff)
downloadgcc-06caa02ccf41c3d32fb9e4cb91ebbd2daeda40ce.zip
gcc-06caa02ccf41c3d32fb9e4cb91ebbd2daeda40ce.tar.gz
gcc-06caa02ccf41c3d32fb9e4cb91ebbd2daeda40ce.tar.bz2
compiler, runtime: mark stub methods, ignore them in runtime.Caller.
This fixes the long-standing bug in which the testing package misreports the file/line of an error. Reviewed-on: https://go-review.googlesource.com/19179 From-SVN: r233098
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/go-callers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c
index b5ab3be..0c1c603 100644
--- a/libgo/runtime/go-callers.c
+++ b/libgo/runtime/go-callers.c
@@ -74,6 +74,8 @@ callback (void *data, uintptr_t pc, const char *filename, int lineno,
p = __builtin_strrchr (function, '$');
if (p != NULL && __builtin_strcmp(p, "$recover") == 0)
return 0;
+ if (p != NULL && __builtin_strncmp(p, "$stub", 5) == 0)
+ return 0;
}
if (arg->skip > 0)