Skip to content

Instantly share code, notes, and snippets.

@netshade
Created May 15, 2012 19:12
Show Gist options
  • Save netshade/2704294 to your computer and use it in GitHub Desktop.
Save netshade/2704294 to your computer and use it in GitHub Desktop.
Of course
netshade@chris-zelenak-2 [03:11:27] [~/.rvm/src/ruby-1.8.7-p352]
-> % ./ruby crash.rb
85317
85318
crash.rb:6: [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.3.0]
netshade@chris-zelenak-2 [03:11:34] [~/.rvm/src/ruby-1.8.7-p352]
-> % gdb ./ruby
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) break signal.c:634
Breakpoint 1 at 0x20c49ba5dda4e2: file signal.c, line 634.
(gdb) run crashb.rb
Starting program: /Users/netshade/.rvm/src/ruby-1.8.7-p352/ruby crashb.rb
Reading symbols for shared libraries +++............................ done
Reading symbols for shared libraries . done
Program exited normally.
(gdb) set follow-fork-mode child
(gdb) run crash.rb
Starting program: /Users/netshade/.rvm/src/ruby-1.8.7-p352/ruby crash.rb
85338
85341
Program exited normally.
(gdb) run ./crashb.rb
Starting program: /Users/netshade/.rvm/src/ruby-1.8.7-p352/ruby ./crashb.rb
Program exited normally.
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment