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__/descriptions.cpython-39.opt-1.pyc
a

�#�_�^�4@s�ddlmZddlTddlmZddlmZddlmZm	Z	ddl
mZdd	lm
Z
mZmZd
d�Zdd
�Zdd�Zdd�Zdd�Zd�dd�Zd�dd�Zdd�Zdadd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Z d,d-�Z!d.d/�Z"ed0d1�eeeeeeeeeee eeeeeee"e"e"e"e!e"ed2�Z#e$d3d4d4d5d5d5d6d4d4d5d7d5d6d5d8d8d8d8d8d8ddd9d7d8d:�Z%e&d;e'd<e(d=e)d>iZ*e+d?e,d@e-dAe.dBe/dCe0dDe1dEe2dFe3dGe4dHe5dIe6dJe7dKe8dLe9dMe:dNe;dOe<dPe=dQe>dRe?dSe@dTeAdUeBdVeCdWeDdXiZEeFdYeGdZeHd[eId\eJd]eKd^eLd_eMd`eNdaeOdbePdceQddeRdeeSdfeTdgeUdheVdieWdjeXdkeYdleZdme[dne\doe]dpiZ^e_dqe`dreadsiZbecdteddueedviZfegdwehdxeidyiZjekdzeld{emd|end}iZoepd~eqderd�iZsetd�eud�iZve$d�d�d�d�d�d�d�d�d��Zwd�d�d��Zxd�d�d��ZyiZzd�d��Z{d�d��Z|d�d��Z}ed�d1�exe*d�dd��exeEd�dd��exe^d��exebd��exefd��exejd��exeod��exesd��exevd��e{e{e{e{e|e{e{e{e{e{e{e{e{e}e{e{e{e{d��Z~gd��Zgd��Z�gd��Z�Gd�d��d�e��Z�dS)��)�defaultdict�)�*)�DWARFExprParser)�DIE�)�preserve_stream_pos�dwarf_assert)�	bytes2str)�instruction_name�CIE�FDEcCs|adS�N)�
_MACHINE_ARCH)�machine_arch�r�?/usr/lib/python3.9/site-packages/elftools/dwarf/descriptions.py�set_global_machine_archsrcCs<t|j}||||�}t|j}||||�}t|�d|S)aE Given an attribute attr, return the textual representation of its
        value, suitable for tools like readelf.

        To cover all cases, this function needs some extra arguments:

        die: the DIE this attribute was extracted from
        section_offset: offset in the stream of the section the DIE belongs to
    �	)�_ATTR_DESCRIPTION_MAP�form�_EXTRA_INFO_DESCRIPTION_MAP�name�str)�attr�die�section_offsetZ
descr_funcZval_descriptionZextra_info_funcZ
extra_inforrr�describe_attr_values
	

rc
	s^�fdd�}dd�}t�t�r$�}n�j}�d}d}�jD�]}t|j�}|dvr�|d|||jd	�|jd
|df7}q<|dvr�|d
|||jd	�f7}q<|dkr�|d|||jd	�||jd
�f7}q<|dk�r�|jd	}|d||f7}q<|dv�r>||�|jd	|d}|d||||f7}||7}q<|dv�rV|d|7}q<|dk�r�|d|||jd	�|jd
f7}q<|dk�r�|d|||jd	�|jd
|df7}q<|dv�r�|d
||jd	f7}q<|dk�rt�j�}	|d||	�	|jd	�f7}q<|dk�rLt�j�}	|d|||jd	�|	�	|jd
�f7}q<|d|7}q<|S) za Given a CFI entry (CIE or FDE), return the textual description of its
        instructions.
    cstt�t�d|�dS)Nz%Unexpected instruction "%s" for a CIE)r	�
isinstancer
)�instr��entryrr�_assert_FDE_instruction.s�z:describe_CFI_instructions.<locals>._assert_FDE_instructioncSs(t|td�}|rd||fSd|SdS)NFzr%s (%s)�r%s)�describe_reg_namer)�regnumZregnamerrr�_full_reg_name3sz1describe_CFI_instructions.<locals>._full_reg_nameZinitial_location�)Z
DW_CFA_offsetZDW_CFA_offset_extendedZDW_CFA_offset_extended_sfZDW_CFA_val_offsetZDW_CFA_val_offset_sfz  %s: %s at cfa%+d
rrZdata_alignment_factor)ZDW_CFA_restoreZDW_CFA_restore_extendedZDW_CFA_undefinedZDW_CFA_same_valueZDW_CFA_def_cfa_registerz	  %s: %s
ZDW_CFA_registerz  %s: %s in %sZDW_CFA_set_locz  %s: %08x
)ZDW_CFA_advance_loc1ZDW_CFA_advance_loc2ZDW_CFA_advance_loc4ZDW_CFA_advance_locZcode_alignment_factorz  %s: %s to %08x
)ZDW_CFA_remember_stateZDW_CFA_restore_stateZ
DW_CFA_nopz  %s
ZDW_CFA_def_cfaz  %s: %s ofs %s
ZDW_CFA_def_cfa_sf)ZDW_CFA_def_cfa_offsetZDW_CFA_GNU_args_sizeZDW_CFA_def_cfa_expressionz
  %s (%s)
