summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-03 06:54:41 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-03 06:54:41 +0000
commit7446ae0380f58e026d7aa0108af91fd8c5712bbe (patch)
treec9fbab9c042a0361d5e78a65eee1132843133999 /libgo
parentba32660f7442301b9adfd81793b288a4c9d7c5a2 (diff)
downloadgcc-7446ae0380f58e026d7aa0108af91fd8c5712bbe.tar.gz
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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233098 138bc75d-0d04-0410-961f-82ee72b054a4
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 b5ab3be6473..0c1c6031456 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)