Current File : //proc/self/root/kunden/usr/share/gdb/python/gdb/dap/__pycache__/io.cpython-39.opt-1.pyc |
a
ɱZh( � @ s0 d dl Z ddlmZmZmZ dd� Zdd� ZdS )� N� )�start_thread�send_gdb�logc C s� d}| � � }|�� }|dkrqP|�d�rB|dd� �� }t|�}qtd| � qt� }t|�|k r~| �|t|� �}||7 }qVt� |�}|S )zHRead a JSON-RPC message from STREAM.
The decoded object is returned.N� s Content-Length:� zIGNORED: <<<%s>>>)
�readline�strip�
startswith�intr �bytes�len�read�json�loads)�streamZcontent_length�line�dataZnew_data�result� r �#/usr/share/gdb/python/gdb/dap/io.py� read_json s
r c s � �fdd�}t d|� dS )z�Start the JSON writer thread.
It will read objects from QUEUE and write them to STREAM,
following the JSON-RPC protocol.c s� d} � � � }|d u rtd� q~| |d<