diff options
author | Koichi Sasada <[email protected]> | 2023-08-01 17:25:20 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2023-08-01 22:46:17 +0900 |
commit | d68c01fd314ebd6dc1d89c95a2734fad4f0953b0 (patch) | |
tree | b8d8794f59990f635eaf984119519f0a9cd51bd1 /iseq.c | |
parent | f11ac06337fc56104172c3241393fd95d3a6c60d (diff) |
support `rescue` event for TracePoint
fix [Feature #19572]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8150
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2219,7 +2219,7 @@ rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos, { rb_event_flag_t events = rb_iseq_event_flags(iseq, pos); if (events) { - str = rb_str_catf(str, "[%s%s%s%s%s%s%s%s%s%s%s]", + str = rb_str_catf(str, "[%s%s%s%s%s%s%s%s%s%s%s%s]", events & RUBY_EVENT_LINE ? "Li" : "", events & RUBY_EVENT_CLASS ? "Cl" : "", events & RUBY_EVENT_END ? "En" : "", @@ -2229,6 +2229,7 @@ rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos, events & RUBY_EVENT_C_RETURN ? "Cr" : "", events & RUBY_EVENT_B_CALL ? "Bc" : "", events & RUBY_EVENT_B_RETURN ? "Br" : "", + events & RUBY_EVENT_RESCUE ? "Rs" : "", events & RUBY_EVENT_COVERAGE_LINE ? "Cli" : "", events & RUBY_EVENT_COVERAGE_BRANCH ? "Cbr" : ""); } @@ -2573,6 +2574,7 @@ push_event_info(const rb_iseq_t *iseq, rb_event_flag_t events, int line, VALUE a C(RUBY_EVENT_END, "end", INT2FIX(line)); C(RUBY_EVENT_RETURN, "return", INT2FIX(line)); C(RUBY_EVENT_B_RETURN, "b_return", INT2FIX(line)); + C(RUBY_EVENT_RESCUE, "rescue", INT2FIX(line)); #undef C } @@ -3090,6 +3092,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq) CHECK_EVENT(RUBY_EVENT_RETURN); CHECK_EVENT(RUBY_EVENT_B_CALL); CHECK_EVENT(RUBY_EVENT_B_RETURN); + CHECK_EVENT(RUBY_EVENT_RESCUE); #undef CHECK_EVENT prev_insn_info = info; } |