mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
debug.c: more enums
* debug.c (ruby_dummy_gdb_enums): add enums for RObject, RModule, RString, RArray. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d0e7329df3
commit
be701dc57f
3 changed files with 8 additions and 18 deletions
4
debug.c
4
debug.c
|
@ -29,6 +29,10 @@ const union {
|
|||
enum ruby_encoding_consts encoding_consts;
|
||||
enum ruby_coderange_type enc_coderange_types;
|
||||
enum ruby_econv_flag_type econv_flag_types;
|
||||
enum ruby_robject_flags robject_flags;
|
||||
enum ruby_rmodule_flags rmodule_flags;
|
||||
enum ruby_rstring_flags rstring_flags;
|
||||
enum ruby_rarray_flags rarray_flags;
|
||||
enum {
|
||||
RUBY_NODE_TYPESHIFT = NODE_TYPESHIFT,
|
||||
RUBY_NODE_TYPEMASK = NODE_TYPEMASK,
|
||||
|
|
|
@ -879,7 +879,7 @@ VALUE rb_obj_reveal(VALUE obj, VALUE klass); /* do not use this API to change kl
|
|||
|
||||
#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
|
||||
#define ROBJECT_EMBED ROBJECT_EMBED
|
||||
enum {
|
||||
enum ruby_robject_flags {
|
||||
ROBJECT_EMBED_LEN_MAX = 3,
|
||||
ROBJECT_EMBED = RUBY_FL_USER1,
|
||||
|
||||
|
@ -918,7 +918,7 @@ struct RObject {
|
|||
#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
|
||||
#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
|
||||
#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
|
||||
enum {
|
||||
enum ruby_rmodule_flags {
|
||||
RMODULE_IS_OVERLAID = RUBY_FL_USER2,
|
||||
RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
|
||||
RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4,
|
||||
|
@ -941,7 +941,7 @@ VALUE rb_float_new_in_heap(double);
|
|||
#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
|
||||
#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
|
||||
#define RSTRING_FSTR RSTRING_FSTR
|
||||
enum {
|
||||
enum ruby_rstring_flags {
|
||||
RSTRING_NOEMBED = RUBY_FL_USER1,
|
||||
RSTRING_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|
|
||||
RUBY_FL_USER5|RUBY_FL_USER6),
|
||||
|
@ -986,7 +986,7 @@ struct RString {
|
|||
((ptrvar) = RSTRING(str)->as.ary, (lenvar) = RSTRING_EMBED_LEN(str)) : \
|
||||
((ptrvar) = RSTRING(str)->as.heap.ptr, (lenvar) = RSTRING(str)->as.heap.len))
|
||||
|
||||
enum {
|
||||
enum ruby_rarray_flags {
|
||||
RARRAY_EMBED_LEN_MAX = 3,
|
||||
RARRAY_EMBED_FLAG = RUBY_FL_USER1,
|
||||
/* RUBY_FL_USER2 is for ELTS_SHARED */
|
||||
|
|
|
@ -22,20 +22,6 @@ def lldb_init(debugger):
|
|||
name = member.GetName()
|
||||
value = member.GetValueAsUnsigned()
|
||||
g[name] = value
|
||||
global ROBJECT_EMBED_LEN_MAX, ROBJECT_EMBED
|
||||
ROBJECT_EMBED_LEN_MAX = 3
|
||||
ROBJECT_EMBED = RUBY_FL_USER1
|
||||
global RMODULE_IS_OVERLAID, RMODULE_IS_REFINEMENT, RMODULE_INCLUDED_INTO_REFINEMENT
|
||||
RMODULE_IS_OVERLAID = RUBY_FL_USER2
|
||||
RMODULE_IS_REFINEMENT = RUBY_FL_USER3
|
||||
RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4
|
||||
global RSTRING_NOEMBED, RSTRING_EMBED_LEN_MASK, RSTRING_EMBED_LEN_SHIFT, RSTRING_EMBED_LEN_MAX, RSTRING_FSTR
|
||||
RSTRING_NOEMBED = RUBY_FL_USER1
|
||||
RSTRING_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|
|
||||
RUBY_FL_USER5|RUBY_FL_USER6)
|
||||
RSTRING_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+2)
|
||||
RSTRING_EMBED_LEN_MAX = (SIZEOF_VALUE*3)-1
|
||||
RSTRING_FSTR = RUBY_FL_USER17
|
||||
|
||||
def fixnum_p(x):
|
||||
return x & RUBY_FIXNUM_FLAG != 0
|
||||
|
|
Loading…
Reference in a new issue