From a6c5431156d3fde6364724e7bd061b1ae79334db Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 21 Dec 2012 11:22:54 +0000 Subject: * vm_trace.c (tracepoint_new): add code to support specified thread. But not tested and this feature is not supported officially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_trace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vm_trace.c') 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); } -- cgit v1.2.3