ZDW_CFA_expressionz  %s: %s (%s)
z  %s: <??>
)
rr�cieZinstructionsr�opcode�args�
ExprDumper�structs�	dump_expr)
r!r"r&r(Zpc�srrZfactored_offsetZexpr_dumperrr r�describe_CFI_instructions*sn

�
�




�


�

�





�
r/cCs@t|j}|jdvr$|d|j7}n|jdkr<|t|j�7}|S)N)�OFFSET�
VAL_OFFSETz%+d�REGISTER)�_DESCR_CFI_REGISTER_RULE_TYPE�type�argr$)�ruler.rrr�describe_CFI_register_rulews


r7cCs"|jr
dSdt|j�|jfSdS)N�expz%s%+d)�exprr$Zreg�offset)r6rrr�describe_CFI_CFA_rule�sr;NcCs8t|�}|tvrt|�t|<t|}d|�||�dS)z� Textual description of a DWARF expression encoded in 'expr'.
        structs should come from the entity encompassing the expression - it's
        needed to be able to parse it correctly.
    �(�))�id�_DWARF_EXPR_DUMPER_CACHEr+r-)r9r,�	cu_offsetZ	cache_keyZdwarf_expr_dumperrrr�describe_DWARF_expr�s�rATcCsP|durt}|dkrt|S|dkr,t|S|dkr<t|S|rHd|SdSdS)z} Provide a textual description for a register name, given its serial
        number. The number is expected to be valid.
    NZx86Zx64ZAArch64r#)r�_REG_NAMES_x86�_REG_NAMES_x64�_REG_NAMES_AArch64)r%r�defaultrrrr$�sr$cCst|S)aFor a given form name, determine its value class.

    For example, given 'DW_FORM_data1' returns 'constant'.

    For some forms, like DW_FORM_indirect and DW_FORM_sec_offset, the class is
    not hard-coded and extra information is required. For these, None is
    returned.
    )�_FORM_CLASS)rrrr�describe_form_class�s	rGcCsd|j|jjS�Nz<0x%x>)�value�cur@�rrrrrr�_describe_attr_ref�srLcCs|jSr�rIrKrrr� _describe_attr_value_passthrough�srNcCs
d|jS)Nz0x%xrMrKrrr�_describe_attr_hex�srOcCs
d|jSrHrMrKrrr�_describe_attr_hex_addr�srPcCs$|jd@}|jd?d@}d||fS)Nl��� z	0x%x 0x%xrM)rrrZlow_wordZ	high_wordrrr�_describe_attr_split_64bit�s
rRcCsd|jt|j�fS)Nz#(indirect string, offset: 0x%x): %s)Z	raw_valuer
rIrKrrr�_describe_attr_strp�s�rScCs
t|j�Sr)r
rIrKrrr�_describe_attr_string�srTcCs|jr
dSdS)zZ To be consistent with readelf, generate 1 for True flags, 0 for False
        flags.
    �1�0rMrKrrr�_describe_attr_debool�srWcCsdS)zc Some forms may simply mean that an attribute is present,
        without providing any value.
    rUrrKrrr�_describe_attr_present�srXcCs0dt|j�}|d�dd�|jD��d7}|S)Nz%s byte block: � css|]}d|VqdS�z%xNr)�.0�itemrrr�	<genexpr>��z'_describe_attr_block.<locals>.<genexpr>)�lenrI�join)rrrr.rrr�_describe_attr_block�sracCstSr)rNrrrr�<lambda>�r^rb)�DW_FORM_ref1�DW_FORM_ref2�DW_FORM_ref4�DW_FORM_ref8�DW_FORM_ref_udata�DW_FORM_ref_addr�
DW_FORM_data4�
DW_FORM_data8�DW_FORM_addr�DW_FORM_sec_offset�DW_FORM_flag�
DW_FORM_data1�
DW_FORM_data2�
DW_FORM_sdata�
DW_FORM_udata�DW_FORM_string�DW_FORM_strp�DW_FORM_block1�DW_FORM_block2�DW_FORM_block4�
DW_FORM_block�DW_FORM_flag_present�DW_FORM_exprloc�DW_FORM_ref_sig8Zaddress�blockZconstant�string�flagZ	referenceZexprloc)rkrurvrorirjrrrwrtrnrmrprsrqrhrcrdrerfrgZDW_FORM_indirectrlryrxrzz
(not inlined)z	(inlined)z (declared as inline but ignored)z (declared as inline and inlined)z(ANSI C)z(non-ANSI C)z(Ada)z(C++)z
(Cobol 74)z
(Cobol 85)z(FORTRAN 77)z(Fortran 90)z
(ANSI Pascal)z
(Modula 2)z(Java)z
(ANSI C99)z(ADA 95)z(Fortran 95)z(PLI)z
(Objective C)z(Objective C++)z(Unified Parallel C)z(D)z(Python)z(MIPS assembler)z
(HP Bliss)z
(HP Basic 91)z(HP Pascal 91)z(HP IMacro)z(HP assembler)z(void)z(machine address)z	(boolean)z(complex float)z(float)z(signed)z
(signed char)z
(unsigned)z(unsigned char)z(imaginary float)z(decimal float)z(packed_decimal)z(numeric_string)z(edited)z(signed_fixed)z(unsigned_fixed)z(unicode string)z(HP_float80)z(HP_complex_float80)z
(HP_float128)z(HP_complex_float128)z(HP_floathpintel)z(HP_imaginary_float80)z(HP_imaginary_float128)z(public)z(protected)z	(private)z(local)z
(exported)z(qualified)z(none)z	(virtual)z(pure virtual)z(case_sensitive)z	(up_case)z(down_case)z(case_insensitive)z(normal)z	(program)z(nocall)z(row major)z(column major)�ur.�c�vr'r8Zvexp�a)Z	UNDEFINEDZ
SAME_VALUEr0r1r2Z
EXPRESSIONZVAL_EXPRESSIONZ
ARCHITECTURALFcs���fdd�}|S)zm Create a mapping function from attribute parameters to an extra
        value that should be displayed.
    cs"�r�|j}n�}��|j|�Sr)rI�get)rrr�d�rE�default_interpolate_value�mappingrr�mapper�sz"_make_extra_mapper.<locals>.mapperr)r�rEr�r�rr�r�_make_extra_mapper�sr�cs�fdd�}|S)zC Create an extra function that just returns a constant string.
    cs�SrrrK�r.rr�extra�sz!_make_extra_string.<locals>.extrar)r.r�rr�r�_make_extra_string�sr�cCs(|jdvrdSt|j|jj|jj�SdS)N)rirjrlz(location list))rrArIrJr,r@rKrrr�_location_list_extra�s
r�cCs<|jdvrdS|jdkr"t|j�St|j|jj|jj�SdS)N)rnrorirjr'rp)rrrIrArJr,r@rKrrr�_data_member_location_extra�s



r�c	Cs�|jdkr||j}n|j|jj}|j��D]t}|d|j|krR|jkr.nq.t|j��t||j|�}Wd�n1s�0Yd|j	|j
fSq.dS)NrhZunit_lengthz[Abbrev Number: %s (%s)]z	[unknown])rrIrJr@Z	dwarfinfoZiter_CUsr�streamrZabbrev_code�tag)rrrZref_die_offsetrJZref_dierrr�
_import_extra�s
$,�r�cCstd�S)Nr')r�rrrrrb�r^z#(Unknown inline attribute value: %x)r�z
(Unknown: %x)z(unknown type)z(unknown accessibility)z(unknown visibility)z(unknown virtuality)z(unknown case)z(unknown convention)z(undefined))ZDW_AT_inlineZDW_AT_languageZDW_AT_encodingZDW_AT_accessibilityZDW_AT_visibilityZDW_AT_virtualityZDW_AT_identifier_caseZDW_AT_calling_conventionZDW_AT_orderingZDW_AT_frame_baseZDW_AT_locationZDW_AT_string_lengthZDW_AT_return_addrZDW_AT_data_member_locationZDW_AT_vtable_elem_locationZ
DW_AT_segmentZDW_AT_static_linkZDW_AT_use_locationZDW_AT_allocatedZDW_AT_associatedZDW_AT_data_locationZDW_AT_strideZDW_AT_importZDW_AT_GNU_call_site_valueZDW_AT_GNU_call_site_data_valueZDW_AT_GNU_call_site_targetZ$DW_AT_GNU_call_site_target_clobbered)2ZeaxZecxZedxZebxZespZebpZesiZediZeipZeflags�<none>�st0�st1�st2�st3�st4�st5�st6�st7r�r��xmm0�xmm1�xmm2�xmm3�xmm4�xmm5�xmm6�xmm7�mm0�mm1�mm2�mm3�mm4�mm5�mm6�mm7�fcw�fsw�mxcsr�es�cs�ss�ds�fs�gsr�r��tr�ldtr)CZraxZrdxZrcxZrbxZrsiZrdiZrbpZrsp�r8Zr9Zr10Zr11Zr12Zr13Zr14Zr15Zripr�r�r�r�r�r�r�r�Zxmm8Zxmm9Zxmm10Zxmm11Zxmm12Zxmm13Zxmm14Zxmm15r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Zrflagsr�r�r�r�r�r�r�r�zfs.basezgs.baser�r�r�r�r�r�r�) Zx0Zx1Zx2Zx3Zx4Zx5Zx6Zx7Zx8Zx9Zx10Zx11Zx12Zx13Zx14Zx15Zx16Zx17Zx18Zx19Zx20Zx21Zx22Zx23Zx24Zx25Zx26Zx27Zx28Zx29Zx30�spc@s4eZdZdZdd�Zddd�Zdd�Zdd	d
�ZdS)
r+z� A dumper for DWARF expressions that dumps a textual
        representation of the complete expression.

        Usage: after creation, call dump_expr repeatedly - it's stateless.
    cCs||_t|j�|_|��dSr)r,r�expr_parser�
_init_lookups)�selfr,rrr�__init__$szExprDumper.__init__Nc	Cs@|j�|�}g}|D] }|�|�|j|j|j|��qd�|�S)a� Parse and dump a DWARF expression. expr should be a list of
            (integer) byte values. cu_offset is the cu_offset
            value from the CU object where the expression resides.
            Only affects a handful of GNU opcodes, if None is provided,
            that's not a crash condition, only the expression dump will
            not be consistent of that of readelf.

            Returns a string representing the expression.
        z; )r�Z
parse_expr�append�_dump_to_string�op�op_namer*r`)r�r9r@�parsedr.�deorrrr-)s

zExprDumper.dump_exprcCsNtgd��|_tdd�D]}|j�d|�qtddg�|_tgd��|_dS)N)Z
DW_OP_const1uZ
DW_OP_const1sZ
DW_OP_const2uZ
DW_OP_const2sZ
DW_OP_const4uZ
DW_OP_const4sZ
DW_OP_const8uZ
DW_OP_const8sZDW_OP_constuZDW_OP_constsZ
DW_OP_pickZDW_OP_plus_uconstZ	DW_OP_braZ
DW_OP_skipZDW_OP_fbregZDW_OP_pieceZDW_OP_deref_sizeZDW_OP_xderef_sizeZ
DW_OP_regxrrQzDW_OP_breg%sZDW_OP_bregxZDW_OP_bit_piece)Z
DW_OP_addrZDW_OP_call2ZDW_OP_call4ZDW_OP_call_ref)�set�_ops_with_decimal_arg�range�add�_ops_with_two_decimal_args�_ops_with_hex_arg)r��nrrrr�9s�zExprDumper._init_lookupsc	sZ|durd}t|�dkrL|�d�rDt|dd��}d|t|t�fS|S�n
|�jvr�|�d�r�t|dd��}d|t|t�|dfS|�d�r�d	||dt|dt�fSd
||dfS�n�|�jvr�d||dfS|�jv�r�d||d|d
fS|dk�r,d|d�	�fdd�|dD��fS|dk�r`d|t|d�d�	dd�|dD��fS|dk�r~d||d|fS|dk�r�d||d|d
fS|dk�r�d||d|fS|dk�r�d||d|d
|fS|dk�rd ||d|t|d
�d!�	d"d#�|d
D��fS|d$k�rNd%||dt|dt�|d
|fSd&|SdS)'NrZ	DW_OP_reg�	z%s (%s)Z
DW_OP_breg�
z%s (%s): %sZregxz%s: %s (%s)z%s: %sz%s: %xz	%s: %s %srZDW_OP_GNU_entry_valuez%s: (%s)�,cs g|]}��|j|j|j��qSr)r�r�r�r*)r[r��r�rr�
<listcomp>mr^z.ExprDumper._dump_to_string.<locals>.<listcomp>ZDW_OP_implicit_valuez%s %s byte block: %sr'cSsg|]}d|�qS)z%x r�r[�brrrr�or^ZDW_OP_GNU_parameter_refz
%s: <0x%x>ZDW_OP_GNU_implicit_pointerz
%s: <0x%x> %dZDW_OP_GNU_convertz	%s <0x%x>ZDW_OP_GNU_deref_typez
%s: %d <0x%x>ZDW_OP_GNU_const_typez%s: <0x%x>  %d byte block: %s rYcss|]}d|VqdSrZrr�rrrr]yr^z-ExprDumper._dump_to_string.<locals>.<genexpr>ZDW_OP_GNU_regval_typez%s: %d (%s) <0x%x>z<unknown %s>)
r_�
startswith�intr$rr��endswithr�r�r`)r�r)Zopcode_namer*r@r%rr�rr�Is\
�

�
�

$
*




4
&zExprDumper._dump_to_string)N)N)�__name__�
__module__�__qualname__�__doc__r�r-r�r�rrrrr+s

r+)N)NT)F)r')��collectionsrZ	constantsZ
dwarf_exprrrrZcommon.utilsrr	Zcommon.py3compatr
Z	callframerrr
rrr/r7r;rAr$rGrrLrNrOrPrRrSrTrWrXrar�dictrFZDW_INL_not_inlinedZDW_INL_inlinedZDW_INL_declared_not_inlinedZDW_INL_declared_inlinedZ
_DESCR_DW_INLZDW_LANG_C89Z	DW_LANG_CZ
DW_LANG_Ada83ZDW_LANG_C_plus_plusZDW_LANG_Cobol74ZDW_LANG_Cobol85ZDW_LANG_Fortran77ZDW_LANG_Fortran90ZDW_LANG_Pascal83ZDW_LANG_Modula2ZDW_LANG_JavaZDW_LANG_C99Z
DW_LANG_Ada95ZDW_LANG_Fortran95ZDW_LANG_PLIZDW_LANG_ObjCZDW_LANG_ObjC_plus_plusZDW_LANG_UPCZ	DW_LANG_DZDW_LANG_PythonZDW_LANG_Mips_AssemblerZDW_LANG_HP_BlissZDW_LANG_HP_Basic91ZDW_LANG_HP_Pascal91ZDW_LANG_HP_IMacroZDW_LANG_HP_AssemblerZ_DESCR_DW_LANGZDW_ATE_voidZDW_ATE_addressZDW_ATE_booleanZDW_ATE_complex_floatZDW_ATE_floatZ
DW_ATE_signedZDW_ATE_signed_charZDW_ATE_unsignedZDW_ATE_unsigned_charZDW_ATE_imaginary_floatZDW_ATE_decimal_floatZDW_ATE_packed_decimalZDW_ATE_numeric_stringZ
DW_ATE_editedZDW_ATE_signed_fixedZDW_ATE_unsigned_fixedZ
DW_ATE_UTFZDW_ATE_HP_float80ZDW_ATE_HP_complex_float80ZDW_ATE_HP_float128ZDW_ATE_HP_complex_float128ZDW_ATE_HP_floathpintelZDW_ATE_HP_imaginary_float80ZDW_ATE_HP_imaginary_float128Z
_DESCR_DW_ATEZDW_ACCESS_publicZDW_ACCESS_protectedZDW_ACCESS_privateZ_DESCR_DW_ACCESSZDW_VIS_localZDW_VIS_exportedZDW_VIS_qualifiedZ
_DESCR_DW_VISZDW_VIRTUALITY_noneZDW_VIRTUALITY_virtualZDW_VIRTUALITY_pure_virtualZ_DESCR_DW_VIRTUALITYZDW_ID_case_sensitiveZ
DW_ID_up_caseZDW_ID_down_caseZDW_ID_case_insensitiveZ_DESCR_DW_ID_CASEZDW_CC_normalZ
DW_CC_programZDW_CC_nocallZ_DESCR_DW_CCZDW_ORD_row_majorZDW_ORD_col_majorZ
_DESCR_DW_ORDr3r�r�r?r�r�r�rrBrCrD�objectr+rrrr�<module>	s�M	

������������



���������*