debase 0.2.3.beta5 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/context.c +3 -0
- data/ext/debase_internals.c +13 -0
- data/ext/debase_internals.h +3 -0
- data/lib/debase/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 804974bdb7f42d640f15e77579d6bd3efccc8ebc
|
4
|
+
data.tar.gz: 7bf3e160c4c602873c271e791a279c2211e09b65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a70e957bfe8a777a8a3c62f25aca86012cd831589f0c265428c1d81122d811774b0dabc5748a6a7f812cbac0f9d0df863793e13de2c8b4977d3ab9f7dc1e840d
|
7
|
+
data.tar.gz: 0aaa866f084dd6634eee79ae37b7fdb556a636faf5ca0d39982e35e02e7c5eeb185c824d7f12c69a738da52f4b13229cde057957d275b9a800c170a70021d905
|
data/ext/context.c
CHANGED
@@ -147,6 +147,7 @@ context_create(VALUE thread, VALUE cDebugThread) {
|
|
147
147
|
context->stack_size = 0;
|
148
148
|
locations = rb_funcall(thread, rb_intern("backtrace_locations"), 1, INT2FIX(1));
|
149
149
|
context->calced_stack_size = locations != Qnil ? RARRAY_LENINT(locations) : 0;
|
150
|
+
context->init_stack_size = -1;
|
150
151
|
|
151
152
|
context->stack = NULL;
|
152
153
|
context->thnum = ++thnum_current;
|
@@ -154,6 +155,8 @@ context_create(VALUE thread, VALUE cDebugThread) {
|
|
154
155
|
context->flags = 0;
|
155
156
|
context->last_file = NULL;
|
156
157
|
context->last_line = -1;
|
158
|
+
context->hit_user_code = 0;
|
159
|
+
context->script_finished = 0;
|
157
160
|
context->stop_frame = -1;
|
158
161
|
context->thread_pause = 0;
|
159
162
|
context->stop_reason = CTX_STOP_NONE;
|
data/ext/debase_internals.c
CHANGED
@@ -303,6 +303,8 @@ remove_pause_flag(VALUE thread, VALUE context_object, VALUE ignored)
|
|
303
303
|
static void
|
304
304
|
call_at_line(debug_context_t *context, char *file, int line, VALUE context_object)
|
305
305
|
{
|
306
|
+
context->hit_user_code = 1;
|
307
|
+
|
306
308
|
rb_hash_foreach(contexts, remove_pause_flag, 0);
|
307
309
|
CTX_FL_UNSET(context, CTX_FL_STEPPED);
|
308
310
|
CTX_FL_UNSET(context, CTX_FL_FORCE_MOVE);
|
@@ -331,6 +333,13 @@ process_line_event(VALUE trace_point, void *data)
|
|
331
333
|
tp = TRACE_POINT;
|
332
334
|
path = rb_tracearg_path(tp);
|
333
335
|
|
336
|
+
if(context->stack_size <= context->init_stack_size && context->hit_user_code) {
|
337
|
+
context->script_finished = 1;
|
338
|
+
}
|
339
|
+
if(context->script_finished) {
|
340
|
+
return;
|
341
|
+
}
|
342
|
+
|
334
343
|
if (is_path_accepted(path)) {
|
335
344
|
|
336
345
|
lineno = rb_tracearg_lineno(tp);
|
@@ -340,6 +349,10 @@ process_line_event(VALUE trace_point, void *data)
|
|
340
349
|
update_stack_size(context);
|
341
350
|
print_event(tp, context);
|
342
351
|
|
352
|
+
if(context->init_stack_size == -1) {
|
353
|
+
context->init_stack_size = context->stack_size;
|
354
|
+
}
|
355
|
+
|
343
356
|
if (context->thread_pause) {
|
344
357
|
context->stop_next = 1;
|
345
358
|
context->dest_frame = -1;
|
data/ext/debase_internals.h
CHANGED
data/lib/debase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.3
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Ushakov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase-ruby_core_source
|
@@ -132,9 +132,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '2.0'
|
133
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- - "
|
135
|
+
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project: debase
|
140
140
|
rubygems_version: 2.6.10
|