| Server IP : 107.13.46.68 / Your IP : 216.73.216.232 Web Server : Apache/2.4.58 (Ubuntu) System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/elftools/construct/__pycache__/ |
Upload File : |
�
��d� � � � d Z ddlmZ ddlZddlZddlZddlZddlmZm Z ddl
mZmZm
Z
G d� de� Z G d � d
e � Zy)z$
Debugging utilities for constructs
� )�print_functionN� )� Construct�Subconstruct)� HexString� Container�
ListContainerc �H � e Zd ZdZg d�ZdZ dd�Zd� Zd� Zd� Z d � Z
d
� Zy)�Probea�
A probe: dumps the context, stack frames, and stream content to the screen
to aid the debugging process.
See also Debugger.
Parameters:
* name - the display name
* show_stream - whether or not to show stream contents. default is True.
the stream must be seekable.
* show_context - whether or not to show the context. default is True.
* show_stack - whether or not to show the upper stack frames. default
is True.
* stream_lookahead - the number of bytes to dump when show_stack is set.
default is 100.
Example:
Struct("foo",
UBInt8("a"),
Probe("between a and b"),
UBInt8("b"),
)
)� printname�show_stream�show_context�
show_stack�stream_lookaheadr Nc �� � t j | d � |�-t xj dz
c_ dt j fz }|| _ || _ || _ || _ || _ y )Nr z<unnamed %d>) r �__init__r �counterr r
r r r )�self�namer
r r r s �:/usr/lib/python3/dist-packages/elftools/construct/debug.pyr zProbe.__init__* s^ � � ���4��&��<��M�M�Q��M�!�U�]�]�$4�4�D����&���(���$��� 0��� c �N � | j j �d| j �d�S )N�(�))� __class__�__name__r )r s r �__repr__zProbe.__repr__6 s � ��>�>�2�2�D�N�N�C�Cr c �( � | j ||� y �N��printout�r �stream�contexts r �_parsezProbe._parse8 � � ��
�
�f�g�&r c �( � | j ||� y r r �r �objr# r$ s r �_buildzProbe._build: r&