+
    BiX                         ^ RI t ^ RIt^ RIHt ^RIHtHtHtHt R t	R t
]
! 4       t]P                  ! ]! 4       R4       ! R R]4      4       tR	t ! R
 R]4      t ! R R]4      t ! R R]4      tR# )    N)python_is_optimized)run_gdbsetup_moduleDebuggerTestsSAMPLE_SCRIPTc                      \        4        R # N)r        ./usr/lib/python3.14/test/test_gdb/test_misc.pysetUpModuler      s    Nr   c                      \        R 4      w  r\        P                  ! RV 4      pV'       g    \        P                  ! RV : RV: R24      hVP                  ^4      P                  R4      pRV9   # )z+--eval-command=python print(dir(gdb.Frame))z.*\[(.*)\].*z9Unable to parse output from gdb.Frame.select test
stdout=z
stderr=
z, z'select')r   rematchunittestSkipTestgroupsplit)stdoutstderrmgdb_frame_dirs       r   gdb_has_frame_selectr      su    JKNF
&)AZ  Zr#$ 	$ GGAJ$$T*M&&r   &Python was compiled with optimizationsc                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )PyListTestsc                (    V P                  W!4       R # r	   )assertEndsWith)selfexpectedactuals   &&&r   assertListingPyListTests.assertListing   s    F-r   c                Z    V P                  \        R.R7      pV P                  RV4       R# )z'Verify that the "py-list" command workszpy-listscriptcmds_after_breakpointz   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)
Nget_stack_tracer   r#   r    bts   & r   test_basic_commandPyListTests.test_basic_command!   s9    !!9B " E 	 4 	r   c                Z    V P                  \        R.R7      pV P                  RV4       R# )z7Verify the "py-list" command with one absolute argumentz	py-list 9r&   zI   9    def baz(*args):
 >10        id(42)
  11    
  12    foo(1, 2, 3)
Nr)   r+   s   & r   test_one_abs_argPyListTests.test_one_abs_arg0   s9    !!9D " G 	 4 		r   c                Z    V P                  \        R.R7      pV P                  RV4       R# )z8Verify the "py-list" command with two absolute argumentszpy-list 1,3r&   zO   1    # Sample script for use by test_gdb
   2    
   3    def foo(a, b, c):
Nr)   r+   s   & r   test_two_abs_argsPyListTests.test_two_abs_args;   s9    !!9F " I 	 9 	r   r
   N)
__name__
__module____qualname____firstlineno__r#   r-   r0   r3   __static_attributes____classdictcell____classdict__s   @r   r   r      s     .	 r   r   z

from _testcapi import pyobject_vectorcall

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

def bar(a, b, c):
    pyobject_vectorcall(baz, (a, b, c), None)

def baz(*args):
    id(42)

foo(1, 2, 3)

c                   T  a  ] tR t^Wt o ]P
                  ! ]R4      ]P                  ! ]! 4       R4      R 4       4       t	]P
                  ! ]R4      R 4       t
]P
                  ! ]R4      R 4       t]P
                  ! ]R4      ]P                  ! ]! 4       R4      R 4       4       tRtV tR# )	StackNavigationTests$test requires py-up/py-down commandsr   c                \    V P                  \        RR.R7      pV P                  VR4       R# )z%Verify that the "py-up" command workspy-upsourcer(   z^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12, in baz \(args=\(1, 2, 3\)\)
#[0-9]+ <built-in method pyobject_vectorcall of module object at remote 0x[0-9a-f]+>
$Nr*   SAMPLE_WITH_C_CALLassertMultilineMatchesr+   s   & r   test_pyup_command&StackNavigationTests.test_pyup_commandX   s:    
 !!);9@'8J " L##B%	r   c                Z    V P                  \        R.R7      pV P                  VR4       R# )z7Verify handling of "py-down" at the bottom of the stackpy-downr&   z$Unable to find a newer python frame
