* include/ruby/debug.h: define rb_trace_arg_t.

* vm_core.h: catch up above changes.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2012-12-21 09:48:15 +00:00
Родитель 979479270c
Коммит 8578cc337b
3 изменённых файлов: 21 добавлений и 15 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Fri Dec 21 18:46:50 2012 Koichi Sasada <ko1@atdot.net>
* include/ruby/debug.h: define rb_trace_arg_t.
* vm_core.h: catch up above changes.
Fri Dec 21 17:48:15 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h, vm_trace.c: fix multi-threading bug for tracing.

Просмотреть файл

@ -54,18 +54,18 @@ VALUE rb_tracepoint_enable(VALUE tpval);
VALUE rb_tracepoint_disable(VALUE tpval);
VALUE rb_tracepoint_enabled_p(VALUE tpval);
struct rb_trace_arg_struct;
struct rb_trace_arg_struct *rb_tracearg_from_tracepoint(VALUE tpval);
typedef struct rb_trace_arg_struct rb_trace_arg_t;
rb_trace_arg_t *rb_tracearg_from_tracepoint(VALUE tpval);
VALUE rb_tracearg_event(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_lineno(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_path(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_method_id(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_defined_class(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_binding(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_self(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_return_value(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_raised_exception(struct rb_trace_arg_struct *trace_arg);
VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_method_id(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_defined_class(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg);
/* undocumented advanced tracing APIs */

Просмотреть файл

@ -939,7 +939,7 @@ void rb_thread_lock_destroy(rb_thread_lock_t *);
} while (0)
/* tracer */
typedef struct rb_trace_arg_struct {
struct rb_trace_arg_struct {
rb_event_flag_t event;
rb_thread_t *th;
rb_control_frame_t *cfp;
@ -953,14 +953,14 @@ typedef struct rb_trace_arg_struct {
/* calc from cfp */
int lineno;
VALUE path;
} rb_trace_arg_t;
};
void rb_threadptr_exec_event_hooks(rb_trace_arg_t *trace_arg);
void rb_threadptr_exec_event_hooks(struct rb_trace_arg_struct *trace_arg);
#define EXEC_EVENT_HOOK(th_, flag_, self_, id_, klass_, data_) do { \
if (UNLIKELY(ruby_vm_event_flags & (flag_))) { \
if (((th)->event_hooks.events | (th)->vm->event_hooks.events) & (flag_)) { \
rb_trace_arg_t trace_arg; \
struct rb_trace_arg_struct trace_arg; \
trace_arg.event = (flag_); \
trace_arg.th = (th_); \
trace_arg.cfp = (trace_arg.th)->cfp; \