Edit File: ptrace_syscall.cpython-36.pyc
3 �e� � @ s: d dl mZ d dlmZ d dlmZmZmZmZm Z d dl mZmZm Z d dlmZ d dlmZmZmZ d dlmZ d dlmZmZ d d lmZ d d lmZ er�dZn6er�dZn,e r�d Zn"er�er�dZq�dZner�dZndZer�dZn4e r�dZn*er�dZn e�rdZne�rdZned��dddd�ZG dd� de�Z dS )� )�strerror)� errorcode)� CPU_X86_64�CPU_POWERPC�CPU_I386� CPU_ARM32�CPU_AARCH64)� ulong2long� formatAddress� formatWordHex)�FunctionCall)� SYSCALL_NAMES�SYSCALL_PROTOTYPES�SyscallArgument)�setupSocketCall)� RUNNING_LINUX�RUNNING_BSD)� CPU_WORD_SIZE)�CPU_INSTR_POINTERZgpr0�r7�r8Zorig_raxZorig_eaxZraxZeax�r0�resultzUnsupported CPU architecture� � � )�select�execve�clonec @ sH e Zd Zddd�Zddd�Zdd� Zdd � Zd d� Zdd � Zdd� Z dS )� PtraceSyscallNc C sJ t j| d|t� || _d| _d | _d | _d | _|s<| jj� }| j |� d S )N�syscall�long) r �__init__r �process�restyper �result_text� instr_pointer�getregs�readSyscall)�selfr# �options�regs� r, �F/tmp/pip-build-uv1wutoy/python-ptrace/ptrace/syscall/ptrace_syscall.pyr"