Giter Club home page Giter Club logo

cbacktrace's Introduction

cbacktrace

Extension module for python that allows you to print a C-level backtrace from the interpreter after receiving a SEGFAULT signal. This may come in handy when your program crashes and you want to print a lowlevel backtrace to pinpoint the problem.

Installation

To install issue the following commands:

git clone https://github.com/tgrel/cbacktrace
cd cbacktrace
python setup.py build
python setup.py install

Example

In order to activate the functionality you need to import the module:

import cbacktrace

Should the python process receive a SEGFAULT signal it'll print a nice C-backtrace like this one:

/home/tgrel/cbacktrace/cbacktrace.so(handler+0x18)[0x7f]
/lib/x86_64-linux-gnu/libc.so.6(+0x36d40)[0x7f14cf3b7d40]
/lib/x86_64-linux-gnu/libc.so.6(__select+0x33)[0x7f14cf472da3]
/usr/bin/python[0x4a09fd]
/usr/bin/python(PyEval_EvalFrameEx+0x5ed)[0x55431d]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6824)[0x55a554]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6824)[0x55a554]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6824)[0x55a554]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6824)[0x55a554]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6057)[0x559d87]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6824)[0x55a554]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6057)[0x559d87]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6057)[0x559d87]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6824)[0x55a554]
/usr/bin/python[0x56aa8a]
/usr/bin/python(PyObject_Call+0x36)[0x4fb216]
/usr/bin/python(PyEval_EvalFrameEx+0x7713)[0x55b443]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalFrameEx+0x6057)[0x559d87]
/usr/bin/python(PyEval_EvalCodeEx+0x251)[0x574821]
/usr/bin/python(PyEval_EvalCode+0x32)[0x5c0132]

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.