Your IP : 216.73.216.213
���^a � @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z e j e
� Z d d d d � Z d Z
d d d d d � Z d S)
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 sH | sV t j j | d d � } t j | � } | sV t j d t t j j | � f � t j � \ } } t j
| d � } z� | j | � | j t j
d � � | r� n� t j j | d d � } t | � } z | j � }
Wd | j � X| j d |
� | j d j d d
� | D� � � | j t j
d � � Wd | j � 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 | Vq d S)z
cy import %s
N� )�.0�fnr r �H/opt/alt/python35/lib64/python3.5/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"