Debugger capable of attaching to and injecting code into python processes.

Overview

DISCLAIMER: This is not an official google project, this is just something I wrote while at Google.

Pyringe

What this is

Pyringe is a python debugger capable of attaching to running processes, inspecting their state and even of injecting python code into them while they're running. With pyringe, you can list threads, get tracebacks, inspect locals/globals/builtins of running functions, all without having to prepare your program for it.

What this is not

A "Google project". It's my internship project that got open-sourced. Sorry for the confusion.

What do I need?

Pyringe internally uses gdb to do a lot of its heavy lifting, so you will need a fairly recent build of gdb (version 7.4 onwards, and only if gdb was configured with --with-python). You will also need the symbols for whatever build of python you're running.
On Fedora, the package you're looking for is python-debuginfo, on Debian it's called python2.7-dbg (adjust according to version). Arch Linux users: see issue #5, Ubuntu users can only debug the python-dbg binary (see issue #19).
Having Colorama will get you output in boldface, but it's optional.

How do I get it?

Get it from the Github repo, PyPI, or via pip (pip install pyringe).

Is this Python3-friendly?

Short answer: No, sorry. Long answer:
There's three potentially different versions of python in play here:

  1. The version running pyringe
  2. The version being debugged
  3. The version of libpythonXX.so your build of gdb was linked against

2 Is currently the dealbreaker here. Cpython has changed a bit in the meantime[1], and making all features work while debugging python3 will have to take a back seat for now until the more glaring issues have been taken care of.
As for 1 and 3, the 2to3 tool may be able to handle it automatically. But then, as long as 2 hasn't been taken care of, this isn't really a use case in the first place.

[1] - For example, pendingbusy (which is used for injection) has been renamed to busy and been given a function-local scope, making it harder to interact with via gdb.

Will this work with PyPy?

Unfortunately, no. Since this makes use of some CPython internals and implementation details, only CPython is supported. If you don't know what PyPy or CPython are, you'll probably be fine.

Why not PDB?

PDB is great. Use it where applicable! But sometimes it isn't.
Like when python itself crashes, gets stuck in some C extension, or you want to inspect data without stopping a program. In such cases, PDB (and all other debuggers that run within the interpreter itself) are next to useless, and without pyringe you'd be left with having to debug using print statements. Pyringe is just quite convenient in these cases.

I injected a change to a local var into a function and it's not showing up!

This is a known limitation. Things like inject('var = 2') won't work, but inject('var[1] = 1337') should. This is because most of the time, python internally uses a fast path for looking up local variables that doesn't actually perform the dictionary lookup in locals(). In general, code you inject into processes with pyringe is very different from a normal python function call.

How do I use it?

You can start the debugger by executing python -m pyringe. Alternatively:

import pyringe
pyringe.interact()

If that reminds you of the code module, good; this is intentional.
After starting the debugger, you'll be greeted by what behaves almost like a regular python REPL.
Try the following:

==> pid:[None] #threads:[0] current thread:[None]
>>> help()
Available commands:
 attach: Attach to the process with the given pid.
 bt: Get a backtrace of the current position.
 [...]
==> pid:[None] #threads:[0] current thread:[None]
>>> attach(12679)
==> pid:[12679] #threads:[11] current thread:[140108099462912]
>>> threads()
[140108099462912, 140108107855616, 140108116248323, 140108124641024, 140108133033728, 140108224739072, 140108233131776, 140108141426432, 140108241524480, 140108249917184, 140108269324032]

The IDs you see here correspond to what threading.current_thread().ident would tell you.
All debugger functions are just regular python functions that have been exposed to the REPL, so you can do things like the following.

==> pid:[12679] #threads:[11] current thread:[140108099462912]
>>> for tid in threads():
...   if not tid % 10:
...     thread(tid)
...     bt()
... 
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 524, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./test.py", line 46, in Idle
    Thread_2_Func(1)
  File "./test.py", line 40, in Wait
    time.sleep(n)
==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> 

You can access the inferior's locals and inspect them like so:

