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

add rp() and bp() in internal.h.

debug utility macro rp() (rp_m()) and bp() are introduced.
* rp(obj) shows obj information w/o any side-effect to STDERR.
* rp_m(m, obj) is similar to rp(obj), but show m before.
* bp() is alias of ruby_debug_breakpoint(), which is registered
  as a breakpoint in run.gdb (used by `make gdb` or make gdb-ruby`).
This commit is contained in:
Koichi Sasada 2019-08-09 13:57:47 +09:00
parent cb390e87dc
commit 6bf8db9a07
5 changed files with 16 additions and 6 deletions

View file

@ -22,13 +22,10 @@ RUBY_SYMBOL_EXPORT_BEGIN
#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
#define bp() ruby_debug_breakpoint()
VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
int ruby_debug_print_indent(int level, int debug_level, int indent_level);
void ruby_debug_breakpoint(void);
void ruby_debug_gc_check_func(void);
void ruby_set_debug_option(const char *str);