Skip to content

Commit

Permalink
* vm_trace.c (tracepoint_new): add code to support specified thread.
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
ko1 committed Dec 21, 2012
1 parent 1ed4ed4 commit a6c5431
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Fri Dec 21 20:21:04 2012 Koichi Sasada <[email protected]>

* 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 <[email protected]>

* ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
Expand Down
9 changes: 6 additions & 3 deletions vm_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a6c5431

Please sign in to comment.