diff options
Diffstat (limited to 'include/ruby/debug.h')
| -rw-r--r-- | include/ruby/debug.h | 76 |
1 files changed, 43 insertions, 33 deletions
diff --git a/include/ruby/debug.h b/include/ruby/debug.h index 4ef45a8327..16891e8458 100644 --- a/include/ruby/debug.h +++ b/include/ruby/debug.h @@ -1,31 +1,38 @@ -/********************************************************************** - - ruby/debug.h - - - $Author: ko1 $ - created at: Tue Nov 20 20:35:08 2012 - - Copyright (C) 2012 Yukihiro Matsumoto - -**********************************************************************/ - -#ifndef RB_DEBUG_H +#ifndef RB_DEBUG_H /*-*-C++-*-vi:se ft=cpp:*/ #define RB_DEBUG_H 1 - -#if defined(__cplusplus) -extern "C" { -#if 0 -} /* satisfy cc-mode */ -#endif -#endif - -#if defined __GNUC__ && __GNUC__ >= 4 -#pragma GCC visibility push(default) -#endif +/** + * @file + * @author $Author: ko1 $ + * @date Tue Nov 20 20:35:08 2012 + * @copyright Copyright (C) 2012 Yukihiro Matsumoto + * @copyright This file is a part of the programming language Ruby. + * Permission is hereby granted, to either redistribute and/or + * modify this file, provided that the conditions mentioned in the + * file COPYING are met. Consult the file for details. + */ +#include "ruby/internal/dllexport.h" +#include "ruby/internal/event.h" +#include "ruby/internal/value.h" + +RBIMPL_SYMBOL_EXPORT_BEGIN() /* Note: This file contains experimental APIs. */ /* APIs can be replaced at Ruby 2.0.1 or later */ + +/* profile frames APIs */ +int rb_profile_frames(int start, int limit, VALUE *buff, int *lines); +VALUE rb_profile_frame_path(VALUE frame); +VALUE rb_profile_frame_absolute_path(VALUE frame); +VALUE rb_profile_frame_label(VALUE frame); +VALUE rb_profile_frame_base_label(VALUE frame); +VALUE rb_profile_frame_full_label(VALUE frame); +VALUE rb_profile_frame_first_lineno(VALUE frame); +VALUE rb_profile_frame_classpath(VALUE frame); +VALUE rb_profile_frame_singleton_method_p(VALUE frame); +VALUE rb_profile_frame_method_name(VALUE frame); +VALUE rb_profile_frame_qualified_method_name(VALUE frame); + /* debug inspector APIs */ typedef struct rb_debug_inspector_struct rb_debug_inspector_t; typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *); @@ -58,15 +65,27 @@ VALUE rb_tracepoint_enabled_p(VALUE tpval); typedef struct rb_trace_arg_struct rb_trace_arg_t; rb_trace_arg_t *rb_tracearg_from_tracepoint(VALUE tpval); +rb_event_flag_t rb_tracearg_event_flag(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_method_id(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_callee_id(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_defined_class(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg); VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_object(rb_trace_arg_t *trace_arg); + +/* + * Postponed Job API + * rb_postponed_job_register and rb_postponed_job_register_one are + * async-signal-safe and used via SIGPROF by the "stackprof" RubyGem + */ +typedef void (*rb_postponed_job_func_t)(void *arg); +int rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void *data); +int rb_postponed_job_register_one(unsigned int flags, rb_postponed_job_func_t func, void *data); /* undocumented advanced tracing APIs */ @@ -79,15 +98,6 @@ typedef enum { 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); 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); -#if defined __GNUC__ && __GNUC__ >= 4 -#pragma GCC visibility pop -#endif - -#if defined(__cplusplus) -#if 0 -{ /* satisfy cc-mode */ -#endif -} /* extern "C" { */ -#endif +RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_DEBUG_H */ |
