HEX
Server: LiteSpeed
System: Linux br-asc-web1845.main-hosting.eu 5.14.0-611.42.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 24 05:30:20 EDT 2026 x86_64
User: u790421558 (790421558)
PHP: 8.2.30
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //lib/python3.9/site-packages/elftools/dwarf/__pycache__/dwarf_expr.cpython-39.pyc
a

�#�_
&�P@sHddlmZddlmZmZddlmZmZmZe	ddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdIdJdKdLdMdNdOdPdQdR�NZ
dSdT�Zee
dUdddV�ee
dWdddX�ee
dYdddZ�e	d[d\�ee
�D��Zed]d^�Z
Gd_d`�d`e�Zdadb�ZdcS)d�)�
namedtuple�)�BytesIO�	iteritems)�struct_parse�bytelist2string�	read_blob����	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/���������������������������������������)N�
DW_OP_addr�DW_OP_deref�
DW_OP_const1u�
DW_OP_const1s�
DW_OP_const2u�
DW_OP_const2s�
DW_OP_const4u�
DW_OP_const4s�
DW_OP_const8u�
DW_OP_const8s�DW_OP_constu�DW_OP_consts�	DW_OP_dup�
DW_OP_drop�
DW_OP_over�
DW_OP_pick�
DW_OP_swap�	DW_OP_rot�DW_OP_xderef�	DW_OP_abs�	DW_OP_and�	DW_OP_div�DW_OP_minus�	DW_OP_mod�	DW_OP_mul�	DW_OP_neg�	DW_OP_not�DW_OP_or�
DW_OP_plus�DW_OP_plus_uconst�	DW_OP_shl�	DW_OP_shr�
DW_OP_shra�	DW_OP_xor�	DW_OP_bra�DW_OP_eq�DW_OP_ge�DW_OP_gt�DW_OP_le�DW_OP_lt�DW_OP_ne�
DW_OP_skip�
DW_OP_regx�DW_OP_fbreg�DW_OP_bregx�DW_OP_piece�DW_OP_deref_size�DW_OP_xderef_size�	DW_OP_nop�DW_OP_push_object_address�DW_OP_call2�DW_OP_call4�DW_OP_call_ref�DW_OP_form_tls_address�DW_OP_call_frame_cfa�DW_OP_bit_piece�DW_OP_implicit_value�DW_OP_stack_valueZDW_OP_implicit_pointerZDW_OP_addrxZDW_OP_constxZDW_OP_entry_valueZDW_OP_const_typeZDW_OP_regval_typeZDW_OP_deref_typeZDW_OP_xderef_typeZ
DW_OP_convertZDW_OP_reinterpretZ
DW_OP_lo_user�DW_OP_GNU_push_tls_address�DW_OP_GNU_implicit_pointer�DW_OP_GNU_entry_value�DW_OP_GNU_const_type�DW_OP_GNU_regval_type�DW_OP_GNU_deref_type�DW_OP_GNU_convert�DW_OP_GNU_parameter_refZ
DW_OP_hi_usercCs8t||d�D]$}d||f}|||}|||<qdS)z� Generate values in a map (dict) dynamically. Each key starts with
        a (string) prefix, followed by an index in the inclusive range
        [index_start, index_end]. The values start at value_start.
    �z%s%sN)�range)�map�prefixZindex_startZ	index_endZvalue_start�index�name�value�r��=/usr/lib/python3.9/site-packages/elftools/dwarf/dwarf_expr.py�_generate_dynamic_valuesasr�Z	DW_OP_lit�0Z	DW_OP_reg�PZ
DW_OP_breg�pccs|]\}}||fVqdS�Nr�)�.0�k�vr�r�r��	<genexpr>p�r��DWARFExprOpzop op_name argsc@s eZdZdZdd�Zdd�ZdS)�DWARFExprParserz�DWARF expression parser.

    When initialized, requires structs to cache a dispatch table. After that,
    parse_expr can be called repeatedly - it's stateless.
    cCst|�|_dSr�)�_init_dispatch_table�_dispatch_table)�self�structsr�r�r��__init__szDWARFExprParser.__init__c	Csltt|��}g}|�d�}t|�dkr(qht|�}t�|d|�}|j|}||�}|�t	|||d��q|S)zs Parses expr (a list of integers) into a list of DWARFExprOp.

        The list can potentially be nested.
        r�rzOP:0x%x)�op�op_name�args)
rr�read�len�ord�DW_OP_opcode2name�getr��appendr�)	r��expr�stream�parsedZbyter�r�Z
arg_parserr�r�r�r��
parse_expr�s

