Your IP : 216.73.216.213
B
��Fda � @ sj d Z ddlZddlZddlZddlZddlZddlZddlZddlZe� e
�Zd
dd�ZdZ
ddd �ZdS )a
The Cython debugger
The current directory should contain a directory named 'cython_debug', or a
path to the cython project directory should be given (the parent directory of
cython_debug).
Additional gdb args can be provided only if a path to the project directory is
given.
� N� Fc C s� |s<t j�| dd�}t�|�}|s<t�dtt j�| �f � t� � \}}t �
|d�}z�|�|� |�t�
d�� |rvnht j�| dd�}t|�} z| �� }
W d | �� X |�d|
� |�d�d d
� |D ��� |�t�
d�� W d |�� X |S )NZcython_debugzcython_debug_info_*z.%s.
No debug files were found in %s. Aborting.�waV # This is a gdb command file
# See https://sourceware.org/gdb/onlinedocs/gdb/Command-Files.html
set breakpoint pending on
set print pretty on
python
# Activate virtualenv, if we were launched from one
import os
virtualenv = os.getenv('VIRTUAL_ENV')
if virtualenv:
path_to_activate_this_py = os.path.join(virtualenv, 'bin', 'activate_this.py')
print("gdb command file: Activating virtualenv: %s; path_to_activate_this_py: %s" % (
virtualenv, path_to_activate_this_py))
with open(path_to_activate_this_py) as f:
exec(f.read(), dict(__file__=path_to_activate_this_py))
from Cython.Debugger import libcython, libpython
end
�interpreterzfile %s
�
c s s | ]}d | V qdS )z
cy import %s
N� )�.0�fnr r �H/opt/alt/python37/lib64/python3.7/site-packages/Cython/Debugger/Cygdb.py� <genexpr>I s z$make_command_file.<locals>.<genexpr>a� python
import sys
try:
gdb.lookup_type('PyModuleObject')
except RuntimeError:
sys.stderr.write(
'Python was not compiled with debug symbols (or it was '
'stripped). Some functionality may not work (properly).\n')
end
source .cygdbinit
)�os�path�join�glob�sys�exit�usage�abspath�tempfile�mkstemp�fdopen�write�textwrap�dedent�open�read�close)�path_to_debug_infoZprefix_code� no_import�patternZdebug_files�fd�tempfilename�fr Zinterpreter_filer r r r �make_command_file s6
r"