python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_gdb.cpython-312.opt-2.pyc

ΑeavddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZdZ
e
\ZZZedkrej"dededeej$sej"d	ej&d
xsdej&dxsd
vrej"dej(j+ej(j-ej.dZdZdZeZdZed\ZZesej"ddevrej"dedej.\ZZdevr%dZ ej"e ejCzdZ"e"Z#dZ$ejJe	jLdGddejNZ(Gdd e(Z)ejJed!Gd"d#e(Z*d$Z+Gd%d&e(Z,Gd'd(e(Z-Gd)d*e(Z.Gd+d,e(Z/d-Z0e1d.k(rejdyy)/N)support)findfilepython_is_optimizedc
>	gd}tj|tjtjd}|5|j\}}ddd|jr0tddj
|d|jdd	tjd
}|td|z|t|jdt|jd
fS#1swYxYw#t$rtjd	wxYw)N)gdb-nxz	--versionT)stdoutstderruniversal_newlineszCommand  z failed with exit code z	: stdout=z stderr=zCouldn't find gdb on the pathz ^(?:GNU|HP) gdb.*?\b(\d+)\.(\d+)zunable to parse GDB version: %r)
subprocessPopenPIPEcommunicate
returncode	ExceptionjoinOSErrorunittestSkipTestresearchintgroup)cmdprocversionr
matchs     A/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_gdb.pyget_gdb_versionr"s#A)'1'1379	1"..0OGV	1??hsxx}&78..2oo->?&&-[
DE
E
II97CE}9GCDDSQ(#ekk!n*=>>+	1	1A ?@@As#;C=C1AC=1C:6C==Dz=gdb versions before 7.0 didn't support python embedding. Saw .z:
z3test_gdb only works on source builds at the moment.PGO_PROF_USE_FLAGxxxPY_CORE_CFLAGSz&test_gdb is not reliable on PGO buildsz
python-gdb.py123ctjd}|sy|j}d|vxrtd|DS)NCFLAGSFz-mcetc3fK|])}|jdxr|jd+yw)z-fcf-protection)z=nonez=returnN)
startswithendswith).0flags  r!	<genexpr>z!cet_protection.<locals>.<genexpr>Ms>'__%67A!]]+?@@A's/1)	sysconfigget_config_varsplitany)cflagsflagss  r!cet_protectionr8EsL

%
%h
/FLLNE

'' %''(c	|r0tjj}|j|nd}d}tt
fdk\r|ddtzfz
}tj||ztjtjtj|}|5|j\}}dddjddjddfS#1swY-xYw)N)rz--batchrr#z-iexzadd-auto-load-safe-path )stdinr	r
envzutf-8replace)osenvironcopyupdategdb_major_versiongdb_minor_versioncheckout_hook_pathrrrrdecode)argsenv_varsr>base_cmdrouterrs       r!run_gdbrMUsjjoo

8)H,-7V7:LLMMHtO#-//#-??#-?? #
%D
&##%S&::gy)3::gy+III&&sCC'z9--eval-command=python import sys; print(sys.version_info)z*gdb not built with embedded python supportzmajor=2zgdb built with Python 2--argszauto-loading has been declinedz3gdb security settings prevent use of custom hooks: ctd\}}tjd|}|stjd|jdj
d}d|vS)Nz+--eval-command=python print(dir(gdb.Frame))z.*\[(.*)\].*z1Unable to parse output from gdb.Frame.select testr
z, z'select')rMrr rrrr4)r	_m
gdb_frame_dirs    r!gdb_has_frame_selectrS~sYEFIFA
&)A STTGGAJ$$T*M&&r9
builtin_idznot useful for PGOc@eZdZ	ddedddfdZ		ddZdZdZdZy)	
DebuggerTestsNFcJ	dd|zddg}ttfdk\r|dgz
}|rtr|dgz
}||z
}n|dgz
}|Dcgc]}d	|z	}	}|	d
tjgz
}	|	jt
j|s|	dgz
}	|r|	d|gz
}	n|r|	|gz
}	t|	d
ti\}
}|s0|jD]}t|tjd|vrtjddD]}
|
|
vstj|
d|
Scc}w)Nzset breakpoint pending yeszbreak %szset print address offrunr;zset print entry-values nonext	backtracez--eval-command=%srNz-Sz-cPYTHONHASHSEED)filezPC not savedzKgdb cannot walk the frame object because the Program Counter is not present)z!(frame information optimized out)z*Unable to read information on python framez)(unable to read python frame information)z,Backtrace stopped: frame did not save the PCz ?? ()z found in gdb output)rDrECET_PROTECTIONsys
executableextendr_args_from_interpreter_flagsrMr[
splitlinesprintr
rr)selfsourcescript
breakpointcmds_after_breakpointimport_site
ignore_stderrcommandsrrHrKrLlinepatterns              r!get_stack_tracezDebuggerTests.get_stack_traces
	.1+,
