Skip to content

Conversation

@viuginick1
Copy link
Contributor

@viuginick1 viuginick1 commented Jun 5, 2019

We don't want to suspend in debugger source code! The most optimal solution is to record a number of service(~debugger) frames and don't handle suspensions in them. After suspension in debugger source code(which was ignored by us) we assume, that for current thread script is over, and we don't need to suspend in it anymore. But we can't disable the whole tracing, because some threads can be active

It should fix ruby-debug-ide tests

tp = TRACE_POINT;
path = rb_tracearg_path(tp);

if(context->stack_size == context->init_stack_size && context->hit_user_code) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because we might accidentally miss that stackframe (e.g. if an exception occurred)

static void
call_at_line(debug_context_t *context, char *file, int line, VALUE context_object)
{
context->hit_user_code = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you use this variable? you only write to it, it seems

@valich valich merged commit ae8371b into ruby-debug:master Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants