summaryrefslogtreecommitdiff
path: root/vm_dump.c
AgeCommit message (Collapse)Author
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-12-12show self on control frame dump.Koichi Sasada
control frame detailed info on RUBY_DEBUG=ci should also show self information.
2019-12-05add additional CF info for CI envKoichi Sasada
Introduce new RUBY_DEBUG option 'ci' to inform Ruby interpreter that an interpreter is running on CI environment. With this option, `rb_bug()` shows more information includes method entry information, local variables information for each control frame.
2019-09-27Adjusted spaces [ci skip]Nobuyoshi Nakada
2019-08-19crash report on mac little updateDavid CARLIER
displaying vm info as Linux and FreeBSD. checking libproc as it is present only from 10.5 version. https://github.com/ruby/ruby/pull/2384
2019-08-09#include <> for system headersNobuyoshi Nakada
2019-06-19Remove IA64 support.Samuel Williams
2019-02-07Split procstat_vm.cnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07* expand tabs. [ci skip]svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07Add cast to suppress warnings on Solaris [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Support Mach-O on backtrace with DWARFnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-22Fix for old names of mcontext registersnobu
c.f. https://github.com/mistydemeo/tigerbrew/issues/473 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15vm_core.h, vm_dump.c: fix castktsj
Revert r63968 and cast at caller side to prevent unintentional casting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15vm_dump.c: fix warning about constnessktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-03delete extra #undef [ci skip]shyouhei
Sorry, this was a garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-02"%z" printf format specifier is a C99ismshyouhei
PRIxSIZE is also. But shimmed in ruby.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-02explicit cast to void* required for %pshyouhei
These functions take variadic arguments so no automatic type promotion is expected. You have to do it by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07vm_dump.c: [DOC] fix grammarstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29* vm_dump.c (vm_stack_dump_each): accepts `ec`.ko1
* vm_dump.c (vm_base_ptr): constify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29use `GET_VM()` directly.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29`th` -> `ec` for VM dump related functions.ko1
* vm_dump.c: `th` -> `ec` (and constify) for: * control_frame_dump * rb_vmdebug_stack_dump_raw * rb_vmdebug_debug_print_register * rb_vmdebug_debug_print_pre * rb_vmdebug_debug_print_post git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-26Use rb_execution_context_t instead of rb_thread_tko1
to represent execution context [Feature #14038] * vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer. There are many code using `th` to represent execution context (such as cfp, VM stack and so on). To access `ec`, they need to use `th->ec->...` (adding one indirection) so that we need to replace them by passing `ec` instead of `th`. * vm_core.h (GET_EC()): introduced to access current ec. Also remove `ruby_current_thread` global variable. * cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of rb_context_t::thread_value. * cont.c (ec_set_vm_stack): added to update vm_stack explicitly. * cont.c (ec_switch): added to switch ec explicitly. * cont.c (rb_fiber_close): added to terminate fibers explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-15Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14fix the case High Sierra's mincore(2) may return -128 [Bug #13895]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-06Fixed compilationn error with VMDEBUG=3.hsbt
[fix GH-1690] Patch from @musaprg(Kotaro Inoue) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-01Fix C level backtrace on Darwinnaruse
SEGV caused by invalid instruction call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-10rename rb_execution_context_t::stack(_size) to vm_stack(_size).ko1
* vm_core.h: Ruby processes run with two stacks, a machine stack and a VM stack. To make it clear, this fix renames rb_execution_context_t::stack(_size) to vm_stack(_size). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28introduce rb_thread_ptr() to replace GetThreadPtr().ko1
* vm_core.h (rb_thread_ptr): added to replace GetThreadPtr() macro. * thread.c (in some functions: use "target_th" instead of "th" to make clear that it is not a current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03* vm_core.h: remove VM_FRAME_MAGIC_LAMBDA and introduceko1
VM_FRAME_FLAG_LAMBDA. So that lambda block frame is VM_FRAME_MAGIC_BLOCK | VM_FRAME_FLAG_LAMBDA. * vm_core.h: remvoe VM_FRAME_MAGIC_PROC because nobody uses it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-01rename absolute_path to realpath internally and introduce pathobj.ko1
* vm_core.h: rename absolute_path to realpath because it is expected name. external APIs (#absolute_path methods) are remained. * vm_core.h: remove rb_iseq_location_struct::path and rb_iseq_location_struct::absolute_path and introduce pathobj. if given path equals to given absolute_path (and most of case it is true), pathobj is simply given path String. If it is not same, pathobj is Array and pathobj[0] is path and pathobj[1] is realpath. This size optimization reduce 8 bytes and sizeof(struct rb_iseq_constant_body) is 200 bytes -> 192 bytes on 64bit CPU. To support this change, the following functions are introduced: * pathobj_path() (defined in vm_core.h) * pathobj_realpath() (ditto) * rb_iseq_path() (decl. in vm_core.h) * rb_iseq_realpath() (ditto) * rb_iseq_pathobj_new() (ditto) * rb_iseq_pathobj_set() (ditto) * vm_core.h (rb_binding_t): use pathobj instead of path. If binding is given at eval methods, realpath (absolute_path) was caller's realpath. However, they should use binding's realpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17Treat NULL reference case [Bug #13566]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09rb_execution_context_t: move stack, stack_size and cfp from rb_thread_tnormal
The goal is to reduce rb_context_t and rb_fiber_t size by removing the need to store the entire rb_thread_t in there. [ruby-core:81045] Work-in-progress: soon, we will move more fields here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21vm_dump.c: non-scalar thread_idnobu
* vm_dump.c (rb_vmdebug_stack_dump_all_threads): fix for non-scalar thread_id platforms. c.f. [Bug #9884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20* vm_dump.c (rb_vmdebug_stack_dump_all_threads): cast to `void*`.ko1
Pointed out at <https://github.com/ruby/ruby/commit/fbc1deca89595e60af21e58b7e164f376e4bd2fc#commitcomment-21839826> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20add a debug function.ko1
* vm_dump.c (rb_vmdebug_stack_dump_all_threads): dump stack dump for all living threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-07introduce imemo_type_p(v, imemo_type)ko1
* internal.h: introduce imemo_type_p() which checks the given value is T_IMEMO and imemo_type() == given imemo_type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-26skip T_IMEMO for VMDEBUGko1
* vm_dump.c (vm_stack_dump_each): skip T_IMEMO object to display for VMDEBUG=3. [Bug #13030] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-26* vm_dump.c: enable to compile with VMDEBUG == 3.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13error.c: movednobu
* error.c (preface_dump, postscript_dump): moved from rb_vm_bugreport to place the last important message at the very last after [NOTE]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13vm_dump.c: postscript_dumpnobu
* vm_dump.c (postscript_dump): mention crash report log twice because important. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14constifynobu
* vm_dump.c (rb_vmdebug_debug_print_pre): constify pc argument for VMDEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30fix r56030 [Bug #12711]naruse
check whether it was syscall or not by getting previous instruction. syscall instruction is 0x0f 0x05. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29* vm_dump.c (backtrace): use rip in the saved context for the casenaruse
the SIGSEGV is received when the process is in userland. Note that ip in the stack should be used if the signal is received when it is in kernel (when it is calling syscall) [Bug #12711] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-03* vm_core.h: introduce VM_FRAME_RUBYFRAME_P()ko1
and VM_FRAME_CFRAME_P(). Most of case, RUBY_VM_NORMAL_ISEQ_P() is no longer needed. * vm_core.h: introduce rb_obj_is_iseq(). * cont.c, vm.c: VM_FRAME_MAGIC_DUMMY with VM_FRAME_FLAG_CFRAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-03* vm_core.h: rename macros and make them inline functions.ko1
* rename VM_FRAME_TYPE_FINISH_P() to VM_FRAME_FINISHED_P(). * rename VM_FRAME_TYPE_BMETHOD_P() to VM_FRAME_BMETHOD_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-28* vm.c, internal.h: remove RubyVM::Env class and all of env objectsko1
are imemo objects (imemo_env). * NEWS: describe this change. I believe nobody touch these objects because there are no method defined. * vm_core.h: remove the following definitions. * rb_cEnv decl. * GetEnvPtr() because Env is no longer T_DATA object. * vm_core.h (rb_env_t): fix layout for imemo values. * vm_core.h (vm_assert_env): added. * vm_core.h (vm_env_new): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-28* vm_core.h: revisit the structure of frame, block and env.ko1
[Bug #12628] This patch introduce many changes. * Introduce concept of "Block Handler (BH)" to represent passed blocks. * move rb_control_frame_t::flag to ep[0] (as a special local variable). This flags represents not only frame type, but also env flags such as escaped. * rename `rb_block_t` to `struct rb_block`. * Make Proc, Binding and RubyVM::Env objects wb-protected. Check [Bug #12628] for more details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27* vm_dump.c (rb_print_backtrace): our addr2line doesn't work on sparc.naruse
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20151027T043311Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-16vm_args.c: symbol procnobu
* vm_args.c (vm_caller_setup_arg_block): store symbols instead of ifuncs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15vm_dump.c: unused variablenobu
* vm_dump.c (vm_stack_dump_each): remove never-used variable and dead code for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e