Sindbad~EG File Manager

Current Path : /usr/local/share/gdb/python/gdb/dap/__pycache__/
Upload File :
Current File : //usr/local/share/gdb/python/gdb/dap/__pycache__/io.cpython-311.pyc

�

��g'��2�ddlZddlmZmZmZmZd�Zd�ZdS)�N�)�LogLevel�log�	log_stack�start_threadc���	d}	|���}t|��dkrtd��dS|���}|dkrnT|�d��r,|dd����}t|��}��td|z����t
��}t|��|kra|�|t|��z
��}t|��dkrtd	��dS||z
}t|��|k�atj	|��S#t$rttj
��YdSwxYw)
zeRead a JSON-RPC message from STREAM.
    The decoded object is returned.
    None is returned on EOF.NTr�EOF�sContent-Length:�zIGNORED: <<<%s>>>zEOF after reading the header)�readline�lenr�strip�
startswith�int�bytes�read�json�loads�OSErrorrr�FULL)�stream�content_length�line�data�new_datas     �./gdb/dap/io.py�	read_jsonrsk�����
	,��?�?�$�$�D��4�y�y�A�~�~��E�
�
�
��t��:�:�<�<�D��s�{�{�����1�2�2�
��B�C�C�y���(�(��!$�T������#�d�*�+�+�+�
	,��w�w���$�i�i�.�(�(��{�{�>�C��I�I�#=�>�>�H��8�}�}��!�!��2�3�3�3��t��H��D�
�$�i�i�.�(�(��z�$���������	�(�-� � � ��t�t�	���s�9E�CE�+E�#E)�(E)c�2�����fd�}td|��S)z�Start the JSON writer thread.
    It will read objects from QUEUE and write them to STREAM,
    following the JSON-RPC protocol.c���d}	����}|�dS||d<|dz}tj|��}|�d��}dt	t|����zdz}|�d��}��|����|��������)NrT�seqzutf-8zContent-Length: z

�ASCII)�getr�dumps�encode�strr
�write�flush)r �obj�encoded�
body_bytes�header�header_bytes�queuers      ��r�_json_writerz'start_json_writer.<locals>._json_writer?s������	��)�)�+�+�C��{����C��J���'�C��j��o�o�G� ����0�0�J�'�#�c�*�o�o�*>�*>�>��K�F�!�=�=��1�1�L��L�L��&�&�&��L�L��$�$�$��L�L�N�N�N�	r
zJSON writer)r)rr-r.s`` r�start_json_writerr/:s4����
������&�
�|�4�4�4r
)r�startuprrrrrr/�r
r�<module>r2s]�� ����;�;�;�;�;�;�;�;�;�;�;�;�"�"�"�J5�5�5�5�5r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists