Search code examples
rubydebug-symbols

How do I check if the installation of Ruby I have has debugging symbols?


Memprof says

Memprof supports all 1.8.x (MRI and REE) VMs, as long as they are 64-bit and contain debugging symbols. For best results, use RVM to compile ruby and make sure you are on a 64-bit machine.

How do I check if the installation of Ruby I have has debugging symbols?


Solution

  • Try debugging it?

    $ gdb ruby
    
    GNU gdb (GDB) 7.0-ubuntu
    Copyright (C) 2009 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "i486-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/tom/.rvm/rubies/ruby-1.9.2-p0/bin/ruby...done.
    (gdb) 
    

    If it succeeds at reading symbols, it's reasonable to assume the symbols are there. As to 32 vs 64-bit, I'd think the "i486-linux-gnu" means 32-bit. But I'm no expert on this.