Skip to content

Instantly share code, notes, and snippets.

View fbogsany's full-sized avatar

Francis Bogsanyi fbogsany

View GitHub Profile
@fbogsany
fbogsany / gdb_ruby_backtrace.py
Created August 2, 2016 18:52 — forked from csfrancis/gdb_ruby_backtrace.py
Dump an MRI call stack from gdb
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
def get_lineno(iseq, pos):
#! /usr/bin/perl
# Written by Dormando.
# PUBLIC DOMAIN.
# No guarantees it won't eat your cat.
use warnings;
use strict;
use IO::Socket::INET;
use Time::HiRes qw/time sleep alarm/;

Keybase proof

Keybase proof

I hereby claim:

  • I am fbogsany on github.
  • I am fbogsany (https://keybase.io/fbogsany) on keybase.
  • I have a public key whose fingerprint is DE38 1ADE 4569 F296 9B37 F10A 55A5 CB29 4020 FDD8

To claim this, I am signing this object:

`/Users/fbogsany/Projects/Ruby/test/ruby-trunk/bin/ruby ./benchmark/bm_io_select2.rb' exited with abnormal status (pid 21962 exit 1)
`./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./benchmark/bm_io_select2.rb' exited with abnormal status (pid 21963 exit 1)
`/Users/fbogsany/Projects/Ruby/test/ruby-trunk/bin/ruby ./benchmark/bm_io_select3.rb' exited with abnormal status (pid 21964 exit 1)
`./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./benchmark/bm_io_select3.rb' exited with abnormal status (pid 21965 exit 1)
-----------------------------------------------------------
benchmark results:
Execution time (sec)
name ruby 2.1.0dev (2013-10-23 trunk 43398) [x86_64-darwin13.0.0] built-ruby
app_answer 0.207 0.133