Nr*   r   r   r+   s   & r   test_down_at_bottom(StackNavigationTests.test_down_at_bottome   s5     !!9B " EBC	Er   c                h    V P                  \        R.^,          R7      pV P                  VR4       R# )z2Verify handling of "py-up" at the top of the stackrA   r&   z%Unable to find an older python frame
NrK   r+   s   & r   test_up_at_top#StackNavigationTests.test_up_at_topm   s9     !!9@	A " GBD	Fr   c                \    V P                  \        . ROR7      pV P                  VR4       R# )z$Verify "py-up" followed by "py-down"rB   a  ^.*
#[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12, in baz \(args=\(1, 2, 3\)\)
#[0-9]+ <built-in method pyobject_vectorcall 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\)\)
$N)rA   rA   rJ   rD   r+   s   & r   test_up_then_down&StackNavigationTests.test_up_then_downu   s5    
 !!);8U " W##B%	r   r
   N)r5   r6   r7   r8   r   
skipUnlessHAS_PYUP_PYDOWNskipIfr   rG   rL   rO   rR   r9   r:   r;   s   @r   r>   r>   W   s     *PQ__(*=?? R *PQE RE *PQF RF *PQ__(*=?	? R	r   r>   c                   <  a  ] tR t^t o ]P
                  ! ]! 4       R4      R 4       t]P
                  ! ]! 4       R4      ]P                  ! ]	R4      R 4       4       t
]P
                  ! ]! 4       R4      R 4       t]P
                  ! ]! 4       R4      R 4       tRtV tR# )	PyPrintTestsr   c                \    V P                  \        RR.R7      pV P                  VR4       R# )z(Verify that the "py-print" command worksrA   zpy-print argsrB   z".*\nlocal 'args' = \(1, 2, 3\)\n.*NrD   r+   s   & r   r-   PyPrintTests.test_basic_command   s9     !!);9@/8R " T##B$I	Kr   r?   c                \    V P                  \        . ROR7      pV P                  VR4       R# )rA   rB   z3.*\nlocal 'c' = 3\nlocal 'b' = 2\nlocal 'a' = 1\n.*N)rA   rA   z
py-print cz
py-print bz
py-print arD   r+   s   & r   test_print_after_up PyPrintTests.test_print_after_up   s4     !!);8t " v##B$Z	\r   c                \    V P                  \        R R.R7      pV P                  VR4       R# )rA   zpy-print __name__r&   z&.*\nglobal '__name__' = '__main__'\n.*Nr*   r   rF   r+   s   & r   test_printing_global!PyPrintTests.test_printing_global   s9     !!9@BU8V " X##B$M	Or   c                \    V P                  \        R R.R7      pV P                  VR4       R# )rA   zpy-print lenr&   zV.*\nbuiltin 'len' = <built-in method len of module object at remote 0x-?[0-9a-f]+>\n.*Nr_   r+   s   & r   test_printing_builtin"PyPrintTests.test_printing_builtin   s8     !!9@.8Q " S##B$}	r   r
   N)r5   r6   r7   r8   r   rV   r   r-   rT   rU   r\   r`   rc   r9   r:   r;   s   @r   rX   rX      s     __(*=?K?K __(*=?*PQ\ R?\ __(*=?O?O __(*=??r   rX   c                      a  ] tR t^t o ]P
                  ! ]! 4       R4      R 4       t]P                  ! ]	R4      ]P
                  ! ]! 4       R4      R 4       4       t
RtV tR# )PyLocalsTestsr   c                \    V P                  \        R R.R7      pV P                  VR4       R# )rA   	py-localsr&   z.*\nargs = \(1, 2, 3\)\n.*Nr_   r+   s   & r   r-    PyLocalsTests.test_basic_command   s8     !!9@+8N " P##B$A	Cr   r?   c                \    V P                  \        . ROR7      pV P                  VR4       R# )rA   r&   z<^.*
Locals for foo
a = 1
b = 2
c = 3
Locals for <module>
.*$N)rA   rA   rh   r_   r+   s   & r   test_locals_after_up"PyLocalsTests.test_locals_after_up   s4     !!8W " Y##B%	r   r
   N)r5   r6   r7   r8   r   rV   r   r-   rT   rU   rk   r9   r:   r;   s   @r   rf   rf      sh     __(*=?C?C *PQ__(*=?
? R
r   rf   )r   r   test.supportr   utilr   r   r   r   r   r   rU   rV   r   rE   r>   rX   rf   r
   r   r   <module>ro      s    	  , E E
' '( 
$&9;&- &;&P $*= *X!= !FM r   