*
01V;455H 
VH$--H
%H
6>>c#c)>>!	!J;;=>TFNDT6N"D
VHDD@@S(
-d,
-S ##%34
4
	LG#~''7+5I(JKK!	L$
g?sD c|xsdg}|j|t||}tjd|tj}|s|jd|d||j
d|fS)Nzbacktrace 1)rgrhrizS#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)?\)\s+at\s+\S*[A-Za-z]+/[A-Za-z0-9_-]+\.czUnexpected gdb output: 
r
)rn
BREAKPOINT_FNrrDOTALLfailr)rdrerhri
gdb_outputrQs      r!get_gdb_reprzDebuggerTests.get_gdb_reprsz !6 H-))&]@U6A*C

II
6
		
#IIZPQwwqz:%%r9cT	|j|j||d|y)Nz did not end with msg)
assertTruer.)rdactualexp_ends   r!assertEndsWithzDebuggerTests.assertEndsWith+s*G08>H		Jr9ctj||tj}|s|j|d|yy)Nz did not match rw)rr rrrs)rdrzrmrQs    r!assertMultilineMatchesz$DebuggerTests.assertMultilineMatches0s3HHWfbii0II67CIDr9ctdS)Nz
gdb_sample.py)rrds r!get_sample_scriptzDebuggerTests.get_sample_script5s
((r9)NF)	__name__
__module____qualname__rqrnrur|r~rr9r!rVrVs>3%)$#0.2$)&+	up,0!&"&HJ
E
)r9rVceZdZdZd dZejddZdZdZ	dZ
ejdd	Zejdd
ZdZ
ejddZejdd
ZdZdZdZdZd dZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!y)!PrettyPrintTestscT|jd}|jt|vy)Nid(42))rnryrqrdrts  r!test_getting_backtracez'PrettyPrintTests.test_getting_backtrace9s#))(3

34r9Nc	|jdt|zdz\}}|st|}|j|||d|d|y)Nzid()z did not equal expected z; full output was:
)ruasciireprassertEqual)rdvalexp_reprgdb_reprrts     r!
assertGdbReprzPrettyPrintTests.assertGdbRepr=sQ $00s1Cc1IJ*CyH8%x=	?r9cpuc	|jd|jd|jd|jd|jdy)N*rilJ)lI5rrs r!test_intzPrettyPrintTests.test_intGsL:212=),-r9cl	|jd|jd|jdy)NTFrrs r!test_singletonsz PrettyPrintTests.test_singletonsPs/<4 5!4 r9cz	|ji|jddid|jddddy)Nfoobarz{'foo': 'bar'}r)rdouglasz{'foo': 'bar', 'douglas': 42}rrs r!
test_dictszPrettyPrintTests.test_dictsVs>42E5>+;<5R8:YZr9cn	|jg|jttdy)N)rlistrangers r!
test_listszPrettyPrintTests.test_lists]s)-24a>*r9c	|jd|jd|jd|jd|jd|jttdDcgc]}|c}ycc}w)Nr9s(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:)rbytesr)rdbs  r!
test_byteszPrettyPrintTests.test_bytesbsz-3FGVW4	
	
EF5U3Z!8!!89:!8s4	B	c 	tdd\}}|j|sstd|fd}jdjdjd|d|d	|t	d
y)Nz--eval-commandz:python import locale; print(locale.getpreferredencoding())zFunable to determine the preferred encoding of embedded Python in GDB: c	|jj|y#t$rj|t|YywxYwN)encoderUnicodeEncodeErrorr)textencodingrds r!
check_reprz1PrettyPrintTests.test_strings.<locals>.check_reprsI
)H%""4(&
6""4t5
6s&$A
A
r(z(And now for something hopefully the samez7string with embedded NUL here  and then some more textu☠u文字化けi!)rMrstripRuntimeErrorrchr)rdrKrLrrs`   @r!test_stringszPrettyPrintTests.test_stringsqs7
HJS::<h..1U45
5	)	
2EFUV	8
	-.	3w< r9c	|jtd|jdd|jdy)Nz())r
z(1,))rrbaz)rtuplers r!test_tupleszPrettyPrintTests.test_tupless6.57D)4(01r9c	ttfdkr|jd|jt	d|jt	dgdt
jjs:|jt	ddgd|jt	gdd	|jd
\}}|j|dy)Nr#z.pretty-printing of sets needs gdb 7.3 or laterzset()az{'a'}rz
{'a', 'b'}r<rz	{4, 5, 6}z&s = set(['a','b'])
s.remove('a')
id(s)z{'b'})
rDrEskipTestrsetr^r7ignore_environmentrurrdrrts   r!	test_setszPrettyPrintTests.test_setss,01F:MMJK35'*3u:w/yy++sC:=s9~{; $002	 
*	
7+r9c\	ttfdkr|jd|jt	d|jt	dgdt
jjs;|jt	ddgd|jt	gdd	yy)
Nrz4pretty-printing of frozensets needs gdb 7.3 or laterzfrozenset()rzfrozenset({'a'})rzfrozenset({'a', 'b'})rzfrozenset({4, 5, 6}))rDrErr	frozensetr^r7rrs r!test_frozensetsz PrettyPrintTests.test_frozensetss201F:MMPQ9;
69cU+-?@yy++y#s46MNy35KL,r9c|jd\}}|j|d|jd\}}|j|dy)NzR
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',)rurrs   r!test_exceptionsz PrettyPrintTests.test_exceptionssc#002 *	
9	;
 $002 *	
A	Cr9c	|jd\}}tjd|}|j|d|zy)Nz8
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 %rrwrurr ryrdrrtrQs    r!test_modern_classz"PrettyPrintTests.test_modern_classsNA#002 *
HHBHMEP		Rr9c	|jd\}}tjd|}|j|d|zy)NzO
class Foo(list):
    pass
foo = Foo()
foo += [1, 2, 3]
foo.an_int = 42
id(foo)rrrwrrs    r!test_subclassing_listz&PrettyPrintTests.test_subclassing_listsNF#002 *
HHBHMEP		Rr9c	|jd\}}tjd|}|j|d|zy)NzH
class Foo(tuple):
    pass
foo = Foo((1, 2, 3))
foo.an_int = 42
id(foo)rrrwrrs    r!test_subclassing_tuplez'PrettyPrintTests.test_subclassing_tuplesPG $002 *
HHBHMEP		Rr9c	|r|dg}ndg}|j||\}}|r||k(ryd}tj||}|s|jd|d|yy)NrZrhz<.* at remote 0x-?[0-9a-f]+>Unexpected gdb representation: rp)rurr rs)	rdre
corruptionexpreprrhrrtrmrQs	         r!
assertSanezPrettyPrintTests.assertSanes	
#-{";!#.-!
f4I

K	*7"1HHWh'II#Z1
2r9cZ	|jdddg\}}|j|dy)Nrzset variable v=0rZr0x0rrs   r!
test_NULL_ptrzPrettyPrintTests.test_NULL_ptrsB<h5G5@5B

C	*	
5)r9c*	|jddy)Nrzset v->ob_type=0rrs r!test_NULL_ob_typez"PrettyPrintTests.test_NULL_ob_type)sI*	,r9c.	|jdddy)Nrzset v->ob_type=0xDEADBEEF42rrrs r!test_corrupt_ob_typez%PrettyPrintTests.test_corrupt_ob_type.sN3 $		&r9c.	|jdddy)Nrzset v->ob_type->tp_flags=0x0rrrrs r!test_corrupt_tp_flagsz&PrettyPrintTests.test_corrupt_tp_flags4sN6 $		&r9c.	|jdddy)Nrz"set v->ob_type->tp_name=0xDEADBEEFrrrrs r!test_corrupt_tp_namez%PrettyPrintTests.test_corrupt_tp_name:sM< $		&r9c	tjjr|jd|j	dd\}}tjd|}|j|d|zy)Nz(need site module, but -S option was usedzid(__builtins__.help)T)riz%<_Helper\(\) at remote 0x-?[0-9a-f]+>zUnexpected rendering %rrw)r^r7no_siterrurr ryrs    r!test_builtins_helpz#PrettyPrintTests.test_builtins_help@sjK99MMDE $001HVZ0[*HH=xH5@		Br9c	|jd\}}|j|d|jd\}}|j|dy)Nz#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, [[...]]]rrs   r!test_selfreferential_listz*PrettyPrintTests.test_selfreferential_listNs]	"
CD	*#56
MN	*#78r9cR	|jd\}}|j|dy)Nz-a = {} ; b = {'bar':a} ; a['foo'] = b ; id(a)z{'foo': {'bar': {...}}}rrs   r!test_selfreferential_dictz*PrettyPrintTests.test_selfreferential_dictYs4	"
MN	*	
#<=r9c|jd\}}|jtjd|d|d|y)Nz:
class Foo:
    pass
foo = Foo()
foo.an_attr = foo
id(foo)1<Foo\(an_attr=<\.\.\.>\) at remote 0x-?[0-9a-f]+>rrpruryrr rs   r!'test_selfreferential_old_style_instancez8PrettyPrintTests.test_selfreferential_old_style_instanceasI
	*	
!U!)+&z3	4r9c|jd\}}|jtjd|d|d||jd\}}|jtjd|d|d|y)NzB
class Foo(object):
    pass
foo = Foo()
foo.an_attr = foo
id(foo)rrrpzR
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]+>rrs   r!'test_selfreferential_new_style_instancez8PrettyPrintTests.test_selfreferential_new_style_instancens
	*	
!U!)+&z3	4
	
	*	
!~!)+&z3	4r9c	|jd\}}|j|d|jt|dtdzy)Nzid(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)iz...(truncated))rurlenrs   r!test_truncationz PrettyPrintTests.test_truncationsT3#001HI*7	8,	
X$4 55	7r9c|jd\}}|jtjd|d|d|y)Nz$import sys; id(sys.stdout.readlines)zO<built-in method readlines of _io.TextIOWrapper object at remote 0x-?[0-9a-f]+>rrprrs   r!test_builtin_methodz$PrettyPrintTests.test_builtin_methodsA#001WX*!s!)+&z3	4r9c|jdddg}|jtjd|tjd|d|y)NzQ
import sys
def foo(a, b, c):
    return sys._getframe(0)

f = foo(3, 4, 5)
id(f)rTzprint (PyFrameObject*)v)rgrhzK.*\s+\$1 =\s+Frame 0x-?[0-9a-f]+, for file <string>, line 4, in foo \(a=3.*rrp)rnryrr rrrs  r!test_frameszPrettyPrintTests.test_framess[))+	6BAZ@[*	,
	
!o!+!#,DNzZ	\r9r)"rrrrrrrequires_resourcerrrrrrrrrrrrrrrrrrrrrrrrrrrrr9r!rr8s)5?Wu%.&.![+
Wu%;&;Wu%*!&*!X2Wu%,&,$Wu%	M&	MC,
RR
R2:*,
&&&B	9>446784\r9r&Python was compiled with optimizationsc$eZdZdZdZdZdZy)PyListTestsc(|j||yr)r|)rdexpectedrzs   r!
assertListingzPyListTests.assertListingsFH-r9cn	|j|jdg}|jd|y)Nzpy-listrfrhz   5    
   6    def bar(a, b, c):
   7        baz(a, b, c)
   8    
   9    def baz(*args):
 >10        id(42)
  11    
  12    foo(1, 2, 3)
rnrrrdbts  r!test_basic_commandzPyListTests.test_basic_commandsE1

!
!)?)?)A9B"E	
4	r9cn	|j|jdg}|jd|y)Nz	py-list 9rzI   9    def baz(*args):
 >10        id(42)
  11    
  12    foo(1, 2, 3)
rrs  r!test_one_abs_argzPyListTests.test_one_abs_argsEA

!
!)?)?)A9D
"G	
4		r9cn	|j|jdg}|jd|y)Nzpy-list 1,3rzR   1    # Sample script for use by test_gdb.py
   2    
   3    def foo(a, b, c):
rrs  r!test_two_abs_argszPyListTests.test_two_abs_argssEB

!
!)?)?)A9F"I	
9	r9N)rrrrr
rrrr9r!rrs.
	r9rz

from _testcapi import pyobject_fastcall

def foo(a, b, c):
    bar(a, b, c)

def bar(a, b, c):
    pyobject_fastcall(baz, (a, b, c))

def baz(*args):
    id(42)

foo(1, 2, 3)

c@eZdZejedejeddZejeddZ	ejeddZ
ejedejeddZy)StackNavigationTests$test requires py-up/py-down commandsrc\	|jtddg}|j|dy)Npy-uprerhz^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12, in baz \(args=\(1, 2, 3\)\)
#[0-9]+ <built-in method pyobject_fastcall of module object at remote 0x[0-9a-f]+>
$rnSAMPLE_WITH_C_CALLr~rs  r!test_pyup_commandz&StackNavigationTests.test_pyup_commands=	0

!
!);9@'8J"L##B%	r9cn	|j|jdg}|j|dy)Npy-downrz$Unable to find a newer python frame
rnrr|rs  r!test_down_at_bottomz(StackNavigationTests.test_down_at_bottoms?A

!
!)?)?)A9B"EBC	Er9ct	|j|jdgdz}|j|dy)Nrrrz%Unable to find an older python frame
rrs  r!test_up_at_topz#StackNavigationTests.test_up_at_topsC<

!
!)?)?)A9@	A
"GBD	Fr9c\	|jtgd}|j|dy)N)rrrra^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12, in baz \(args=\(1, 2, 3\)\)
#[0-9]+ <built-in method pyobject_fastcall of module object at remote 0x[0-9a-f]+>
#[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12, in baz \(args=\(1, 2, 3\)\)
$rrs  r!test_up_then_downz&StackNavigationTests.test_up_then_downs8	/

!
!);8U"W##B%	r9N)rrrr
skipUnlessHAS_PYUP_PYDOWNskipIfrrrrrrr9r!rrsX*PQX__(*=??RX*PQEREX*PQFRFX*PQX__(*=?	?R	r9rceZdZejeddZejeddZejedejddZ
ejeddZejedejddZejeddZ
y	)
	PyBtTestsrcn	|j|jdg}|j|dy)Npy-btraL^.*
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\)
rnrr~rs  r!test_btzPyBtTests.test_bt%sB	0

!
!)?)?)A9@	"C##B%	r9cn	|j|jdg}|j|dy)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\)
r'rs  r!test_bt_fullzPyBtTests.test_bt_full9sB	5

!
!)?)?)A9E"H##B%	r9rc	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-btrzWaiting for the GILzthread apply all py-bt-fullrnassertInrdrrts   r!test_threadszPyBtTests.test_threadsIsm	M*))#AY@Z*\


+Z8))#A^@_*a


+Z8r9c	d}|j|gd}|jd||j|gd}|jd|y)NzRfrom gc import collect
id(42)
def foo():
    collect()
def bar():
    foo()
bar()
)break update_refscontinuer&rzGarbage-collecting)r2r3r*r-r/s   r!test_gczPyBtTests.test_gclsi	J))#@j*,
	


*J7))#@o*,
	


*J7r9c	d}dD]\}}dD]}|j|d|5tjd|d|d|d}|j||dd	gd
}|j	d|||j||d
gd
}|}|tjd|z
}|j||dddy#1swYxYw)Nz#(1|2)))meth_varargsr()meth_varargs_keywordsr()meth_oz[])meth_noargsr()
meth_fastcallr()meth_fastcall_keywordsr()	_testcapiz_testcapi.MethClassz_testcapi.MethClass()z_testcapi.MethStatic()r$zi
                        import _testcapi
                        def foo():
                            (zy)
                        def bar():
                            foo()
                        bar()
                    r	r&T)rgrhrjz<built-in method r*z <built-in method )subTesttextwrapdedentrnr.rescapeassertRegex)rdexpected_frame	func_namerHobjrrtregexs        r!test_pycfunctionzPyBtTests.test_pycfunctions2	L# 
0	8OIt(
8\\SE9+"678"///!E9+Qtf5+C"&!5!5#,/3Wo'+
"6"JMM$5i["A:N"&!5!5#,/;n'+
"6"J+ERYY);I;'GHHE$$Z7?88(
80	8"88sBCCctjd}ddg}tr|jd|jd|j	||}|j|dy)Nz
            class MyList(list):
                def __init__(self):
                    super(*[]).__init__()   # wrapper_call()

            id("first break point")
            l = MyList()
        zbreak wrapper_callr3rYr&rz1<method-wrapper u?'__init__' of MyList object at )r?r@r]appendrnrB)rdrrhrts    r!test_wrapper_callzPyBtTests.test_wrapper_callsvoo
"6z B
"((0$$W-))#@U*W
M	Or9N)rrrrr"rr(r+rrr0r4rGrJrr9r!r$r$$sX__(*=??$X__(*=??X__(*=?Wu%9&?9@X__(*=?
8?
8,X__(*=?Wu%88&?88tX__(*=?O?Or9r$c(eZdZejeddZejedejeddZ	ejeddZ
ejeddZy)PyPrintTestsrc\	|jtddg}|j|dy)Nrz
py-print argsrz".*\nlocal 'args' = \(1, 2, 3\)\n.*rrs  r!r
zPyPrintTests.test_basic_commands<	3

!
!);9@/8R"T##B$I	Kr9rcZ|jtgd}|j|dy)N)rrz
py-print cz
py-print bz
py-print arz3.*\nlocal 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*rrs  r!test_print_after_upz PyPrintTests.test_print_after_ups4
!
!);8t"v##B$Z	\r9cn|j|jddg}|j|dy)Nrzpy-print __name__rz&.*\nglobal '__name__' = '__main__'\n.*r'rs  r!test_printing_globalz!PyPrintTests.test_printing_globalsB
!
!)?)?)A9@BU8V"X##B$M	Or9cn|j|jddg}|j|dy)Nrzpy-print lenrzV.*\nbuiltin 'len' = <built-in method len of module object at remote 0x-?[0-9a-f]+>\n.*r'rs  r!test_printing_builtinz"PyPrintTests.test_printing_builtinsA
!
!)?)?)A9@.8Q"S##B$}	r9N)rrrrr"rr
r r!rOrQrSrr9r!rLrLsX__(*=?K?KX__(*=?X*PQ\R?\X__(*=?O?OX__(*=??r9rLceZdZejeddZejedejeddZ	y)
PyLocalsTestsrcn|j|jddg}|j|dy)Nr	py-localsrz.*\nargs = \(1, 2, 3\)\n.*r'rs  r!r
z PyLocalsTests.test_basic_command
sA
!
!)?)?)A9@+8N"P##B$A	Cr9rcn|j|jgd}|j|dy)N)rrrWrz<^.*
Locals for foo
a = 1
b = 2
c = 3
Locals for <module>
.*$r'rs  r!test_locals_after_upz"PyLocalsTests.test_locals_after_ups=
!
!)?)?)A8W"Y##B%	r9N)
rrrrr"rr
r r!rYrr9r!rUrU	skX__(*=?C?CX*PQX__(*=?
?R
r9rUctjrBtdtdtdt
j
D]}td|zyy)NzGDB version r$:z    )rverbosercrDrEgdb_versionrb)rls r!setUpModuler^"sA
&79JKL**,	"D'D.!	"r9__main__)3r@platformrrr^r2r?rtestrtest.supportrrr"r]rDrEris_python_buildr3pathrdirnamer_rFr[r8r]rM
gdbpy_versionrPgdbpy_errorsrxrrSr!rqr"PGOTestCaserVrrrrr$rLrUr^rmainrr9r!<module>rks
	
6?<5D4E1
 1q
(

02C*,--
!y  "
(

Q
RRY12;eY./527
(

D
EEWW\\"''//#.."A"13
( !J6VW
q
(

H
II

(

5
66(CNN3<#|3
?C
(

C,"5"5"77
88''(
23j)H%%j)4j)XB\}B\H$&9;&-&;&P$*=*X@O
@OD!=!FM2"zHMMOr9