+
    :i}                      |   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
HtHtHtHt ^ RIHt ^ RI	Ht ^ RIHtHtHtHt ^ RIHt ^ RIt]P                  t]P7                  R4      ;'       g    ]P7                  R	4      ;'       g    R
]9   t]P:                  ! ]R4      t]P>                  ! ]R4      t ]PB                  ! 4       t"]"R!9   t#]P>                  ! ]#R4      t$]PJ                  PM                  RR4      R8H  t']P:                  ! ]'R4      t(]! R4      t)]
! RR7      t*]! RRR7      t+R t,R t-R t.]$] ! R R]4      4       4       t/]$]] ! R R]4      4       4       4       t0]0Pc                  4        ]$]] ! R R]4      4       4       4       t2]  ! R R]4      4       t3]4R 8X  d   ]Pj                  ! 4        R# R# )"z
Tests gdb bindings
N)permutations)njitgdbgdb_initgdb_breakpointprange)errors)jit)TestCasecaptured_stdouttagskip_parfors_unsupported)	needs_gdblinuxdarwinbsdzunix-like OS is requiredznon unix-like OS is requiredztesting disabled on ARMGDB_TEST1zneeds gdb harnesslong_runningT)debug)forceobjr   c                 j    \        R RR RR R4       V ^,           pV R,          pWV3p\        WW#4       R# z-exzset confirm offcqgQ@N)r   printabr   ds   &   [/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_gdb_bindings.pyimpl_gdb_callr!   ,   s:     %eS9	AA	DA	
q	A	!    c                 ~    \        R RR RR R4       V ^,           pV R,          pWV3p\        4        \        WW#4       R# r   )r   r   r   r   s   &   r    impl_gdb_call_w_bpr$   4   s@    U%uc5#>	AA	DA	
q	A	!r"   c                     \        R RR RR R4       V ^,          p \        ^4       F/  pV ^,           pV R,          pWV3p\        4        \        WW44       K1  	  R# r   )r   r   r   r   )r   ir   r   r   s   &    r    (impl_gdb_split_init_and_break_w_parallelr'   =   sW    U%uc5#>FAAYEH1IaA r"   c                      a  ] tR t^Ht o Rt]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]]R 4       4       t]]R	 4       4       t]]R
 4       4       tRtV tR# )TestGdbBindImplsa  
Contains unit test implementations for gdb binding testing. Test must be
decorated with `@needs_gdb_harness` to prevent their running under normal
test conditions, the test methods must also end with `_impl` to be
considered for execution. The tests themselves are invoked by the
`TestGdbBinding` test class through the parsing of this class for test
methods and then running the discovered tests in a separate process. Test
names not including the word `quick` will be tagged as @tag('long_running')
c                z    \        4       ;_uu_ 4        \        ^
4       RRR4       R#   + '       g   i     R# ; i
   N)r   r!   selfs   &r    $test_gdb_cmd_lang_cpython_quick_impl5TestGdbBindImpls.test_gdb_cmd_lang_cpython_quick_implU   s"    "    ):	c                    \        4       ;_uu_ 4        \        \        4      ! ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   	_dbg_njitr!   r-   s   &r    %test_gdb_cmd_lang_nopython_quick_impl6TestGdbBindImpls.test_gdb_cmd_lang_nopython_quick_implZ   s'    m$R( 	   3A	c                    \        4       ;_uu_ 4        \        \        4      ! ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   _dbg_jitr!   r-   s   &r    $test_gdb_cmd_lang_objmode_quick_impl5TestGdbBindImpls.test_gdb_cmd_lang_objmode_quick_impl_   s'    ]#B' r6   c                z    \        4       ;_uu_ 4        \        ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   r$   r-   s   &r    *test_gdb_split_init_and_break_cpython_impl;TestGdbBindImpls.test_gdb_split_init_and_break_cpython_impld   s"    r" r1   c                    \        4       ;_uu_ 4        \        \        4      ! ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   r3   r$   r-   s   &r    +test_gdb_split_init_and_break_nopython_impl<TestGdbBindImpls.test_gdb_split_init_and_break_nopython_impli   s(    ()"- r6   c                    \        4       ;_uu_ 4        \        \        4      ! ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   r8   r$   r-   s   &r    *test_gdb_split_init_and_break_objmode_impl;TestGdbBindImpls.test_gdb_split_init_and_break_objmode_impln   s(    '(, r6   c                z    \        4       ;_uu_ 4        \        ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   r'   r-   s   &r    5test_gdb_split_init_and_break_w_parallel_cpython_implFTestGdbBindImpls.test_gdb_split_init_and_break_w_parallel_cpython_impls   s$     4R8 r1   c                    \        4       ;_uu_ 4        \        \        4      ! ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   r3   r'   r-   s   &r    6test_gdb_split_init_and_break_w_parallel_nopython_implGTestGdbBindImpls.test_gdb_split_init_and_break_w_parallel_nopython_imply   s*     >?C r6   c                    \        4       ;_uu_ 4        \        \        4      ! ^