==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> inflocals()
{'a': <proxy of A object at remote 0x1d9b290>, 'LOL': 'success!', 'b': <proxy of B object at remote 0x1d988c0>, 'n': 1}
==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> p('a')
<proxy of A object at remote 0x1d9b290>
==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> p('a').attr
'Some_magic_string'
==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> 

And sure enough, the definition of a's class reads:

class Example(object):
  cl_attr = False
  def __init__(self):
    self.attr = 'Some_magic_string'

There's limits to how far this proxying of objects goes, and everything that isn't trivial data will show up as strings (like '<function at remote 0x1d957d0>').
You can inject python code into running programs. Of course, there are caveats but... see for yourself:

==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> inject('import threading')
==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> inject('print threading.current_thread().ident')
==> pid:[12679] #threads:[11] current thread:[140108241524480]
>>> 

The output of my program in this case reads:

140108241524480

If you need additional pointers, just try using python's help (pyhelp() in the debugger) on debugger commands.

Comments
  • Immediate SyntaxError on attach

    Immediate SyntaxError on attach

    Attempting to attach to a process, I get this error:

    In [3]: pyringe.interact()
    Pyringe (Python 2.7.5) on linux2
    For a list of debugger commands, try "help()". (python's help is available as pyhelp.)
    ==> pid:[None] #threads:[0] current thread:[None]
    In : attach(26802)
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "/usr/local/lib/python2.7/dist-packages/pyringe/repl.py", line 157, in Attach
        self.inferior.Reinit(pid)
      File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 418, in Reinit
        self.__init__(pid, auto_symfile_loading)
      File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 390, in __init__
        self.StartGdb()
      File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 437, in StartGdb
        self._gdb.Attach(self.position)
      File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 181, in <lambda>
        return lambda *args, **kwargs: self._Execute(name, *args, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 277, in _Execute
        result_string = self._Recv(timeout)
      File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 362, in _Recv
        raise ProxyError(exc_text)
    ProxyError: Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/pyringe/payload/gdb_service.py", line 34, in <module>
        import libpython
      File "/usr/local/lib/python2.7/dist-packages/pyringe/payload/libpython.py", line 58
        Py_TPFLAGS_HEAPTYPE = (1L << 9)
                                ^
    SyntaxError: invalid syntax
    
    ==> pid:[26802] #threads:[0] current thread:[None]
    
    opened by thomasj02 9
  • Debug Symbols on Ubuntu

    Debug Symbols on Ubuntu

    Having installed python2.7-dbg, the automatic loading of the symbol file isn't working:

    Pyringe (Python 2.7.3) on linux2
    For a list of debugger commands, try "help()". (python's help is available as pyhelp.)
    ==> pid:[None] #threads:[0] current thread:[None]
    >>> attach(8298)
    WARNING:root:Failed to automatically load symbol file, some functionality will be unavailable until symbol file is provided.
    ==> pid:[8298] #threads:[0] current thread:[None]
    

    It seems that the default SYMBOL_FILE is relative to payload, and it seems to not be present. Changing the default to, say, the binary or shared object files installed by the python2.7-dbg package then fails to pass the sanity check.

    Am I missing something obvious? Does the python (in our case, a daemon) have to have been invoked with python-dbg (we were under the impression that was not the case)?

    opened by dlecocq 7
  • gdb: unrecognised option '--nh'

    gdb: unrecognised option '--nh'

    I've received the following when trying to attach to a process:

    For a list of debugger commands, try "help()". (python's help is available as pyhelp.)
    ==> pid:[None] #threads:[0] current thread:[None]
    >>> attach(31043)
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/repl.py", line 157, in Attach
        self.inferior.Reinit(pid)
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/inferior.py", line 418, in Reinit
        self.__init__(pid, auto_symfile_loading)
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/inferior.py", line 390, in __init__
        self.StartGdb()
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/inferior.py", line 437, in StartGdb
        self._gdb.Attach(self.position)
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/inferior.py", line 181, in <lambda>
        return lambda *args, **kwargs: self._Execute(name, *args, **kwargs)
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/inferior.py", line 277, in _Execute
        result_string = self._Recv(timeout)
      File "/home/asmith/.local/lib/python2.7/site-packages/pyringe/inferior.py", line 362, in _Recv
        raise ProxyError(exc_text)
    ProxyError: gdb: unrecognised option '--nh'
    Use `gdb --help' for a complete list of options.
    

    I assume there's some gdb version mismatch:

    GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>.
    
    opened by andrewmichaelsmith 6
  • Pyringe falls over if something (GdbProxy?) reports a non-numeric version

    Pyringe falls over if something (GdbProxy?) reports a non-numeric version

    $ python -m pyringe
    Pyringe (Python 2.7.3) on linux2
    For a list of debugger commands, try "help()". (python's help is available as pyhelp.)
    ==> pid:[None] #threads:[0] current thread:[None]
    >>> attach(17014)
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/repl.py", line 157, in Attach
        self.inferior.Reinit(pid)
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 464, in Reinit
        self.__init__(pid, auto_symfile_loading)
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 436, in __init__
        self.StartGdb()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 482, in StartGdb
        self._gdb = GdbProxy()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 133, in __init__
        gdb_version = GdbProxy.Version()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 244, in Version
        major = int(version[0])
    ValueError: invalid literal for int() with base 10: 'Red'
    Traceback (most recent call last):
      File "/opt/python/current/lib/python2.7/runpy.py", line 162, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "/opt/python/current/lib/python2.7/runpy.py", line 72, in _run_code
        exec code in run_globals
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/__main__.py", line 19, in <module>
        pyringe.interact()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/__init__.py", line 25, in interact
        DebuggingConsole().interact()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/repl.py", line 208, in interact
        prompt = self.StatusLine() + '\n' + sys.ps1
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/repl.py", line 133, in StatusLine
        self.inferior.StartGdb()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 482, in StartGdb
        self._gdb = GdbProxy()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 133, in __init__
        gdb_version = GdbProxy.Version()
      File "/home/dtdev/dtenv/lib/python2.7/site-packages/pyringe/inferior.py", line 244, in Version
        major = int(version[0])
    ValueError: invalid literal for int() with base 10: 'Red'
    (dtenv)[ [email protected] ~ ]
    $ 
    
    opened by marcintustin 5
  • WindowsError: [Error 2] The system cannot find the file specified

    WindowsError: [Error 2] The system cannot find the file specified

    When attempting to inject into either a process that runs on python, or a normal python.exe interpreter, I get the error:

      File "<console>", line 1, in <module>  
      File "C:\Python27\lib\site-packages\pyringe\repl.py", line 157, in Attach
        self.inferior.Reinit(pid)  
      File "C:\Python27\lib\site-packages\pyringe\inferior.py", line 480, in Reinit  
        self.__init__(pid, auto_symfile_loading)  
      File "C:\Python27\lib\site-packages\pyringe\inferior.py", line 452, in __init__  
        self.StartGdb()  
      File "C:\Python27\lib\site-packages\pyringe\inferior.py", line 498, in StartGdb  
        self._gdb = GdbProxy()  
      File "C:\Python27\lib\site-packages\pyringe\inferior.py", line 134, in __init__  
        gdb_version = GdbProxy.Version()  
      File "C:\Python27\lib\site-packages\pyringe\inferior.py", line 237, in Version  
        output = subprocess.check_output(['gdb', '--version']).split('\n')[0]  
      File "C:\Python27\lib\subprocess.py", line 212, in check_output  
        process = Popen(stdout=PIPE, *popenargs, **kwargs)  
      File "C:\Python27\lib\subprocess.py", line 390, in __init__  
        errread, errwrite)  
      File "C:\Python27\lib\subprocess.py", line 640, in _execute_child  
        startupinfo)  
    WindowsError: [Error 2] The system cannot find the file specified  
    WARNING:root:Inferior is not running.
    

    I'm running Windows 10 on Python 2.7.13.

    opened by DashLt 3
  • Python 3 friendly?

    Python 3 friendly?

    Seeing a print 'some string' statement in the code I gather that pyringe is python 2 only. However, it would be nice to see this announced on the frontpage and on PyPI.

    Cheers.

    opened by kseistrup 3
  • ModuleNotFoundError: No module named 'inferior'

    ModuleNotFoundError: No module named 'inferior'

    • OS: Ubuntu 19.04
    • Arch: Linux carrot 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    ➜ apt install gdb python-dbg python2.7-dbg
    ➜ pip install --no-cache-dir pyringe
    Collecting pyringe
      Using cached https://files.pythonhosted.org/packages/7c/c6/6cef124c38227ece01350414c7866727179d17f64b88b8bf513386c0e4be/pyringe-1.0.2.tar.gz
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jearzn7v/pyringe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jearzn7v/pyringe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
             cwd: /tmp/pip-install-jearzn7v/pyringe/
        Complete output (7 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-jearzn7v/pyringe/setup.py", line 18, in <module>
            import pyringe
          File "/tmp/pip-install-jearzn7v/pyringe/pyringe/__init__.py", line 17, in <module>
            import inferior
        ModuleNotFoundError: No module named 'inferior'
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    

    However, installing via git repo worked fine, so it looks like it's an issue with the pip package and is due to missing dependencies / bad system setup:

    ➜ git clone https://github.com/google/pyringe.git
    ➜ cd pyringe
    ➜ python setup.py install
    ➜ python -m pyringe
    Pyringe (Python 2.7.15) on linux2
    For a list of debugger commands, try "help()". (python's help is available as pyhelp.)
    ==> pid:[None] #threads:[0] current thread:[None]
    >>>
    
    opened by pirate 2
  • Explicitly tell gdb the python executable to use

    Explicitly tell gdb the python executable to use

    Without this change I'm getting this on a system that has also python3 installed, when I try to attach() to a process:

    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File ".../pyringe/repl.py", line 157, in Attach
        self.inferior.Reinit(pid)
      File ".../pyringe/inferior.py", line 464, in Reinit
        self.__init__(pid, auto_symfile_loading)
      File ".../pyringe/inferior.py", line 436, in __init__
        self.StartGdb()
      File ".../pyringe/inferior.py", line 483, in StartGdb
        self._gdb.Attach(self.position)
      File ".../pyringe/inferior.py", line 196, in <lambda>
        return lambda *args, **kwargs: self._Execute(name, *args, **kwargs)
      File ".../pyringe/inferior.py", line 323, in _Execute
        result_string = self._Recv(timeout)
      File ".../pyringe/inferior.py", line 408, in _Recv
        raise ProxyError(exc_text)
    ProxyError: Traceback (most recent call last):
      File ".../pyringe/payload/gdb_service.py", line 34, in <module>
        import libpython
      File ".../pyringe/payload/libpython.py", line 58
        Py_TPFLAGS_HEAPTYPE = (1L << 9)
                                ^
    SyntaxError: invalid syntax
    

    Curiosly enough /usr/bin/env python gives a python 2.7, but still gdb would try to run py3k. This change does not make pyringe work for me: I still have a consistent TimeoutError. But IMO it should not hurt.

    opened by silviot 2
  • attach failed with TimeoutError exception

    attach failed with TimeoutError exception

    I'm running pyringe to try to attach to one python process on Mac platform, and it fails all the time.

    Using pyringe git HEAD code instead of PYPI package. Gdb version: 8.1

    Here is the trace:

    Traceback (most recent call last): File "", line 1, in File "pyringe/repl.py", line 161, in Attach self.inferior.Reinit(pid) File "pyringe/inferior.py", line 484, in Reinit self.init(pid, auto_symfile_loading, architecture=self.arch) File "pyringe/inferior.py", line 456, in init self.StartGdb() File "pyringe/inferior.py", line 503, in StartGdb self._gdb.Attach(self.position) File "pyringe/inferior.py", line 200, in return lambda *args, **kwargs: self._Execute(name, *args, **kwargs) File "pyringe/inferior.py", line 342, in _Execute result_string = self._Recv(timeout) File "pyringe/inferior.py", line 429, in _Recv raise TimeoutError() TimeoutError ==> pid:[71164] #threads:[0] current thread:[None]

    opened by friendwu 1
  • attach failed

    attach failed

    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/repl.py", line 157, in Attach
        self.inferior.Reinit(pid)
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/inferior.py", line 480, in Reinit
        self.__init__(pid, auto_symfile_loading)
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/inferior.py", line 452, in __init__
        self.StartGdb()
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/inferior.py", line 499, in StartGdb
        self._gdb.Attach(self.position)
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/inferior.py", line 197, in <lambda>
        return lambda *args, **kwargs: self._Execute(name, *args, **kwargs)
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/inferior.py", line 339, in _Execute
        result_string = self._Recv(timeout)
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/inferior.py", line 424, in _Recv
        raise ProxyError(exc_text)
    ProxyError: 
    -----------------------------------
    Error occurred within GdbService:
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/payload/gdb_service.py", line 652, in <module>
        serv.EvalLoop()
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/payload/gdb_service.py", line 274, in EvalLoop
        while self._AcceptRPC():
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/payload/gdb_service.py", line 293, in _AcceptRPC
        rpc_result = getattr(self, request['func'])(*request['args'])
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/payload/gdb_service.py", line 428, in Attach
        GdbCache.Refresh()
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/payload/gdb_service.py", line 66, in Refresh
        interp_head_name = GdbCache.FuzzySymbolLookup('interp_head')
      File "/home/yy/code/hzf/boss-be-v2/env/local/lib/python2.7/site-packages/pyringe/payload/gdb_service.py", line 101, in FuzzySymbolLookup
        return '\'%s\'' % mangled_name.group(1)
    AttributeError: 'NoneType' object has no attribute 'group'
    ==> pid:[3779] #threads:[0] current thread:[None]
    >>>  
    
    opened by hotbaby 1
  • syntax error in libpython.py

    syntax error in libpython.py

    I have installed pyringe in my Ubuntu 14.04 which has GDB 7.7.1. Everything installed fine but when start it and attach the process id I get the following error.

    File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pyringe/repl.py", line 161, in Attach self.inferior.Reinit(pid) File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 484, in Reinit self.init(pid, auto_symfile_loading, architecture=self.arch) File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 456, in init self.StartGdb() File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 503, in StartGdb self._gdb.Attach(self.position) File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 200, in return lambda _args, *_kwargs: self._Execute(name, _args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 342, in _Execute result_string = self._Recv(timeout) File "/usr/local/lib/python2.7/dist-packages/pyringe/inferior.py", line 427, in _Recv raise ProxyError(exc_text) ProxyError: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pyringe/payload/gdb_service.py", line 34, in

    ********here it gives the syntax error *********** in the libpython file import libpython File "/usr/local/lib/python2.7/dist-packages/pyringe/payload/libpython.py", line 58 Py_TPFLAGS_HEAPTYPE = (1L << 9)

    Why am I getting that error ?

    opened by sdharav 8
  • Failed to automatically load symbol file

    Failed to automatically load symbol file

    I get this output:

     % python -m pyringe         
    Pyringe (Python 2.7.3) on linux2
    For a list of debugger commands, try "help()". (python's help is available as pyhelp.)
    ==> pid:[None] #threads:[0] current thread:[None]
    >>> attach(30375)
    WARNING:root:Failed to automatically load symbol file, some functionality will be unavailable until symbol file is provided.
    ==> pid:[30375] #threads:[0] current thread:[None]
    >>> threads()
    PositionError: Not attached to any process.
    WARNING:root:Failed to automatically load symbol file, some functionality will be unavailable until symbol file is provided.
    ==> pid:[30375] #threads:[0] current thread:[None]
    >>> 
    

    How can I get more info about why it failed? There is too less information to debug this.

    opened by albertz 1
Owner
Google
Google ❤️ Open Source
Google
Visual Interaction with Code - A portable visual debugger for python

VIC Visual Interaction with Code A simple tool for debugging and interacting with running python code. This tool is designed to make it easy to inspec

Nathan Blank 1 Nov 16, 2021
The official code of LM-Debugger, an interactive tool for inspection and intervention in transformer-based language models.

LM-Debugger is an open-source interactive tool for inspection and intervention in transformer-based language models. This repository includes the code

Mor Geva 105 Nov 18, 2022
Arghonaut is an interactive interpreter, visualizer, and debugger for Argh! and Aargh!

Arghonaut Arghonaut is an interactive interpreter, visualizer, and debugger for Argh! and Aargh!, which are Befunge-like esoteric programming language

Aaron Friesen 2 Dec 10, 2021
pdb++, a drop-in replacement for pdb (the Python debugger)

pdb++, a drop-in replacement for pdb What is it? This module is an extension of the pdb module of the standard library. It is meant to be fully compat

null 1k Nov 30, 2022
Full-screen console debugger for Python

PuDB: a console-based visual debugger for Python Its goal is to provide all the niceties of modern GUI-based debuggers in a more lightweight and keybo

Andreas Klöckner 2.5k Dec 1, 2022
pdb++, a drop-in replacement for pdb (the Python debugger)

pdb++, a drop-in replacement for pdb What is it? This module is an extension of the pdb module of the standard library. It is meant to be fully compat

null 1k Nov 30, 2022
Graphical Python debugger which lets you easily view the values of all evaluated expressions

birdseye birdseye is a Python debugger which records the values of expressions in a function call and lets you easily view them after the function exi

Alex Hall 1.5k Nov 30, 2022
Voltron is an extensible debugger UI toolkit written in Python.

Voltron is an extensible debugger UI toolkit written in Python. It aims to improve the user experience of various debuggers (LLDB, GDB, VDB an

snare 5.8k Nov 29, 2022
NoPdb: Non-interactive Python Debugger

NoPdb: Non-interactive Python Debugger Installation: pip install nopdb Docs: https://nopdb.readthedocs.io/ NoPdb is a programmatic (non-interactive) d

Ondřej Cífka 67 Oct 15, 2022
Tracing instruction in lldb debugger.Just a python-script for lldb.

lldb-trace Tracing instruction in lldb debugger. just a python-script for lldb. How to use it? Break at an address where you want to begin tracing. Im

null 154 Dec 2, 2022
Full featured multi arch/os debugger built on top of PyQt5 and frida

Full featured multi arch/os debugger built on top of PyQt5 and frida

iGio90 1.1k Nov 29, 2022
An improbable web debugger through WebSockets

wdb - Web Debugger Description wdb is a full featured web debugger based on a client-server architecture. The wdb server which is responsible of manag

Kozea 1.6k Nov 26, 2022
PINCE is a front-end/reverse engineering tool for the GNU Project Debugger (GDB), focused on games.

PINCE is a front-end/reverse engineering tool for the GNU Project Debugger (GDB), focused on games. However, it can be used for any reverse-engi

Korcan Karaokçu 1.5k Nov 27, 2022
Little helper to run Steam apps under Proton with a GDB debugger

protongdb A small little helper for running games with Proton and debugging with GDB Requirements At least Python 3.5 protontricks pip package and its

Joshie 21 Nov 27, 2022
A simple rubber duck debugger

Rubber Duck Debugger I found myself many times asking a question on StackOverflow or to one of my colleagues just for finding the solution simply by d

null 1 Nov 10, 2021
Hdbg - Historical Debugger

hdbg - Historical Debugger This is in no way a finished product. Do not use this

Fivreld 2 Jan 2, 2022
Trashdbg - TrashDBG the world's worse debugger

The world's worse debugger Over the course of multiple OALABS Twitch streams we

OALabs 21 Jun 17, 2022
VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

null 2.7k Dec 3, 2022
Monitor Memory usage of Python code

Memory Profiler This is a python module for monitoring memory consumption of a process as well as line-by-line analysis of memory consumption for pyth

Fabian Pedregosa 80 Nov 18, 2022