1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.

This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
  This event is experimental one. It is possible to remove/rename
  flag name after 2.0.1.
* vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
  occurred. `:specified_line' never been returned.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-01-07 08:38:25 +00:00
parent 80ad3e2a43
commit 06f2a86f1a
3 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,13 @@
Mon Jan 7 17:34:22 2013 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.
This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
This event is experimental one. It is possible to remove/rename
flag name after 2.0.1.
* vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
occurred. `:specified_line' never been returned.
Mon Jan 7 15:42:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Mon Jan 7 15:42:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (f_kwrest): allow bare kwrest_mark as valid syntax. its * parse.y (f_kwrest): allow bare kwrest_mark as valid syntax. its

View file

@ -1568,6 +1568,7 @@ static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
#define HAVE_NATIVETHREAD #define HAVE_NATIVETHREAD
int ruby_native_thread_p(void); int ruby_native_thread_p(void);
/* traditional set_trace_func events */
#define RUBY_EVENT_NONE 0x0000 #define RUBY_EVENT_NONE 0x0000
#define RUBY_EVENT_LINE 0x0001 #define RUBY_EVENT_LINE 0x0001
#define RUBY_EVENT_CLASS 0x0002 #define RUBY_EVENT_CLASS 0x0002
@ -1578,17 +1579,19 @@ int ruby_native_thread_p(void);
#define RUBY_EVENT_C_RETURN 0x0040 #define RUBY_EVENT_C_RETURN 0x0040
#define RUBY_EVENT_RAISE 0x0080 #define RUBY_EVENT_RAISE 0x0080
#define RUBY_EVENT_ALL 0x00ff #define RUBY_EVENT_ALL 0x00ff
#define RUBY_EVENT_SWITCH 0x20000
#define RUBY_EVENT_COVERAGE 0x40000
/* for TracePoint extended events */ /* for TracePoint extended events */
#define RUBY_EVENT_B_CALL 0x0100 #define RUBY_EVENT_B_CALL 0x0100
#define RUBY_EVENT_B_RETURN 0x0200 #define RUBY_EVENT_B_RETURN 0x0200
#define RUBY_EVENT_THREAD_BEGIN 0x0400 #define RUBY_EVENT_THREAD_BEGIN 0x0400
#define RUBY_EVENT_THREAD_END 0x0800 #define RUBY_EVENT_THREAD_END 0x0800
#define RUBY_EVENT_SPECIFIED_LINE 0x8000
#define RUBY_EVENT_TRACEPOINT_ALL 0xFFFF #define RUBY_EVENT_TRACEPOINT_ALL 0xFFFF
/* special events */
#define RUBY_EVENT_SPECIFIED_LINE 0x10000
#define RUBY_EVENT_SWITCH 0x20000
#define RUBY_EVENT_COVERAGE 0x40000
typedef unsigned long rb_event_flag_t; typedef unsigned long rb_event_flag_t;
typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass); typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);

View file

@ -546,6 +546,7 @@ get_event_id(rb_event_flag_t event)
C(thread_begin, THREAD_BEGIN); C(thread_begin, THREAD_BEGIN);
C(thread_end, THREAD_END); C(thread_end, THREAD_END);
C(specified_line, SPECIFIED_LINE); C(specified_line, SPECIFIED_LINE);
case RUBY_EVENT_LINE | RUBY_EVENT_SPECIFIED_LINE: CONST_ID(id, "line"); return id;
#undef C #undef C
default: default:
return 0; return 0;