tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
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
P\¬Qc@s‘ddlZddlZddlZddlZddlZddlZddlmZmZy.ej    ddgdej
ƒj ƒ\Z Z Wn ek
r®ejdƒ‚nXejde ƒZeejdƒƒZeejd    ƒƒZed
kr ejd e ƒ‚nejjejjejƒd ƒZd „Zedƒ\ZZ e reejdƒ‚ndejgZedejƒ\Z Zdekr¡dZnd„Z d„Z!e!ƒZ"dej#fd„ƒYZ$de$fd„ƒYZ%ej&e ƒdƒde$fd„ƒYƒZ'de$fd„ƒYZ(de$fd„ƒYZ)d e$fd!„ƒYZ*d"e$fd#„ƒYZ+d$„Z,e-d%kre,ƒndS(&iÿÿÿÿN(t run_unittesttfindfiletgdbs    --versiontstdoutsCouldn't find gdb on the paths^GNU gdb [^\d]*(\d+)\.(\d)iiis=gdb versions before 7.0 didn't support python embedding Saw:
s python-gdb.pycOs›|r%tjjƒ}|j|ƒnd
}d }ttfd krZ|ddtf7}ntj    ||dtj
dtj
d    |ƒj ƒ\}}||fS( smRuns gdb in --batch mode with the additional arguments given by *args.
 
    Returns its (stdout, stderr)
    Rs--batchiis-iexsadd-auto-load-safe-path RtstderrtenvN(Rs--batch(ii( tostenvirontcopytupdatetNonetgdb_major_versiontgdb_minor_versiontcheckout_hook_patht
subprocesstPopentPIPEt communicate(targstenv_varsRtbase_cmdtoutterr((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytrun_gdb!s's8--eval-command=python import sys; print sys.version_infos*gdb not built with embedded python supports--argssauto-loading has been declineds3gdb security settings prevent use of custom hooks: cCsUtjƒd}d}x,|jƒD]}|jdƒr#|}q#q#W|oT|dkS(Nt    PY_CFLAGSts-Os-O0(t    sysconfigtget_config_varstsplitt
startswith(tcflagst    final_opttopt((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytpython_is_optimized@s  cCs^tdƒ\}}tjd|ƒ}|s<tjdƒ‚n|jdƒjdƒ}d|kS(Ns+--eval-command=python print(dir(gdb.Frame))s .*\[(.*)\].*s1Unable to parse output from gdb.Frame.select testis, s'select'(RtretmatchtunittesttSkipTesttgroupR(Rt_tmt gdb_frame_dir((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytgdb_has_frame_selectHs t DebuggerTestscBsPeZdZdddded„Zded„Zd„Zd„Zd„Z    RS(s(Test that the debugger can debug Python.tPyObject_PrintcCsEdd|dg}|r&||7}n |dg7}ddg}|g|D]}d|^qI7}|dtjg7}|s‰|d    g7}n|r¢|d
|g7}n|r¸||g7}ntd d |Œ\}    }
|
jƒ} g} d |ddddddf} x-| D]%}|j| ƒs| j|ƒqqW|j| gƒ|    S(sû
        Run 'python -c SOURCE' under gdb with a breakpoint.
 
        Support injecting commands after the breakpoint is reached
 
        Returns the stdout from gdb
 
        cmds_after_breakpoint: if provided, a list of strings: gdb commands
        sset breakpoint pending yessbreak %strunt    backtraceRs--batchs--eval-command=%ss--argss-Ss-ctPYTHONHASHSEEDt0sFunction "%s" not defined.sLwarning: no loadable sections found in added symbol-file system-supplied DSOspwarning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.sLwarning: Cannot initialize thread debugging library: Debugger service faileds@warning: Could not load shared library symbols for linux-vdso.sos@warning: Could not load shared library symbols for linux-gate.sos5Do you need "set solib-search-path" or "set sysroot"?(tsyst
executableRt
splitlinesRtappendt assertEqual(tselftsourcetscriptt
breakpointtcmds_after_breakpointt import_sitetcommandsRtcmdRRterrlinestunexpected_errlinestignore_patternstline((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytget_stack_traceWs>       !       cCsl|j|ddd|d|ƒ}tjd|tjƒ}|sY|jd||fƒn|jdƒ|fS(NR9R,R:R;s6.*#0\s+PyObject_Print\s+\(\s*op\=\s*(.*?),\s+fp=.*\).*sUnexpected gdb output: %r
%si(RBR"R#tDOTALLtfailR&(R6R7R:R;t
gdb_outputR(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt get_gdb_repr­s
        cCs*|j|j|ƒdd||fƒdS(s9Ensure that the given "actual" string ends with "exp_end"tmsgs%r did not end with %rN(t
assertTruetendswith(R6tactualtexp_end((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytassertEndsWithÃscCs9tj||tjƒ}|j|dd||fƒdS(NRGs%r did not match %r(R"R#RCRH(R6RJtpatternR(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytassertMultilineMatchesÈscCs
tdƒS(Ns gdb_sample.py(R(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pytget_sample_scriptÌsN(
t__name__t
__module__t__doc__R
tFalseRBRFRLRNRO(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyR+Ss T         tPrettyPrintTestscBs:eZd„Zd!d„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d„Z d    „Z d
„Z d „Zd „Zd „Zd„Zd„Zd„Zd!d!d„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d „Z#RS("cCs&|jdƒ}|jd|kƒdS(Nsprint 42R,(RBRH(R6RE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_getting_backtraceÐscCs?|jdt|ƒ|ƒ\}}|j|t|ƒ|ƒdS(Nsprint (RFtreprR5(R6tvalR:tgdb_reprRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt assertGdbReprÔscCsL|jdƒ|jdƒ|jdƒ|jtjƒ|jtj ƒdS(s2Verify the pretty-printing of various "int" valuesi*iiùÿÿÿN(RYR1tmaxint(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_intÛs
   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(s3Verify the pretty-printing of various "long" valuesllJ)£lÿÿÿÿlüÿÿÿIú5N(RY(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt    test_longãs   cCs+|jtƒ|jtƒ|jdƒdS(s2Verify the pretty-printing of True, False and NoneN(RYtTrueRSR
(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_singletonsês  cCs2|jiƒ|jidd6ƒ|jdƒdS(s*Verify the pretty-printing of dictionariestbartfoos{'foo': 'bar', 'douglas':42}N(RY(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt
test_dictsðs cCs$|jgƒ|jtdƒƒdS(s#Verify the pretty-printing of listsiN(RYtrange(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt
test_listsös cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(s%Verify the pretty-printing of stringsRs(And now for something hopefully the sames7string with embedded NUL here  and then some more texts!this is byte 255:ÿ and byte 128:€N(RY(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt test_stringsûs   cCs.|jtƒƒ|jdƒ|jdƒdS(s$Verify the pretty-printing of tuplesiR`R_tbazN(i(sfoosbarRe(RYttuple(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt test_tupless cCsE|jdƒ|jdƒ|jdƒ|jdƒ|jdƒdS(s,Verify the pretty-printing of unicode valuesuu hello worldu☠u 文字化けu𝄡N(RY(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt test_unicodes
    cCsï|jtƒƒ|jdƒd}|j|jdƒƒ|j|jdƒƒ|jt|ƒddhƒ|jdƒd}|j|jdƒƒ|j|jdƒƒ|jt|ƒdd    hƒ|jd
ƒ\}}|j|d ƒd S( s"Verify the pretty-printing of setssprint set(['a', 'b'])isset([s])tatbsprint set([4, 5])iis"s = set(['a','b'])
s.pop()
print ss
set(['b'])N(RYtsetRFRHRRIR5teval(R6trepRXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt    test_sets scCsÊ|jtƒƒ|jdƒd}|j|jdƒƒ|j|jdƒƒ|jt|ƒddhƒ|jdƒd}|j|jdƒƒ|j|jdƒƒ|jt|ƒdd    hƒd
S( s(Verify the pretty-printing of frozensetssprint frozenset(['a', 'b'])is frozenset([s])RiRjsprint frozenset([4, 5])iiN(RYt    frozensetRFRHRRIR5Rl(R6Rm((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_frozensets3scCsN|jdƒ\}}|j|dƒ|jdƒ\}}|j|dƒdS(NsR
try:
    raise RuntimeError("I am an error")
except RuntimeError, e:
    print e
s)exceptions.RuntimeError('I am an error',)s=
try:
    a = 1 / 0
except ZeroDivisionError, e:
    print e
sCexceptions.ZeroDivisionError('integer division or modulo by zero',)(RFR5(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_exceptions?s        cCsB|jdƒ\}}tjd|ƒ}|j|dd|ƒdS(s5Verify the pretty-printing of classic class instancess:
class Foo:
    pass
foo = Foo()
foo.an_int = 42
print foos(<Foo\(an_int=42\) at remote 0x[0-9a-f]+>RGs%Unexpected classic-class rendering %rN(RFR"R#RH(R6RXRER(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_classic_classUs
 cCsB|jdƒ\}}tjd|ƒ}|j|dd|ƒdS(s7Verify the pretty-printing of new-style class instancessB
class Foo(object):
    pass
foo = Foo()
foo.an_int = 42
print foos(<Foo\(an_int=42\) at remote 0x[0-9a-f]+>RGs'Unexpected new-style class rendering %rN(RFR"R#RH(R6RXRER(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_modern_classas
 cCsB|jdƒ\}}tjd|ƒ}|j|dd|ƒdS(s<Verify the pretty-printing of an instance of a list subclasssQ
class Foo(list):
    pass
foo = Foo()
foo += [1, 2, 3]
foo.an_int = 42
print foos(<Foo\(an_int=42\) at remote 0x[0-9a-f]+>RGs'Unexpected new-style class rendering %rN(RFR"R#RH(R6RXRER(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_subclassing_listms
 cCsB|jdƒ\}}tjd|ƒ}|j|dd|ƒdS(s=Verify the pretty-printing of an instance of a tuple subclasssJ
class Foo(tuple):
    pass
foo = Foo((1, 2, 3))
foo.an_int = 42
print foos(<Foo\(an_int=42\) at remote 0x[0-9a-f]+>RGs'Unexpected new-style class rendering %rN(RFR"R#RH(R6RXRER(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_subclassing_tuplezs
 c
Cs«|r|dg}n    dg}|j|d|ƒ\}}|rX|t|ƒkrXdSn|rod|d}nd}tj||ƒ}    |    s§|jd||fƒndS(sÔ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
        representationR.R:Nt<s at remote 0x[0-9a-f]+>s<.* at remote 0x[0-9a-f]+>s$Unexpected gdb representation: %r
%s(RFRVR"R#RD(
R6R7t
corruptiontexpvaluetexptypeR:RXRERMR(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt
assertSaneˆs         cCs5|jddddgƒ\}}|j|dƒdS(s2Ensure that a NULL PyObject* is handled gracefullysprint 42R:sset variable op=0R.t0x0N(RFR5(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt test_NULL_ptr©s cCs|jddƒdS(s?Ensure that a PyObject* with NULL ob_type is handled gracefullysprint 42sset op->ob_type=0N(Rz(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_NULL_ob_type³s    cCs|jddddƒdS(sDEnsure that a PyObject* with a corrupt ob_type is handled gracefullysprint 42sset op->ob_type=0xDEADBEEFRxi*N(Rz(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_corrupt_ob_type¸s    cCs|jddddƒdS(sDEnsure that a PyObject* with a type with corrupt tp_flags is handledsprint 42sset op->ob_type->tp_flags=0x0Rxi*N(Rz(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_corrupt_tp_flags¾s    cCs|jddddƒdS(sCEnsure that a PyObject* with a type with corrupt tp_name is handledsprint 42s#set op->ob_type->tp_name=0xDEADBEEFRxi*N(Rz(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_corrupt_tp_nameÄs    cCs|jddddƒdS(sBEnsure that a PyInstanceObject with with a NULL in_dict is handleds:
class Foo:
    pass
foo = Foo()
foo.an_int = 42
print foos(set ((PyInstanceObject*)op)->in_dict = 0RytFooN(Rz(R6((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_NULL_instance_dictÊscCsH|jddtƒ\}}tjd|ƒ}|j|dd|ƒdS(sAEnsure that the new-style class _Helper in site.py can be handledsprint __builtins__.helpR;s<_Helper at remote 0x[0-9a-f]+>RGsUnexpected rendering %rN(RFR]R"R#RH(R6RXRER(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_builtins_helpÕs cCsN|jdƒ\}}|j|dƒ|jdƒ\}}|j|dƒdS(sbEnsure that a reference loop involving a list doesn't lead proxyval
        into an infinite loop:s%a = [3, 4, 5] ; a.append(a) ; print as[3, 4, 5, [...]]s/a = [3, 4, 5] ; b = [a] ; a.append(b) ; print as[3, 4, 5, [[...]]]N(RFR5(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_selfreferential_listßscCs)|jdƒ\}}|j|dƒdS(sbEnsure that a reference loop involving a dict doesn't lead proxyval
        into an infinite loop:s/a = {} ; b = {'bar':a} ; a['foo'] = b ; print as{'foo': {'bar': {...}}}N(RFR5(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_selfreferential_dictìscCs?|jdƒ\}}|jtjd|ƒd||fƒdS(Ns<
class Foo:
    pass
foo = Foo()
foo.an_attr = foo
print foos/<Foo\(an_attr=<\.\.\.>\) at remote 0x[0-9a-f]+>s$Unexpected gdb representation: %r
%s(RFRHR"R#(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt'test_selfreferential_old_style_instanceôs cCsz|jdƒ\}}|jtjd|ƒd||fƒ|jdƒ\}}|jtjd|ƒd||fƒdS(NsD
class Foo(object):
    pass
foo = Foo()
foo.an_attr = foo
print foos/<Foo\(an_attr=<\.\.\.>\) at remote 0x[0-9a-f]+>s$Unexpected gdb representation: %r
%ssT
class Foo(object):
    pass
a = Foo()
b = Foo()
a.an_attr = b
b.an_attr = a
print asV<Foo\(an_attr=<Foo\(an_attr=<\.\.\.>\) at remote 0x[0-9a-f]+>\) at remote 0x[0-9a-f]+>(RFRHR"R#(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt'test_selfreferential_new_style_instancescCsI|jdƒ\}}|j|dƒ|jt|ƒdtdƒƒdS(s)Verify that very long output is truncatedsprint range(1000)s[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)is...(truncated)N(RFR5tlen(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_truncations
    cCs)|jdƒ\}}|j|dƒdS(Ns    print lens<built-in function len>(RFR5(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_builtin_function8scCs?|jdƒ\}}|jtjd|ƒd||fƒdS(Ns&import sys; print sys.stdout.readliness@<built-in method readlines of file object at remote 0x[0-9a-f]+>s$Unexpected gdb representation: %r
%s(RFRHR"R#(R6RXRE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_builtin_method<s
cCsN|jdddddgƒ}|jtjd|tjƒd||fƒdS(Ns<
def foo(a, b, c):
    pass
 
foo(3, 4, 5)
print foo.__code__R9R,R:s;print (PyFrameObject*)(((PyCodeObject*)op)->co_zombieframe)sK.*\s+\$1 =\s+Frame 0x[0-9a-f]+, for file <string>, line 3, in foo \(\)\s+.*s$Unexpected gdb representation: %r
%s(RBRHR"R#RC(R6RE((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt test_framesCs     N($RPRQRUR
RYR[R\R^RaRcRdRgRhRnRpRqRrRsRtRuRzR|R}R~RR€R‚RƒR„R…R†R‡R‰RŠR‹RŒ(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyRTÏsB                                                                 !    
                       
                           s&Python was compiled with optimizationst PyListTestscBs,eZd„Zd„Zd„Zd„ZRS(cCs|j||ƒdS(N(RL(R6texpectedRJ((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt assertListingUscCs5|jd|jƒddgƒ}|jd|ƒdS(s'Verify that the "py-list" command worksR8R:spy-lists‘   5    
   6    def bar(a, b, c):
   7        baz(a, b, c)
   8    
   9    def baz(*args):
 >10        print(42)
  11    
  12    foo(1, 2, 3)
N(RBROR(R6tbt((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_basic_commandXs     cCs5|jd|jƒddgƒ}|jd|ƒdS(s7Verify the "py-list" command with one absolute argumentR8R:s    py-list 9sL   9    def baz(*args):
 >10        print(42)
  11    
  12    foo(1, 2, 3)
N(RBROR(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_one_abs_arggs     cCs5|jd|jƒddgƒ}|jd|ƒdS(s8Verify the "py-list" command with two absolute argumentsR8R:s py-list 1,3sR   1    # Sample script for use by test_gdb.py
   2    
   3    def foo(a, b, c):
N(RBROR(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_two_abs_argsrs     (RPRQRR‘R’R“(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyRRs             tStackNavigationTestscBsžeZejedƒejeƒdƒd„ƒƒZejedƒd„ƒZejedƒd„ƒZ    ejedƒejeƒdƒd„ƒƒZ
RS(s$test requires py-up/py-down commandss&Python was compiled with optimizationscCs5|jd|jƒddgƒ}|j|dƒdS(s%Verify that the "py-up" command worksR8R:spy-upsn^.*
#[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\)
$N(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_pyup_command}s     cCs5|jd|jƒddgƒ}|j|dƒdS(s7Verify handling of "py-down" at the bottom of the stackR8R:spy-downs$Unable to find a newer python frame
N(RBRORL(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_down_at_bottomŠs     cCs9|jd|jƒddgdƒ}|j|dƒdS(s2Verify handling of "py-up" at the top of the stackR8R:spy-upis%Unable to find an older python frame
N(RBRORL(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_up_at_top’s    cCs8|jd|jƒdddgƒ}|j|dƒdS(s$Verify "py-up" followed by "py-down"R8R:spy-upspy-downsØ^.*
#[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 10, in baz \(args=\(1, 2, 3\)\)
    print\(42\)
$N(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_up_then_downšs    ( RPRQR$t
skipUnlesstHAS_PYUP_PYDOWNtskipIfR!R•R–R—R˜(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyR”|s   t    PyBtTestscBs&eZejeƒdƒd„ƒZRS(s&Python was compiled with optimizationscCs5|jd|jƒddgƒ}|j|dƒdS(s%Verify that the "py-bt" command worksR8R:spy-bts8^.*
#[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, b, c\)
#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
    foo\(1, 2, 3\)
N(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyR‘ªs     (RPRQR$R›R!R‘(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyRœ©s t PyPrintTestscBs’eZejeƒdƒd„ƒZejedƒejeƒdƒd„ƒƒZejeƒdƒd„ƒZ    ejeƒdƒd„ƒZ
RS(s&Python was compiled with optimizationscCs5|jd|jƒddgƒ}|j|dƒdS(s(Verify that the "py-print" command worksR8R:s py-print argss".*\nlocal 'args' = \(1, 2, 3\)\n.*N(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyR‘»s     s$test requires py-up/py-down commandscCs>|jd|jƒdddddgƒ}|j|dƒdS(NR8R:spy-ups
py-print cs
py-print bs
py-print as3.*\nlocal 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_print_after_upÄs    cCs5|jd|jƒddgƒ}|j|dƒdS(NR8R:spy-print __name__s&.*\nglobal '__name__' = '__main__'\n.*(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_printing_globalÍs     cCs5|jd|jƒddgƒ}|j|dƒdS(NR8R:s py-print lens/.*\nbuiltin 'len' = <built-in function len>\n.*(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_printing_builtinÕs     ( RPRQR$R›R!R‘R™RšRžRŸR (((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyRºs    t PyLocalsTestscBsVeZejeƒdƒd„ƒZejedƒejeƒdƒd„ƒƒZRS(s&Python was compiled with optimizationscCs5|jd|jƒddgƒ}|j|dƒdS(NR8R:s    py-localss.*\nargs = \(1, 2, 3\)\n.*(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyR‘Þs     s$test requires py-up/py-down commandscCs8|jd|jƒdddgƒ}|j|dƒdS(NR8R:spy-ups    py-localss.*\na = 1\nb = 2\nc = 3\n.*(RBRORN(R6R((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyttest_locals_after_upæs    (    RPRQR$R›R!R‘R™RšR¢(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyR¡Ýs
  cCstttttttƒdS(N(RRTRR”RœRR¡(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt    test_mainïs t__main__(.RR"RR1R$Rttest.test_supportRRRRRt gdb_versionR'tOSErrorR%tsearchtgdb_version_numbertintR&R R tpathtjointdirnameR2R Rt gdbpy_versionR=t gdbpy_errorsRGR!R*RštTestCaseR+RTR›RR”RœRR¡R£RP(((sU/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_gdb.pyt<module>sV                                          |ÿ„     (-#