summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-19 09:17:21 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-19 09:17:21 +0000
commit59bdf7eac8dfaf740e2c87da93efdfc96b1c9469 (patch)
tree516f3fdd1627b5d77429102667c26a11882a9b83 /vm_dump.c
parentc4bbf190fdff49686fe67310728831e0777bc04b (diff)
* vm_core.h: add VM_FRAME_MAGIC_RESCUE to recognize normal block or
rescue clause. * vm.c (vm_exec): use VM_FRAME_MAGIC_RESCUE on at rescue/ensure. * test/ruby/test_settracefunc.rb: should not invoke b_return at rescue clause. [Bug #9957] * vm_dump.c (control_frame_dump): check VM_FRAME_MAGIC_RESCUE. * vm_dump.c (vm_stack_dump_each): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/vm_dump.c b/vm_dump.c
index c2cb0ce..2ed3f14 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -73,6 +73,9 @@ control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp)
case VM_FRAME_MAGIC_EVAL:
magic = "EVAL";
break;
+ case VM_FRAME_MAGIC_RESCUE:
+ magic = "RESCUE";
+ break;
case 0:
magic = "------";
break;
@@ -268,15 +271,17 @@ vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
/* stack trace header */
- if (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_METHOD ||
- VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_TOP ||
+ if (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_METHOD||
+ VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_TOP ||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_BLOCK ||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CLASS ||
- VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_PROC ||
- VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_LAMBDA ||
+ VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_PROC ||
+ VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_LAMBDA||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC ||
VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_IFUNC ||
- VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_EVAL) {
+ VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_EVAL ||
+ VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_RESCUE)
+ {
VALUE *ptr = ep - local_size;