4       RRR4       R#   + '       g   i     R# ; ir+   )r   r8   r'   r-   s   &r    5test_gdb_split_init_and_break_w_parallel_objmode_implFTestGdbBindImpls.test_gdb_split_init_and_break_w_parallel_objmode_impl   s*     =>rB r6    N)__name__
__module____qualname____firstlineno____doc__needs_gdb_harnessr/   r4   r9   r<   r?   rB   r   rE   rH   rK   __static_attributes____classdictcell____classdict__s   @r    r)   r)   H   s        ) ) ( ( # # . . - - 9  9 D  D C  Cr"   r)   c                   \   a  ] tR t^t o RtRtRtR
R ltR t]	R 4       t
]	R 4       tRtV tR	# )TestGdbBindingz
This test class is used to generate tests which will run the test cases
defined in TestGdbBindImpls in isolated subprocesses, this is for safety
in case something goes awry.
FTc           	       a	 \         P                  ! V\         P                  \         P                  VR R7      o	V	3R lp\        P                  ! RV4      p VP                  4        S	P                  4       w  rgS	P                  pV^ 8w  d4   \        RV: RVP                  4       : RVP                  4       : 24      hVP                  4       VP                  4       3VP                  4        #   TP                  4        i ; i)T)stdoutstderrenvshellc                     < S P                   P                  4        S P                  P                  4        S P                  4        R # N)r[   flushr\   kill)popens   r    rb   $TestGdbBinding.run_cmd.<locals>.kill   s,    LL LL JJLr"   g      4@zprocess failed with code z: stderr follows
z	
stdout :)
subprocessPopenPIPE	threadingTimerstartcommunicate
returncodeAssertionErrordecodecancel)
r.   cmdliner]   
kill_is_okrb   timeoutouterrretcoderc   s
   &&&&     @r    run_cmdTestGdbBinding.run_cmd   s      (2(2%('+	-	 //#t,	MMO((*HC&&G!|$ %,SZZ\3::<IJ J ::<-NNGNNs   BC/ /Dc                    \         P                  P                  4       pR VR&   R VR&   \        P                  RRV.pV P
                  ! RP                  V4      V3/ VB # )r   	NUMBA_OPTr   z-mznumba.runtests )osenvironcopysys
executablerv   join)r.   testkwargsenv_copyrp   s   &&,  r    run_test_in_separate_process+TestGdbBinding.run_test_in_separate_process   sZ    ::??$ #  #>>4)94@||CHHW-xB6BBr"   c                  a \         P                  p\         P                  pVP                  R 4      '       g   Q hVP	                  R R4      pV: RV: RV: 2oV3R lpRV9   d   \        WV4       R# \        W\        V4      4       R# )_impl .c                 N  < V P                  S4      w  rR V RV R2p\        P                  ! RV4      pVe!   V P                  VP	                  ^4      4       V P                  RWR7       V P                  RW#R7       V P                  RW#R7       V P                  R	W#R7       R# )
z
STDOUT=z
STDERR=
z\.\.\. skipped '(.*?)'NzGNU gdb)msgOKFAILERROR)r   researchskipTestgroupassertInassertNotIn)r.   oedbgmsgminjected_methods   &    r    test_template-TestGdbBinding._inject.<locals>.test_template   s    44_EDA 9QCr2F 		3Q7A}aggaj)MM)QM3MM$M.VQ3Wa4r"   quickN)r)   rO   rN   endswithreplacesetattrr   )clsnamethemodtheclsmethnamer   r   s   &&    @r    _injectTestGdbBinding._inject   sq    !,,!**}}W%%%%<<,(.=	5 d?C=1C<#>?r"   c                    \        \        4       F-  pVP                  R 4      '       g   K  V P                  V4       K/  	  R# )test_gdbN)dirr)   
startswithr   )r   r   s   & r    generateTestGdbBinding.generate   s-    ()Dz**D! *r"   rM   N)F)rN   rO   rP   rQ   rR   _numba_parallel_test__DEBUGrv   r   classmethodr   r   rT   rU   rV   s   @r    rY   rY      sL      "F6C @ @2 " "r"   rY   c                   0   a  ] tR t^t o ]R 4       tRtV tR# )TestGdbMiscc                   a a R  pRoVV 3R lp\        \        \        .4       F  w  r4V! W44      pV! V4       K  	  \        R 4       pV! V4       R# )c                 *   a a \         V V3R  l4       pV# )c                  8   < ^p S! 4        ^pS! 4        W,           #    rM   )r   r   f1f2s     r    impl:TestGdbMisc.test_call_gdb_twice.<locals>.gen.<locals>.impl   s    ur"   )r   )r   r   r   s   ff r    gen,TestGdbMisc.test_call_gdb_twice.<locals>.gen   s      Kr"   z8Calling either numba.gdb() or numba.gdb_init() more thanc                    < SP                  \        P                  4      ;_uu_ 4       pV ! 4        R R R 4       SP                  S\	        XP
                  4      4       R #   + '       g   i     L7; ir`   )assertRaisesr   UnsupportedErrorr   str	exception)funcraisesmsg_headr.   s   & r    check.TestGdbMisc.test_call_gdb_twice.<locals>.check   sH    ""6#:#:;;v <MM(C(8(8$9: <;s   A  A0	c                  B    ^p \        4        ^p\        4        W,           # r   )r   r   )r   r   s     r    use_globals4TestGdbMisc.test_call_gdb_twice.<locals>.use_globals   s    AEAJ5Lr"   N)r   r   r   r   )r.   r   r   g1g2r   r   r   s   f      @r    test_call_gdb_twiceTestGdbMisc.test_call_gdb_twice   sZ    	 N	;
 #C?3FBr;D$K 4 
	 
	 	kr"   rM   N)rN   rO   rP   rQ   r   r   rT   rU   rV   s   @r    r   r      s     
  r"   r   c                   &   a  ] tR tRt o R tRtV tR# )TestGdbExceptionsi  c           	     b  a R  pV\        RR7      \        3 F  p\        \        3 Fm  oV3R lpV P	                  \
        P                  4      ;_uu_ 4       pV! V4      ! 4        RRR4       RpV P                  V\        XP                  4      4       Ko  	  K  	  R#   + '       g   i     LA; i)c                     V # r`   rM   )xs   &r    nop_compiler5TestGdbExceptions.test_call_gdb.<locals>.nop_compiler  s    Hr"   T)r   c                     < S ! 4        R # r`   rM   )meths   r    python_func4TestGdbExceptions.test_call_gdb.<locals>.python_func  s    Fr"   Nz2gdb support is only available on unix-like systems)
r	   r   r   r   r   r   TypingErrorr   r   r   )r.   r   compilerr   r   r   r   s   &     @r    test_call_gdbTestGdbExceptions.test_call_gdb  s    	%sD'94@Hh&&v'9'9::f[)+ ;Jc3v'7'7#89 ( A ;:s   B	B.rM   N)rN   rO   rP   rQ   r   rT   rU   rV   s   @r    r   r     s     
: 
:r"   r   __main__>   armv7laarch64)6rR   r{   platformr   re   r~   rh   	itertoolsr   numbar   r   r   r   r   
numba.corer   r	   numba.tests.supportr
   r   r   r   numba.tests.gdb_supportr   unittest	_platformr   
_unix_like
skipUnless	unix_onlyskipIfnot_unixmachine
_arch_name_is_armnot_armr|   get	_gdb_condrS   r   r3   r8   r!   r$   r'   r)   rY   r   r   r   rN   mainrM   r"   r    <module>r      s   
  	  
  " = =  ; ; -  LL	""7+ & &%%h/& &9$  
,FG	??:'EF

-
-
//'#<
=JJNN:t,3	''	3FG >"t	D) 	
9Cx 9C  	9Cx 	

N"X N"   	N"b     	

!( !   	!H 
: : 
: zMMO r"   