After the upcoming Rubinius 1.2.2 release, I'll release another version of
the trepanning debugger. In that release, I added  the  gdb "condition"
command mentioned before. Hopefully this be able to do or at least get close
to what you requested.



On Sun, Feb 20, 2011 at 3:26 PM, Chuck Remes <[email protected]> wrote:

> On Feb 19, 2011, at 10:34 PM, Rocky Bernstein wrote:
>
>
>
> On Sat, Feb 19, 2011 at 10:03 PM, Chuck Remes <[email protected]>wrote:
>
>> 3. Add in the heap_dump (evanphx/heap_dump) functionality directly into
>> rbx console (or make it a plug-in or something). It would be great to be
>> able to write a command similar to this:
>>
>> console> heap.diff(Time.now, Time.now + 60)
>>
>> or
>>
>> console> now_anchor = Time.now
>> console> 5.times do
>> console>    sleep 60
>> console>    heap.diff(now_anchor, Time.now)
>> console> end
>>
>> to do heap diffs right in the console.
>>
>> 4. Extend the debugger so we can set breakpoint on stdlib or rbx internal
>> Ruby code that is *called by* a C extension.
>>
>
> I wasn't aware this wasn't possible. Can you come up with the simplest test
> case to try?
>
>
> Upon re-reading, I see that #4 is unclear. I *did* write it at midnight
> with a few whiskies in my system, so that's my excuse.
>
> Allow me to clarify.
>
> 4. Extend the debugger so that we can set conditional breakpoints on stdlib
> or internal Rubinius Ruby code. This would be useful for breaking on
> Array#insert when it is called from a C extension but *not break* there when
> called by other code. A small example may help illustrate.
>
> debug> break Array#insert if call_stack.include?("some function from a C
> extension")
>
> This example would *only* break on #insert when it's called from a C
> extension, but other calls from normal Ruby code would not trigger the
> break.
>
> I hope that is clearer. If not, perhaps I can try again (or the idea is
> half-baked to begin with).
>
> cr
>
>
>  --
> --- !ruby/object:MailingList
> name: rubinius-dev
> view: http://groups.google.com/group/rubinius-dev?hl=en
> post: [email protected]
> unsubscribe: [email protected]
>

-- 
--- !ruby/object:MailingList
name: rubinius-dev
view: http://groups.google.com/group/rubinius-dev?hl=en
post: [email protected]
unsubscribe: [email protected]

Reply via email to