zDWARFExprParser.parse_exprN)�__name__�
__module__�__qualname__�__doc__r�r�r�r�r�r�r�xsr�csZi��fdd�}dd�}�fdd�}dd�}d	d
�}�fdd�}�fd
d�}�fdd�}|d|��|d|��d���|d|��d���|d|��d���|d|��d���|d|��d���|d|��d���|d|��d���|d|��d���|d|��d���|d|��	d���|d|��d���|d|��d���|d|��d���|d |��d���d!D]}	||	|���q�t
d"d#�D]>}
|d$|
|��|d%|
|��|d&|
|��	d����q�|d'|��	d���|d(|��d���|d)|��d���	d���|d*|��d���|d+|��d���d���|d,|��d���|d-|��d���|d.|��d���|d/|��d���|d0|��d���|d1|��|d2|��|d3|��|d4|��d���d���|d5|��d���d���|d6|��d���	d���|d7|��d���|d8|��d����S)9aCreates a dispatch table for parsing args of an op.

    Returns a dict mapping opcode to a function. The function accepts a stream
    and return a list of parsed arguments for the opcode from the stream;
    the stream is advanced by the function as needed.
    cs|�t|<dSr�)�DW_OP_name2opcode)Zopcode_name�func)�tabler�r��add�sz!_init_dispatch_table.<locals>.addcSsdd�S)NcSsgSr�r��r�r�r�r��<lambda>�r�z<_init_dispatch_table.<locals>.parse_noargs.<locals>.<lambda>r�r�r�r�r��parse_noargs�sz*_init_dispatch_table.<locals>.parse_noargscs�fdd�S)Ncst��d�|�gS�N�)rZDwarf_target_addrr��r�r�r�r��s
�z=_init_dispatch_table.<locals>.parse_op_addr.<locals>.<lambda>r�r�r�r�r��
parse_op_addr�sz+_init_dispatch_table.<locals>.parse_op_addrcs�fdd�S)Ncst�|�gSr��rr��Z
arg_structr�r�r��r�z@_init_dispatch_table.<locals>.parse_arg_struct.<locals>.<lambda>r�r�r�r�r��parse_arg_struct�sz._init_dispatch_table.<locals>.parse_arg_structcs��fdd�S)Ncst�|�t�|�gSr�r�r��Zarg1_structZarg2_structr�r�r��s�zA_init_dispatch_table.<locals>.parse_arg_struct2.<locals>.<lambda>r�r�r�r�r��parse_arg_struct2�sz/_init_dispatch_table.<locals>.parse_arg_struct2cs�fdd�}|S)Ncs*t��d�|�}t||�}t���|�gSr�)r�
Dwarf_uleb128rr�r�)r��sizeZnested_expr_blobr�r�r��parse�s
z=_init_dispatch_table.<locals>.parse_nestedexpr.<locals>.parser�)r�r�r�r��parse_nestedexpr�sz._init_dispatch_table.<locals>.parse_nestedexprcs�fdd�S)Ncst|t��d�|��gSr�)rrr�r�r�r�r�r��r�z:_init_dispatch_table.<locals>.parse_blob.<locals>.<lambda>r�r�r�r�r��
parse_blob�sz(_init_dispatch_table.<locals>.parse_blobcs�fdd�S)Ncs&t��d�|�t|t��d�|��gSr�)rr�r�Dwarf_uint8r�r�r�r�r��r�z?_init_dispatch_table.<locals>.parse_typedblob.<locals>.<lambda>r�r�r�r�r��parse_typedblob�sz-_init_dispatch_table.<locals>.parse_typedblobrVrXr�rYrZr[r\r]r^r_r`rarersrxr)"rWrbrcrdrfrfrgrhrirjrkrlrmrnrorprqrrrtrurvrwryrzr{r|r}r~r�r�r�r�r�r�rr#zDW_OP_lit%szDW_OP_reg%szDW_OP_breg%sr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r�Z
Dwarf_int8ZDwarf_uint16ZDwarf_int16ZDwarf_uint32ZDwarf_int32ZDwarf_uint64ZDwarf_int64r�Z
Dwarf_sleb128r�ZDwarf_offset)r�r�r�r�r�r�r�r�r��opname�nr�)r�r�r�r��sv
�����r�N)�collectionsrZcommon.py3compatrrZcommon.utilsrrr�dictr�r�r�r��objectr�r�r�r�r�r��<module>	s��Q

&