Giter VIP home page Giter VIP logo

gdbruby's Introduction

gdbruby.rb

Overview

gdbruby.rb can output these information with live process or core.

  • environment variables
  • C stacktrace
  • Ruby backtrace

This is Ruby port of gdbperl.pl made by Akira Higuchi.

Precondition

Your Ruby executable must have debug symbol.

Usage

With live process(process id: 24113)

$ gdbruby.rb 24113

With core file. You have to specify path of ruby executable.

$ gdbruby.rb core.24113 `rbenv which ruby`

You can get core file with gcore script or execute gcore command on gdb like below.

$ gdb
(gdb) attach 24113
(gdb) gcore core.24113
(gdb) detach

Options

You can specify options. 0 is interprited as false.

$ gdbruby.rb 24113 verbose_gdb=1 c_trace=1
  • verbose_gdb: Show request and response to/from gdb(default: false)
  • env: Show environment variables(default: true)
  • c_trace: Show C stacktrace(default:true)

ToDo

  • Print all Ruby threads
  • Print arguments on Ruby backtrace
  • Speeding up Ruby's type check
  • List Ruby objects
  • Check memory usage

FAQ

Why don't you call functions such like rb_vm_get_sourceline()

If you use gdbruby.rb with live process, gdb can call these functions. But if you use gdbruby.rb with core file, gdb cannot call c functions. So I re-implement these functions.

Which version does it support?

Ruby 2.0.0 only.

gdbruby's People

Contributors

gunyarakun avatar sonots avatar

Watchers

Spring_MT avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.