Ruby  2.5.0dev(2017-10-22revision60238)
debug.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  ruby/debug.h -
4 
5  $Author: ko1 $
6  created at: Tue Nov 20 20:35:08 2012
7 
8  Copyright (C) 2012 Yukihiro Matsumoto
9 
10 **********************************************************************/
11 
12 #ifndef RB_DEBUG_H
13 #define RB_DEBUG_H 1
14 
15 #if defined(__cplusplus)
16 extern "C" {
17 #if 0
18 } /* satisfy cc-mode */
19 #endif
20 #endif
21 
23 
24 /* Note: This file contains experimental APIs. */
25 /* APIs can be replaced at Ruby 2.0.1 or later */
26 
27 
28 /* profile frames APIs */
29 int rb_profile_frames(int start, int limit, VALUE *buff, int *lines);
40 
41 /* debug inspector APIs */
44 
51 
52 /* Old style set_trace_func APIs */
53 
54 /* duplicated def of include/ruby/ruby.h */
57 
62 
63 /* TracePoint APIs */
64 
65 VALUE rb_tracepoint_new(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void (*func)(VALUE, void *), void *data);
69 
72 
84 
85 /* Postponed Job API */
86 typedef void (*rb_postponed_job_func_t)(void *arg);
87 int rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void *data);
88 int rb_postponed_job_register_one(unsigned int flags, rb_postponed_job_func_t func, void *data);
89 
90 /* undocumented advanced tracing APIs */
91 
92 typedef enum {
97 
100 
102 
103 #if defined(__cplusplus)
104 #if 0
105 { /* satisfy cc-mode */
106 #endif
107 } /* extern "C" { */
108 #endif
109 
110 #endif /* RUBY_DEBUG_H */
rb_event_flag_t rb_tracearg_event_flag(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:723
int rb_thread_remove_event_hook(VALUE thval, rb_event_hook_func_t func)
Definition: vm_trace.c:182
int rb_remove_event_hook(rb_event_hook_func_t func)
Definition: vm_trace.c:194
void rb_thread_add_event_hook(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Definition: vm_trace.c:129
VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, long index)
void rb_add_event_hook2(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag)
Definition: vm_trace.c:148
VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:807
VALUE rb_profile_frame_label(VALUE frame)
VALUE rb_profile_frame_path(VALUE frame)
int rb_thread_remove_event_hook_with_data(VALUE thval, rb_event_hook_func_t func, VALUE data)
Definition: vm_trace.c:188
VALUE rb_tracepoint_enabled_p(VALUE tpval)
Definition: vm_trace.c:1158
VALUE rb_profile_frame_method_name(VALUE frame)
VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:729
int rb_postponed_job_register_one(unsigned int flags, rb_postponed_job_func_t func, void *data)
Definition: vm_trace.c:1567
int rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void *data)
Definition: vm_trace.c:1551
RUBY_SYMBOL_EXPORT_BEGIN int rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
VALUE rb_profile_frame_first_lineno(VALUE frame)
VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:842
VALUE(* rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *)
Definition: debug.h:43
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
Definition: ruby.h:2117
rb_trace_arg_t * rb_tracearg_from_tracepoint(VALUE tpval)
Definition: vm_trace.c:717
VALUE rb_profile_frame_classpath(VALUE frame)
VALUE rb_debug_inspector_frame_self_get(const rb_debug_inspector_t *dc, long index)
VALUE rb_tracearg_method_id(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:786
VALUE rb_profile_frame_base_label(VALUE frame)
VALUE rb_tracearg_defined_class(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:800
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Definition: vm_trace.c:135
VALUE rb_tracepoint_new(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void(*func)(VALUE, void *), void *data)
Definition: vm_trace.c:1211
unsigned long VALUE
Definition: ruby.h:85
rb_event_hook_flag_t
Definition: debug.h:92
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:752
VALUE rb_tracearg_object(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:857
VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, long index)
VALUE rb_profile_frame_singleton_method_p(VALUE frame)
void rb_thread_add_event_hook2(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag)
Definition: vm_trace.c:142
VALUE rb_profile_frame_qualified_method_name(VALUE frame)
VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:758
VALUE rb_profile_frame_absolute_path(VALUE frame)
VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc)
uint32_t rb_event_flag_t
Definition: ruby.h:2116
VALUE rb_tracepoint_enable(VALUE tpval)
Definition: vm_trace.c:1011
void(* rb_postponed_job_func_t)(void *arg)
Definition: debug.h:86
VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data)
VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:827
VALUE rb_profile_frame_full_label(VALUE frame)
int rb_remove_event_hook_with_data(rb_event_hook_func_t func, VALUE data)
Definition: vm_trace.c:200
VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg)
Definition: vm_trace.c:821
VALUE rb_tracepoint_disable(VALUE tpval)
Definition: vm_trace.c:1030
VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, long index)