зеркало из https://github.com/github/ruby.git
* vm_dump.c (bugreport_backtrace): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
584829aa81
Коммит
7475244ec4
|
@ -1,4 +1,4 @@
|
|||
Thu Apr 15 14:38:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Apr 15 14:50:19 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm.c (vm_backtrace_each): get rid of use of malloc from signal
|
||||
handler by using ruby_engine_name. [ruby-core:29497]
|
||||
|
@ -6,6 +6,8 @@ Thu Apr 15 14:38:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* vm_eval.c (print_backtrace): file may be nil when segfaulted in
|
||||
very early stage.
|
||||
|
||||
* vm_dump.c (bugreport_backtrace): ditto.
|
||||
|
||||
Thu Apr 15 11:51:49 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* common.mk (help): small fix.
|
||||
|
|
|
@ -570,12 +570,18 @@ rb_vmdebug_thread_dump_state(VALUE self)
|
|||
static int
|
||||
bugreport_backtrace(void *arg, VALUE file, int line, VALUE method)
|
||||
{
|
||||
const char *filename = NIL_P(file) ? "ruby" : RSTRING_PTR(file);
|
||||
if (!*(int *)arg) {
|
||||
fprintf(stderr, "-- Ruby level backtrace information "
|
||||
"----------------------------------------\n");
|
||||
*(int *)arg = 1;
|
||||
}
|
||||
fprintf(stderr, "%s:%d:in `%s'\n", RSTRING_PTR(file), line, RSTRING_PTR(method));
|
||||
if (NIL_P(method)) {
|
||||
fprintf(stderr, "%s:%d:in unknown method\n", filename, line);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "%s:%d:in `%s'\n", filename, line, RSTRING_PTR(method));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче