Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_gdb/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_gdb/__pycache__/test_backtrace.cpython-312.opt-2.pyc

�

)Μg{��`�ddlZddlZddlmZddlmZddlmZmZm	Z	m
Z
d�ZGd�de�Zy)	�N)�support)�python_is_optimized�)�setup_module�
DebuggerTests�CET_PROTECTION�
SAMPLE_SCRIPTc��t�y)N)r���9/usr/local/lib/python3.12/test/test_gdb/test_backtrace.py�setUpModuler	s���Nrc�b�eZdZeje�d�d��Zeje�d�d��Zeje�d�ejd�d���Z
eje�d�d��Zeje�d�d��Zy)	�	PyBtTestsz&Python was compiled with optimizationsc�Z�	|jtdg��}|j|d�y)N�py-bt��script�cmds_after_breakpointaL^.*
Traceback \(most recent call first\):
  <built-in method id of module object .*>
  File ".*gdb_sample.py", line 10, in baz
    id\(42\)
  File ".*gdb_sample.py", line 7, in bar
    baz\(a, b, c\)
  File ".*gdb_sample.py", line 4, in foo
    bar\(a=a, b=b, c=c\)
  File ".*gdb_sample.py", line 12, in <module>
    foo\(1, 2, 3\)
��get_stack_tracer	�assertMultilineMatches��self�bts  r
�test_btzPyBtTests.test_bts9��	0�
�
!�
!��9@�	�"�C���#�#�B�%�	rc�Z�	|jtdg��}|j|d�y)N�
py-bt-fullraD^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
    baz\(a, b, c\)
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
    bar\(a=a, b=b, c=c\)
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
    foo\(1, 2, 3\)
rrs  r
�test_bt_fullzPyBtTests.test_bt_full"s9��	5�
�
!�
!��9E��"�H���#�#�B�%�	r�cpuc��	d}|j|dg��}|jd|�|j|dg��}|jd|�y)NaN
from threading import Thread

class TestThread(Thread):
    # These threads would run forever, but we'll interrupt things with the
    # debugger
    def run(self):
        i = 0
        while 1:
             i += 1

t = {}
for i in range(4):
   t[i] = TestThread()
   t[i].start()

# Trigger a breakpoint on the main thread
id(42)

zthread apply all py-bt�rzWaiting for the GILzthread apply all py-bt-full�r�assertIn�r�cmd�
gdb_outputs   r
�test_threadszPyBtTests.test_threads2sm��	M���*�)�)�#�AY�@Z�*�\�
��
�
�+�Z�8��)�)�#�A^�@_�*�a�
��
�
�+�Z�8rc��	d}|j|gd���}|jd|�|j|gd���}|jd|�y)NzRfrom gc import collect
id(42)
def foo():
    collect()
def bar():
    foo()
bar()
)�break update_refs�continuerr"zGarbage-collecting)r*r+rr#r%s   r
�test_gczPyBtTests.test_gcUsi��	J����)�)�#�@j�*�,�
�	
�
�
�*�J�7��)�)�#�@o�*�,�
�	
�
�
�*�J�7rc���tjd�}ddg}tr|jd�|jd�|j	||��}|j|d�y)Nz�
            class MyList(list):
                def __init__(self):
                    super(*[]).__init__()   # wrapper_call()

            id("first break point")
            l = MyList()
        zbreak wrapper_callr+�nextrr"z1<method-wrapper u?'__init__' of MyList object at )�textwrap�dedentr�appendr�assertRegex)rr&rr's    r
�test_wrapper_callzPyBtTests.test_wrapper_callosv���o�o��
��"6�z� B���
"�(�(��0��$�$�W�-��)�)�#�@U�*�W�
�����M�	OrN)
�__name__�
__module__�__qualname__�unittest�skipIfrrrr�requires_resourcer(r,r3rrr
rr
s����X�_�_�(�*�=�?��?��$�X�_�_�(�*�=�?��?���X�_�_�(�*�=�?��W���u�%�9�&�?�9�@�X�_�_�(�*�=�?�
8�?�
8�*�X�_�_�(�*�=�?�O�?�Orr)
r/r7�testr�test.supportr�utilrrrr	rrrrr
�<module>r=s,�����,�L�L��yO�
�yOr

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