From 977bec12363e7e87a19ad81aa063fbf2b4112493 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 6 Sep 2012 05:49:51 +0000 Subject: .gdbinit: FLONUM support * .gdbinit (rp): FLONUM support. * include/ruby/ruby.h (ruby_special_consts): define FLONUM constants always, so that they are available from gdb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- .gdbinit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.gdbinit') diff --git a/.gdbinit b/.gdbinit index 956a53471b..b67115b6a2 100644 --- a/.gdbinit +++ b/.gdbinit @@ -89,7 +89,11 @@ define rp echo undef\n else if (VALUE)($arg0) & RUBY_IMMEDIATE_MASK - echo immediate\n + if ((VALUE)($arg0) & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG + printf "FLONUM: %g\n", (double)rb_float_value($arg0) + else + echo immediate\n + end else set $flags = ((struct RBasic*)($arg0))->flags if ($flags & RUBY_T_MASK) == RUBY_T_NONE -- cgit v1.2.3