{"id":16624289,"url":"https://github.com/dcramer/pdbinject","last_synced_at":"2025-07-21T16:03:43.781Z","repository":{"id":9040803,"uuid":"10803616","full_name":"dcramer/pdbinject","owner":"dcramer","description":"A Python utility which uses GDB to inject a telnet-able PDB session into an existing process","archived":false,"fork":false,"pushed_at":"2015-03-04T07:48:16.000Z","size":204,"stargazers_count":57,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-21T15:11:29.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcramer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-19T18:52:05.000Z","updated_at":"2024-07-04T13:46:28.000Z","dependencies_parsed_at":"2022-08-26T18:50:52.618Z","dependency_job_id":null,"html_url":"https://github.com/dcramer/pdbinject","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dcramer/pdbinject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpdbinject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpdbinject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpdbinject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpdbinject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcramer","download_url":"https://codeload.github.com/dcramer/pdbinject/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpdbinject/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266332357,"owners_count":23912660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T03:45:48.446Z","updated_at":"2025-07-21T16:03:43.758Z","avatar_url":"https://github.com/dcramer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Install\n=======\n\nYou'll need GDB compiled with python support, and the ``pdbinject`` package:\n\n::\n\n\teasy_install pdbinject\n\n\nOS X Notes\n----------\n\nThe default GDB does not come compiled with Python support.\n\nHomebrew fixes that:\n\n::\n\n\tbrew install gdb\n\n.. note:: There's more steps, I gave up on figuring out how to make it work.\n\n\nUsage\n=====\n\n::\n\n\t$ python example/loop.py \u0026\n\tProcess running with PID 6319\n\n\t$ sudo pdbinject 6319\n\tRemote PDB has been configured on port 4444\n\n  \t\tnc 127.0.0.1 4444\n\n  \t$ nc 127.0.0.1 4444\n\t--Return--\n\t\u003e /home/ubuntu/pdbinject/pdbinject/debugger.py(16)run()-\u003eNone\n\t-\u003e debugger.set_trace()\n\nNow have some fun:\n\n::\n\n\tfrom guppy import hpy\n\thp = hpy()\n\theap = hp.heap()\n\theap.get_rp()\n\nTo print the stacktrace across all the threads:\n\n::\n\n\timport sys, traceback\n\tfor thread_id, stack in sys._current_frames().iteritems(): print 'Thread id: %s\\n%s' % (thread_id, ''.join(traceback.format_stack(stack)))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcramer%2Fpdbinject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcramer%2Fpdbinject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcramer%2Fpdbinject/lists"}