Current File : //proc/self/root/kunden/usr/share/gdb/python/gdb/dap/__pycache__/modules.cpython-39.pyc
a

ɱZh��@s�ddlZddlmZmZddlmZedd��Zedd��Zed	d
��Zedd��Z	ed
�ed�ddd�e
e
d�dd���ZdS)�N�)�
capability�request)�
in_gdb_threadcCs|jS)z%Return the module ID for the objfile.)�username�Zobjfile�r�(/usr/share/gdb/python/gdb/dap/modules.py�	module_idsr
cCs|��o|jduS)z1Return True if OBJFILE represents a valid Module.N)Zis_valid�ownerrrrr	�	is_modulesrcCs$t|�|jd�}|jr |j|d<|S)z_Return a Module representing the objfile OBJF.

    The objfile must pass the 'is_module' test.)�id�name�path)r
r�is_file�filename)Zobjf�resultrrr	�make_module"s�
rcCsLdd�t��D�}|dkr$t|�}n||}dd�|||�D�t|�d�S)NcSsg|]}t|�r|�qSr)r��.0�xrrr	�
<listcomp>3�z_modules.<locals>.<listcomp>rcSsg|]}t|��qSr)rrrrr	r:r)�modulesZtotalModules)�gdb�objfiles�len)�start�countr�lastrrr	�_modules0s
�r ZsupportsModulesRequestr)�startModule�moduleCountcKs
t||�S)N)r )r!r"�argsrrr	r?s)rZserverrrZstartuprr
rrr �intrrrrr	�<module>s