Project

General

Profile

« Previous | Next » 

Revision caa6ba1a

Added by mame (Yusuke Endoh) 5 days ago

Make rb_debug_inspector_backtrace_locations return a raw backtrace

Previously, a user of the debug inspector API was supposed to use
rb_debug_inspector_backtrace_locations to get an array of
Thread::Backtrace::Location, and then used its index to get more
information from rb_debug_inspector _frame_binding_get(index), etc.

However, rb_debug_inspector_backtrace_locations returned an array of
backtraces excluding rescue/ensure frames. On the other hand,
rb_debug_inspector_frame_binding_get(index) interprets index with
rescue/ensure frames. This led to inconsistency of the index, and it was
very difficult to correctly use the debug inspector API.

This is a minimal fix for the issue by making
rb_debug_inspector_backtrace_locations return a raw backtrace
including rescue/ensure frames.