summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_trace.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 60452a46a0..6a3001fae5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Dec 21 20:21:04 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c (tracepoint_new): add code to support specified thread.
+ But not tested and this feature is not supported officially.
+
Fri Dec 21 19:37:15 2012 Koichi Sasada <ko1@atdot.net>
* ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
diff --git a/vm_trace.c b/vm_trace.c
index 558d876145..743524b0b8 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1082,11 +1082,14 @@ tracepoint_new(VALUE klass, rb_thread_t *target_th, rb_event_flag_t events, void
}
VALUE
-rb_tracepoint_new(VALUE target_thread, rb_event_flag_t events, void (*func)(VALUE, void *), void *data)
+rb_tracepoint_new(VALUE target_thval, rb_event_flag_t events, void (*func)(VALUE, void *), void *data)
{
rb_thread_t *target_th = 0;
- if (RTEST(target_thread)) {
- /* TODO: now unsupported */
+ if (RTEST(target_thval)) {
+ GetThreadPtr(target_thval, target_th);
+ /* TODO: Test it!
+ * Warning: This function is not tested.
+ */
}
return tracepoint_new(rb_cTracePoint, target_th, events, func, data, Qundef);
}