mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_trace.c: prohibit to specify normal events and internal events
simultaneously. I will introduce special care for internal events later. * ext/-test-/tracepoint/tracepoint.c: test this behavior. * test/-ext-/tracepoint/test_tracepoint.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
079009fb93
commit
5b40cb6a2c
5 changed files with 32 additions and 1 deletions
|
@ -69,9 +69,18 @@ tracepoint_track_objspace_events(VALUE self)
|
|||
return result;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
tracepoint_specify_normal_and_internal_events(VALUE self)
|
||||
{
|
||||
VALUE tpval = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_EVENT_CALL, 0, 0);
|
||||
rb_tracepoint_enable(tpval);
|
||||
return Qnil; /* should not be reached */
|
||||
}
|
||||
|
||||
void
|
||||
Init_tracepoint(void)
|
||||
{
|
||||
VALUE mBug = rb_define_module("Bug");
|
||||
rb_define_module_function(mBug, "tracepoint_track_objspace_events", tracepoint_track_objspace_events, 0);
|
||||
rb_define_module_function(mBug, "tracepoint_specify_normal_and_internal_events", tracepoint_specify_normal_and_internal_events, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue