403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.146
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_gdb/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_gdb/__pycache__/test_pretty_print.cpython-315.pyc
R
>lqjhHc�\�]PHs]PHs]QHGs]QHGsGsGsGsG	s	Qs
QQ\	2sP!)�)�support)�
BREAKPOINT_FN�GDB_VERSION�run_gdb�setup_module�
DebuggerTestsc��[2P!�N)r���4C:\Python315\\Lib\test\test_gdb\test_pretty_print.py�setUpModuler

s���Nrc�`�\sQs]snQ!QksQsQ"Qks\OQ2Q2s	Qs
QsQs\OQ2Q	2s
\OQ2Q
2sQs\OQ2Q2s\OQ2Q
2sQsQsQsQsQ"QksQsQsQsQsQsQsQsQsQsQs Qs!Qs"Qs#Q s$Us%P!)#�PrettyPrintTestsc��S9%fQ,oUOU[UUQ5o[OQU[O2oU%fUOQU8QU802UO
]2U1!)zbacktrace 1)�
breakpoint�cmds_after_breakpoint�import_sitezS#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)?\)\s+at\s+\S*[A-Za-z]+/[A-Za-z0-9_-]+\.czUnexpected gdb output: �
)�get_stack_tracer�re�search�DOTALL�fail�group)�self�sourcerr�
gdb_output�ms&&&&  r�get_gdb_repr�PrettyPrintTests.get_gdb_reprs}�� !6� H� H�-����)�)�&�]�@U�6A�*�C�
�
�I�I�
6�
��	�	�
#����I�I��Z�P�Q��w�w�q�z�:�%�%rc�Z�UOQ2oUO[U72P!)�id(42))r�
assertTruer�rrs& r�test_getting_backtrace�'PrettyPrintTests.test_getting_backtrace3s#���)�)�(�3�
����
��3�4rc	��UOQ[U2*Q*2vq4U%f[U2oUOV2U8QU8QU802P!)zid(�)z did not equal expected z; full output was:
)r�ascii�repr�assertEqual)r�val�exp_repr�gdb_reprrs&&&  r�
assertGdbRepr�PrettyPrintTests.assertGdbRepr7sM�� $�0�0���s��1C�c�1I�J�����C�y�H�����%�x��=�	?r�cpuc��UO]*2UO]2UOQ2UOQ2UOQ2P!)z0Verify the pretty-printing of various int valueslJ)�i����l�����I�5�r/�rs&r�test_int�PrettyPrintTests.test_intAsK��	
���2�����1�����2�����=�)����,�-rc�n�UOP	2UOP
2UOP2P!)z2Verify the pretty-printing of True, False and Noner3r4s&r�test_singletons� PrettyPrintTests.test_singletonsJs,�����4� ����5�!����4� rc���UO-2UOQQ-Q2UOQQQ]*-Q2UO[2Q2UO[QQQ]*-2Q2P!)z*Verify the pretty-printing of dictionaries�foo�barz{'foo': 'bar'}�douglasz{'foo': 'bar', 'douglas': 42}zfrozendict({})z)frozendict({'foo': 'bar', 'douglas': 42}))r/�
frozendictr4s&r�
test_dicts�PrettyPrintTests.test_dictsPsz�����2�����E�5�>�+;�<����E�5�)�R�8�:�	<�	
���:�<�+�	-����:�u�e�Y��&C�D�F�	Hrc�p�UO,2UO[[]222P!)z#Verify the pretty-printing of lists)r/�list�ranger4s&r�
test_lists�PrettyPrintTests.test_lists^s&�����2�����4��a��>�*rc	�"�UOQ2UOQ2UOQ2UOQ2UOQ2SO[[]�2Tt,tFDpMJ	to22P!ttoh)z#Verify the pretty-printing of bytesrs(And now for something hopefully the sames7string with embedded NUL here  and then some more texts7this is a tab:	 this is a slash-N:
 this is a slash-R:
s!this is byte 255:� and byte 128:�)r/�bytesrC)r�bs& r�
test_bytes�PrettyPrintTests.test_bytescs}��	
���3�����F�G����V�W����4�	�
	
���E�F����5�U�3�Z�!8�Z��!�Z�!8�9�:��!8s�3Bc�D``�[QQ2vqUO2nU%f	R%f[QU8QU802gUU1QkoROP2ROQ2ROQ2UQ2UQ	2U[	Q
22P!)z-Verify the pretty-printing of unicode stringsz--eval-commandz,python import gdb; print(gdb.host_charset())z3unable to determine the host charset of gdb
stdout=z
stderr=c�:�UOR2ROU[U2OR2OQQ22P![[
[1c ROS[S22P!h9h)r)�surrogateescape)�encoder/r*�decode�UnicodeEncodeError�LookupError�
ValueErrorr))�text�encodingrs&��r�
check_repr�1PrettyPrintTests.test_strings.<locals>.check_repr�sp���
i����H�%�
�"�"�4��d��):�):�8�)D�)K�)K�G�Uf�)g�h��'��Z�@�
6��"�"�4��t��5�
6�s�A�B�&B�Bz(And now for something hopefully the samez7string with embedded NUL here  and then some more textu☠u文字化けi!�)r�strip�RuntimeErrorr/�chr)r�stdout�stderrrUrTsf   @r�test_strings�PrettyPrintTests.test_stringsrs����!��:�<����<�<�>������ ��$� ��%�&�
&�
	i�	
���2�����E�F����U�V�	�8��
	�-�.�	�3�w�<� rc��UO[2Q2UOQQ2UOQ2P!)z$Verify the pretty-printing of tuplesz()z(1,))�)r;r<�baz)r/�tupler4s&r�test_tuples�PrettyPrintTests.test_tuples�s3�����5�7�D�)����4��(����0�1rc��[Q
6cUOQ2UO[2Q2UO[Q,2Q2[O
O%f;UO[QQ,2Q2UO[,QN2Q2UOQ2vqUOUQ	2P!)z"Verify the pretty-printing of setsz.pretty-printing of sets needs gdb 7.3 or laterzset()�az{'a'}rHz
{'a', 'b'}z	{4, 5, 6}z&s = set(['a','b'])
s.remove('a')
id(s)z{'b'}�������)	r�skipTestr/�set�sys�flags�ignore_environmentrr+�rr.rs&  r�	test_sets�PrettyPrintTests.test_sets�s�������M�M�J�K����3�5�'�*����3��u�:�w�/��y�y�+�+�+����s�C��:���=����s�9�~�{�;� $�0�0�2	� 
���	
����7�+rc�d�[Q6cUOQ2UO[2Q2UO[Q,2Q2[O
O%f=UO[QQ,2Q2UO[,Q	N2Q2P!P!)
z(Verify the pretty-printing of frozensetsz4pretty-printing of frozensets needs gdb 7.3 or laterzfrozenset()rezfrozenset({'a'})rHzfrozenset({'a', 'b'})zfrozenset({4, 5, 6})rfri)rrmr/�	frozensetrorprqr4s&r�test_frozensets� PrettyPrintTests.test_frozensets�s�������M�M�P�Q����9�;�
�6����9�c�U�+�-?�@��y�y�+�+�+����y�#�s��4�6M�N����y��3�5K�L�,rc��UOQ2vqUOUQ2UOQ2vqUOUQ2P!)zR
try:
    raise RuntimeError("I am an error")
except RuntimeError as e:
    id(e)
zRuntimeError('I am an error',)z=
try:
    a = 1 / 0
except ZeroDivisionError as e:
    id(e)
z&ZeroDivisionError('division by zero',)�rr+rrs&  r�test_exceptions� PrettyPrintTests.test_exceptions�s_��#�0�0�2� ���	
����9�	;�
 $�0�0�2� ���	
����A�	Crc��UOQ2vq[OQU2oUOUQU*Q5P!)z7Verify the pretty-printing of new-style class instancesz8
class Foo:
    pass
foo = Foo()
foo.an_int = 42
id(foo)�*<Foo\(an_int=42\) at remote 0x-?[0-9a-f]+>�'Unexpected new-style class rendering %r��msg�rr�matchr#�rr.rrs&   r�test_modern_class�"PrettyPrintTests.test_modern_class�sI��#�0�0�2� ���
�H�H�B�H�M������E��P�	�	Rrc��UOQ2vq[OQU2oUOUQU*Q5P!)z<Verify the pretty-printing of an instance of a list subclasszO
class Foo(list):
    pass
foo = Foo()
foo += [1, 2, 3]
foo.an_int = 42
id(foo)r~rr�r�r�s&   r�test_subclassing_list�&PrettyPrintTests.test_subclassing_list�sI��#�0�0�2� ���
�H�H�B�H�M������E��P�	�	Rrc��UOQ2vq[OQU2oUOUQU*Q5P!)z=Verify the pretty-printing of an instance of a tuple subclasszH
class Foo(tuple):
    pass
foo = Foo((1, 2, 3))
foo.an_int = 42
id(foo)r~rr�r�r�s&   r�test_subclassing_tuple�'PrettyPrintTests.test_subclassing_tuple�sK�� $�0�0�2� ���
�H�H�B�H�M������E��P�	�	Rrc���U%cUQ,oLQ,oUOUUQ5vqVU%c	VS6XcP!Qo[OVu2oU%fUOQU8QU802P!P!)z�Run Python under gdb, corrupting variables in the inferior process
immediately before taking a backtrace.

Verify that the variable's representation is the expected failsafe
representation�	backtrace�rz<.* at remote 0x-?[0-9a-f]+>�Unexpected gdb representation: r)rrr�r)	rr�
corruption�expreprrr.r�patternrs	&&&&     r�
assertSane�PrettyPrintTests.assertSanes���#-�{�";�!�#.�-�!�
���f�4I�
�
K�	����"��1���H�H�W�'����I�I�#�Z�1�
2�rc�Z�UOQQQ,Q5vqUOUQ2P!)z2Ensure that a NULL PyObject* is handled gracefullyr"zset variable v=0r�r��0x0rzrrs&  r�
test_NULL_ptr�PrettyPrintTests.test_NULL_ptr!s?��
���h�5G�5@�5B�
�
C�	��	
����5�)rc�,�UOQQ2P!)z?Ensure that a PyObject* with NULL ob_type is handled gracefullyr"zset v->ob_type=0�r�r4s&r�test_NULL_ob_type�"PrettyPrintTests.test_NULL_ob_type+s������*�	,rc�0�UOQQQQ5P!)zDEnsure that a PyObject* with a corrupt ob_type is handled gracefullyr"zset v->ob_type=0xDEADBEEF�42�r�r�r4s&r�test_corrupt_ob_type�%PrettyPrintTests.test_corrupt_ob_type0s������3� $�	�	&rc�0�UOQQQQ5P!)zDEnsure that a PyObject* with a type with corrupt tp_flags is handledr"zset v->ob_type->tp_flags=0x0r�r�r�r4s&r�test_corrupt_tp_flags�&PrettyPrintTests.test_corrupt_tp_flags6s������6� $�	�	&rc�0�UOQQQQ5P!)zCEnsure that a PyObject* with a type with corrupt tp_name is handledr"z"set v->ob_type->tp_name=0xDEADBEEFr�r�r�r4s&r�test_corrupt_tp_name�%PrettyPrintTests.test_corrupt_tp_name<s������<� $�	�	&rc��[OO%cUOQ2UO	QP	Q5vq[
OQU2oUOUQU*Q5P!)zAEnsure that the new-style class _Helper in site.py can be handledz(need site module, but -S option was usedzid(__builtins__.help))rz%<_Helper\(\) at remote 0x-?[0-9a-f]+>zUnexpected rendering %rr�)rorp�no_sitermrrr�r#r�s&   r�test_builtins_help�#PrettyPrintTests.test_builtins_helpBsj���9�9�����M�M�D�E� $�0�0�1H�VZ�0�[����H�H�=�x�H������5��@�	�	Brc��UOQ2vqUOUQ2UOQ2vqUOUQ2P!)zZEnsure that a reference loop involving a list doesn't lead proxyval
into an infinite loop:z#a = [3, 4, 5] ; a.append(a) ; id(a)z[3, 4, 5, [...]]z-a = [3, 4, 5] ; b = [a] ; a.append(b) ; id(a)z[3, 4, 5, [[...]]]rzrrs&  r�test_selfreferential_list�*PrettyPrintTests.test_selfreferential_listPsT��
���C�D�	������#5�6�
���M�N�	������#7�8rc�R�UOQ2vqUOUQ2P!)zZEnsure that a reference loop involving a dict doesn't lead proxyval
into an infinite loop:z-a = {} ; b = {'bar':a} ; a['foo'] = b ; id(a)z{'foo': {'bar': {...}}}rzrrs&  r�test_selfreferential_dict�*PrettyPrintTests.test_selfreferential_dict[s-��
���M�N�	��	
����#<�=rc��UOQ2vqUO[OQU2QU8QU802P!)z:
class Foo:
    pass
foo = Foo()
foo.an_attr = foo
id(foo)�1<Foo\(an_attr=<\.\.\.>\) at remote 0x-?[0-9a-f]+>r�r�rr#rr�rrs&  r�'test_selfreferential_old_style_instance�8PrettyPrintTests.test_selfreferential_old_style_instancecsG������
�	��	
������!U�!)�+�&�z�3�	4rc��UOQ2vqUO[OQU2QU8QU802UOQ2vqUO[OQU2QU8QU802P!)zB
class Foo(object):
    pass
foo = Foo()
foo.an_attr = foo
id(foo)r�r�rzR
class Foo(object):
    pass
a = Foo()
b = Foo()
a.an_attr = b
b.an_attr = a
id(a)zZ<Foo\(an_attr=<Foo\(an_attr=<\.\.\.>\) at remote 0x-?[0-9a-f]+>\) at remote 0x-?[0-9a-f]+>r�rrs&  r�'test_selfreferential_new_style_instance�8PrettyPrintTests.test_selfreferential_new_style_instanceps�������
�	��	
������!U�!)�+�&�z�3�	4�
���	�
�	��	
������!~�!)�+�&�z�3�	4rc��UOQ2vqUOUQ2UO[U2Q[Q2*2P!)z)Verify that very long output is truncatedzid(list(range(1000)))a[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226...(truncated)�z...(truncated))rr+�lenrrs&  r�test_truncation� PrettyPrintTests.test_truncation�sO��#�0�0�1H�I�������7�	8�,	
����X����$4� 5�5�	7rc��UOQ2vqUO[OQU2QU8QU802P!)z$import sys; id(sys.stdout.readlines)zO<built-in method readlines of _io.TextIOWrapper object at remote 0x-?[0-9a-f]+>r�rr�rrs&  r�test_builtin_method�$PrettyPrintTests.test_builtin_method�s?��#�0�0�1W�X���������!s�!)�+�&�z�3�	4rc��UOQQQ,Q5oUO[OQU[O2QU8QU802P!)zQ
import sys
def foo(a, b, c):
    return sys._getframe(0)

f = foo(3, 4, 5)
id(f)�
builtin_idzprint (PyFrameObject*)v)rrzK.*\s+\$1 =\s+Frame 0x-?[0-9a-f]+, for file <string>, line 4, in foo \(a=3.*r�r)rr#rr�rr$s& r�test_frames�PrettyPrintTests.test_frames�s[���)�)�+	�6B�AZ�@[�*�	,�
�	
������!o�!+�!#���,�DN�z�Z�	\rr
)NFr	)&�__name__�
__module__�__qualname__�__firstlineno__rr%r/r�requires_resourcer5r8r?rDrIr\rbrsrwr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��__static_attributes__�__classdictcell__)�
__classdict__s@rrrs.����"&�H5�?�
���u�%�.�&�.�!�H�+�

���u�%�;�&�;�
���u�%�+!�&�+!�Z2�
���u�%�,�&�,�$
���u�%�	M�&�	M�C�,
R�R�
R�2�:*�,�
&�&�&�B�	9�>�4�4�67�84�\�\rr)rro�testr�utilrrrrrr
rr
rr�<module>r�s-��	�
��*�*�
�n\�}�n\r

Youez - 2016 - github.com/yon3zu
LinuXploit