aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-traceback.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-01-30 22:24:40 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-01-30 22:24:40 +0000
commit27741f93ef6db21d70fd0a0fe33a68a82b4e79fd (patch)
tree1764d8d318ba67622aefbf3e311749a6744bfa02 /libgo/runtime/go-traceback.c
parente60e09a0e0e8c1b17fc35cf25b739666a96010b9 (diff)
downloadgcc-27741f93ef6db21d70fd0a0fe33a68a82b4e79fd.zip
gcc-27741f93ef6db21d70fd0a0fe33a68a82b4e79fd.tar.gz
gcc-27741f93ef6db21d70fd0a0fe33a68a82b4e79fd.tar.bz2
runtime: In backtraces, get inline functions, skip split-stack fns.
From-SVN: r195591
Diffstat (limited to 'libgo/runtime/go-traceback.c')
-rw-r--r--libgo/runtime/go-traceback.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/libgo/runtime/go-traceback.c b/libgo/runtime/go-traceback.c
index 30a5ed9..f397f07 100644
--- a/libgo/runtime/go-traceback.c
+++ b/libgo/runtime/go-traceback.c
@@ -13,29 +13,25 @@
void
runtime_traceback ()
{
- uintptr pcbuf[100];
+ Location locbuf[100];
int32 c;
- c = runtime_callers (1, pcbuf, sizeof pcbuf / sizeof pcbuf[0]);
- runtime_printtrace (pcbuf, c, true);
+ c = runtime_callers (1, locbuf, nelem (locbuf));
+ runtime_printtrace (locbuf, c, true);
}
void
-runtime_printtrace (uintptr *pcbuf, int32 c, bool current)
+runtime_printtrace (Location *locbuf, int32 c, bool current)
{
int32 i;
for (i = 0; i < c; ++i)
{
- String fn;
- String file;
- intgo line;
-
- if (__go_file_line (pcbuf[i], &fn, &file, &line)
- && runtime_showframe (fn, current))
+ if (runtime_showframe (locbuf[i].function, current))
{
- runtime_printf ("%S\n", fn);
- runtime_printf ("\t%S:%D\n", file, (int64) line);
+ runtime_printf ("%S\n", locbuf[i].function);
+ runtime_printf ("\t%S:%D\n", locbuf[i].filename,
+ (int64) locbuf[i].lineno);
}
}
}