Report abuse

Breakpoint 1, rubinius::Dir::open (this=0x384f4e4, state=0x1807c00, path=0x389d2f4) at builtin_dir.cpp:24
24          DIR* d = opendir(path->byte_address(state));
(gdb) n
26          if(!d) state->raise_from_errno("Unable to open directory");
(gdb) n
27          SET(this, data, MemoryPointer::create(state, d));
(gdb) 
29          return Qnil;
(gdb) p this
$1 = (rubinius::Dir * const) 0x384f4e4
(gdb) p *this
$2 = {
   = {
     = {
      {
        {
          obj_type = rubinius::DirType, 
          zone = rubinius::MatureObjectZone, 
          age = 0, 
          Forwarded = 0, 
          Remember = 0, 
          Marked = 0, 
          ForeverYoung = 0, 
          CanStoreIvars = 1, 
          StoresBytes = 0, 
          RequiresCleanup = 0, 
          IsBlockContext = 0, 
          IsMeta = 0, 
          CTXFast = 0, 
          IsTainted = 0, 
          IsFrozen = 0, 
          IsLittleEndian = 0, 
          RefsAreWeak = 0
        }, 
        all_flags = 32880
      }, 
      field_count = 2, 
      klass = 0x3838d94
    }, 
    members of rubinius::Object: 
    {
      field = 0x384f4f0, 
      bytes = 0x384f4f0 "\016"
    }
  }, 
  members of rubinius::Dir: 
  static fields = 2, 
  static type = , 
  __ivars__ = 0xe, 
  data = 0x38a6484
}
(gdb) p *this->pointer
There is no member or method named pointer.
(gdb) p *this->data   
$3 = {
   = {
     = {
      {
        {
          obj_type = rubinius::MemPtrType, 
          zone = rubinius::MatureObjectZone, 
          age = 0, 
          Forwarded = 0, 
          Remember = 0, 
          Marked = 0, 
          ForeverYoung = 0, 
          CanStoreIvars = 1, 
          StoresBytes = 1, 
          RequiresCleanup = 0, 
          IsBlockContext = 0, 
          IsMeta = 0, 
          CTXFast = 0, 
          IsTainted = 0, 
          IsFrozen = 0, 
          IsLittleEndian = 0, 
          RefsAreWeak = 0
        }, 
        all_flags = 98386
      }, 
      field_count = 5, 
      klass = 0x381f034
    }, 
    members of rubinius::Object: 
    {
      field = 0x38a6490, 
      bytes = 0x38a6490 "À¨Š\003"
    }
  }, 
  members of rubinius::MemoryPointer: 
  static fields = 0, 
  static type = , 
  pointer = 0x38aa8c0
}