debian/0000755000000000000000000000000011750307034007166 5ustar debian/examples0000644000000000000000000000002111574675226010737 0ustar gdb.py strace.py debian/pycompat0000644000000000000000000000000211574675226010754 0ustar 2 debian/rules0000755000000000000000000000037011750306626010254 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 override_dh_auto_install: dh_auto_install # do not install examples as real executables rm -rf $(CURDIR)/debian/python-ptrace/usr/bin %: dh $@ --with=python2 debian/watch0000644000000000000000000000040511574675226010235 0ustar # watch control file for uscan # Run the "uscan" command to check for upstream updates and more. # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 http://pypi.python.org/packages/source/p/python-ptrace/python-ptrace-(.*).tar.gz debian/patches/0000755000000000000000000000000011747000542010615 5ustar debian/patches/10-set_errno_to_0_if_no_error.patch0000644000000000000000000000334211747000542017362 0ustar Index: python-ptrace/cptrace/cptrace.c =================================================================== --- python-ptrace.orig/cptrace/cptrace.c 2012-04-28 12:03:07.145652296 +0200 +++ python-ptrace/cptrace/cptrace.c 2012-04-28 16:40:15.941112538 +0200 @@ -21,6 +21,7 @@ unsigned long *result) { unsigned long ret; + errno = 0; ret = ptrace(request, pid, arg1, arg2); if ((long)ret == -1) { /** Index: python-ptrace/ptrace/binding/func.py =================================================================== --- python-ptrace.orig/ptrace/binding/func.py 2011-06-11 16:24:42.000000000 +0200 +++ python-ptrace/ptrace/binding/func.py 2012-04-28 16:40:25.897112573 +0200 @@ -118,6 +118,7 @@ except ImportError: HAS_CPTRACE = False from ctypes import c_long, c_ulong + from ctypes import get_errno, set_errno from ptrace.ctypes_libc import libc # Load ptrace() function from the system C library @@ -134,6 +135,7 @@ errno = get_errno() raise PtraceError(message, errno=errno, pid=pid) else: + set_errno(0) result = _ptrace(command, pid, arg1, arg2) result_signed = c_long(result).value if result_signed == -1: Index: python-ptrace/ptrace/ctypes_libc.py =================================================================== --- python-ptrace.orig/ptrace/ctypes_libc.py 2011-06-11 16:24:22.000000000 +0200 +++ python-ptrace/ptrace/ctypes_libc.py 2012-04-28 16:40:25.897112573 +0200 @@ -4,9 +4,9 @@ - libc: the loaded library """ -from ctypes import cdll +from ctypes import CDLL from ctypes.util import find_library LIBC_FILENAME = find_library('c') -libc = cdll.LoadLibrary(LIBC_FILENAME) +libc = CDLL(LIBC_FILENAME, use_errno=True) debian/patches/series0000644000000000000000000000004411747000460012027 0ustar 10-set_errno_to_0_if_no_error.patch debian/changelog0000644000000000000000000000371311750306646011054 0ustar python-ptrace (0.6.4-2) unstable; urgency=low * Build with python support in dehelper (Closes: #671054) -- Pierre Chifflier Wed, 02 May 2012 21:35:58 +0200 python-ptrace (0.6.4-1) unstable; urgency=low * Imported Upstream version 0.6.4 - This version should work on kfreebsd (Closes: #592637) * Bump Standards Version to 3.9.3 * Switch to DH 9 * Convert debian/rules to dh format * Fix bad errno handling in ptrace.binding.func.ptrace (Closes: #592648) Thanks to Jakub Wilk for the patch. -- Pierre Chifflier Sat, 28 Apr 2012 16:49:32 +0200 python-ptrace (0.6.3-1) unstable; urgency=low * Imported Upstream version 0.6.3 * Bump Standards Version to 3.9.1 * Fix build-dep (use python-all instead of python-dev-all) * Update licence for debian packaging * Switch to dpkg-source 3.0 (quilt) format -- Pierre Chifflier Mon, 28 Mar 2011 22:00:45 +0200 python-ptrace (0.6.2-1) unstable; urgency=low * New upstream release * Bump standards version to 3.8.3 (no changes) -- Pierre Chifflier Thu, 17 Dec 2009 21:44:09 +0100 python-ptrace (0.6-2) unstable; urgency=low * Set minimum Python version to 2.5 (Closes: #516946) -- Pierre Chifflier Tue, 24 Feb 2009 18:17:58 +0100 python-ptrace (0.6-1) unstable; urgency=low * New Upstream Version * Upload to unstable -- Pierre Chifflier Tue, 24 Feb 2009 14:22:15 +0100 python-ptrace (0.5-1) experimental; urgency=low * New upstream release * Update watch file -- Pierre Chifflier Thu, 18 Sep 2008 16:57:23 +0200 python-ptrace (0.3.2-1) unstable; urgency=low * New upstream release * Add watch file -- Pierre Chifflier Mon, 28 Jul 2008 10:38:22 +0200 python-ptrace (0.3.1-1) unstable; urgency=low * Initial release (Closes: #491060) -- Pierre Chifflier Wed, 16 Jul 2008 10:31:47 +0200 debian/control0000644000000000000000000000165711746772123010614 0ustar Source: python-ptrace Section: python Priority: extra Maintainer: Pierre Chifflier Build-Depends: debhelper (>= 9), python-support, python-all (>= 2.3.5-11) Standards-Version: 3.9.3 Homepage: http://fusil.hachoir.org/trac/wiki/Ptrace Package: python-ptrace Architecture: all XB-Python-Version: ${python:Versions} Depends: ${python:Depends}, ${misc:Depends} Provides: ${python:Provides} Description: Python bindings for ptrace This package provides Python bindings for the ptrace library. It allows to control, debug, or modify processes using the ptrace syscall. . Features: * High level Python object API * Able to control multiple processes: catch fork events * Read/write bytes to arbitrary addresses * Execution step by step using ptrace_singlestep() or hardware int 3 * Can use distorm disassembler * Dump registers, memory mappings, stack, etc. * Syscall tracer and parser (strace command) debian/docs0000644000000000000000000000001411574675226010053 0ustar README TODO debian/source/0000755000000000000000000000000011574675251010503 5ustar debian/source/format0000644000000000000000000000001411574675251011711 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211746771525010403 0ustar 9 debian/copyright0000644000000000000000000000242611574675226011144 0ustar This package was debianized by Pierre Chifflier on Wed, 16 Jul 2008 10:31:47 +0200. It was downloaded from http://fusil.hachoir.org/trac/wiki/Ptrace Upstream Author: Victor Stinner Copyright (C) 2006,2007,2008 Victor Stinner License: This library is released under the GPLv2 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is (C) 2008-2011, Pierre Chifflier and is licensed under the GPL version 2, see `/usr/share/common-licenses/GPL-2'. debian/pyversions0000644000000000000000000000000511747000531011323 0ustar 2.6-