Message ID | mcr61ruipj0.fsf@iant-glaptop.roam.corp.google.com |
---|---|
State | New |
Headers | show |
diff -r 87729ea100b9 libgo/runtime/go-caller.c --- a/libgo/runtime/go-caller.c Thu Nov 14 14:12:12 2013 -0800 +++ b/libgo/runtime/go-caller.c Thu Nov 14 14:28:40 2013 -0800 @@ -101,6 +101,13 @@ const char *filename; filename = (const char *) runtime_progname (); + + /* If there is no '/' in FILENAME, it was found on PATH, and + might not be the same as the file with the same name in the + current directory. */ + if (__builtin_strchr (filename, '/') == NULL) + filename = NULL; + back_state = backtrace_create_state (filename, 1, error_callback, NULL); } runtime_unlock (&back_state_lock);