News for hackers. Stuff that matters.
Re:PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308 by JonnieCache on Tuesday January 04, 2011 @07:10AM (#2066663)
You can do all this in any decent scripting language too. In ruby:

    require 'rubygems'
    require 'ruby-debug'

    Debugger.start
    Signal.trap('INT') { debugger } # this line makes the debugger run when you hit ctrl-c

    # YOUR CODE HERE INSTEAD!
    loop {}
Simply hit ctrl-C (sometimes twice) when your code is hung or whatever and then issue the `where` command to rdb. Just make sure you have the ruby-debug gem installed.

It's actually easier, as you obviously don't have to worry about debugging symbols. You can also attach rdb to running interpreter processes and all that good stuff.

http://bashdb.sourceforge.net/ruby-debug.html

EDIT: I've just realised that this will obviously only catch bugs in ruby code. For bugs in the ruby interpreter itself, like the php bug under discussion, you will need to use gdb on the interpreter binary like jrockway showed. Still the point is that you shouldn't consider this stuff over your head just because you only hack dynamic languages :)

There are no comments on this comment yet.