Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get rbenv to keep debugging symbols?
    primarykey
    data
    text
    <p>I installed the development version of Ruby 2 via <code>rbenv</code> on Mac OS X v10.8.3, and am using it to compile a gem I'm working on. I have a memory problem I want to debug. Unfortunately, whenever I run <code>valgrind</code>, <code>gdb</code>, or <code>cgdb</code> in the context of a <code>rake spec</code>, I get a <a href="https://gist.github.com/mohawkjohn/5535509#file-rake-spec" rel="noreferrer">whole bunch of errors</a> like this one:</p> <pre><code>warning: Could not find object file "/private/var/folders/5f/h1s00nhn0rv4ckkpg4k_bwhr0000gn/T/ruby-build.20130331232604.54521/ruby-2.0.0-dev/main.o" - no debug information available for "main.c". </code></pre> <p>Obviously, that <code>ruby-build</code> directory no longer exists.</p> <p>I get a <a href="https://gist.github.com/mohawkjohn/5535509#file-rake-spec-valgrind-head" rel="noreferrer">series of likely-related errors</a> from <code>valgrind</code>. Here are examples:</p> <pre><code>--2564-- /Users/jwoods/.rbenv/versions/2.0.0-dev/lib/libyaml-0.2.dylib: --2564-- dSYM directory is missing; consider using --dsymutil=yes </code></pre> <p>If I try to use that <code>--dsymutil=yes</code> option, I get errors which are basically the same as those from <code>gdb</code>:</p> <pre><code>warning: (x86_64) /private/var/folders/5f/h1s00nhn0rv4ckkpg4k_bwhr0000gn/T/ruby-build.20130331232604.54521/ruby-2.0.0-dev/ext/openssl/ossl_bn.o unable to open object file </code></pre> <p>Per an answer to another question, I tried running <code>info target</code> inside <code>gdb</code>. <a href="https://gist.github.com/mohawkjohn/5535509#file-gdb-info-target" rel="noreferrer">Here is the output.</a></p> <p>Is there some way I can instruct <code>rbenv</code> to put the debugging symbols somewhere that they won't get cleaned up?</p> <p>I'm using GCC 4.7.1, which I installed via homebrew. My exact Ruby version string is <code>ruby 2.1.0dev (2013-04-01 trunk 40029) [x86_64-darwin12.3.0]</code>, and my <code>rbenv</code> version is 0.4.0.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload