+
    lh                       R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI t ^ RI!t"^ RI#H$t$H%t%H&t& ^ RI'H(t( ^ RIH)t) ^ RI*H+t+  ! R R],4      t-. RXOt.R t/R t0R t1 ! R R]24      t3 ! R R4      t4 ! R R]44      t5 ! R R]44      t6 ! R R]44      t7 ! R R]Pp                  4      t9Rt:Rs;R t<R t= ! R R	]P|                  ]P~                  4      t@] e   . R
NRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NRNR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NtA]A F9  tB] ]C! ]@R?]B,           4      P                   P                  4       R@,           ,          t K;  	  ] ]@P                  P                   ,          t AAABRYRA ltFRYRB ltGRC tHRD tIRERR)R/RF ltJRERR)R/RG ltK ! RH RI]@4      tL ! RJ RK4      tMRL tNRZRM ltOR[RN ltPRO tQRP tRRQtSRR tTRS tURTtVRU tWRV tX]YRW8X  d   ^ RIZtZ]ZP                  ! 4        R# R# )\a	  
The Python Debugger Pdb
=======================

To use the debugger in its simplest form:

        >>> import pdb
        >>> pdb.run('<a statement>')

The debugger's prompt is '(Pdb) '.  This will stop in the first
function call in <a statement>.

Alternatively, if a statement terminated with an unhandled exception,
you can use pdb's post-mortem facility to inspect the contents of the
traceback:

        >>> <a statement>
        <exception traceback>
        >>> import pdb
        >>> pdb.pm()

The commands recognized by the debugger are listed in the next
section.  Most can be abbreviated as indicated; e.g., h(elp) means
that 'help' can be typed as 'h' or 'help' (but not as 'he' or 'hel',
nor as 'H' or 'Help' or 'HELP').  Optional arguments are enclosed in
square brackets.  Alternatives in the command syntax are separated
by a vertical bar (|).

A blank line repeats the previous command literally, except for
'list', where it lists the next 11 lines.

Commands that the debugger doesn't recognize are assumed to be Python
statements and are executed in the context of the program being
debugged.  Python statements can also be prefixed with an exclamation
point ('!').  This is a powerful way to inspect the program being
debugged; it is even possible to change variables or call functions.
When an exception occurs in such a statement, the exception name is
printed but the debugger's state is not changed.

The debugger supports aliases, which can save typing.  And aliases can
have parameters (see the alias help entry) which allows one a certain
level of adaptability to the context under examination.

Multiple commands may be entered on a single line, separated by the
pair ';;'.  No intelligence is applied to separating the commands; the
input is split at the first ';;', even if it is in the middle of a
quoted string.

If a file ".pdbrc" exists in your home directory or in the current
directory, it is read in and executed as if it had been typed at the
debugger prompt.  This is particularly useful for aliases.  If both
files exist, the one in the home directory is read first and aliases
defined there can be overridden by the local file.  This behavior can be
disabled by passing the "readrc=False" argument to the Pdb constructor.

Aside from aliases, the debugger is not directly programmable; but it
is implemented as a class from which you can derive your own debugger
class, which you can make as fancy as you like.


Debugger commands
=================

N)	ExitStackclosingcontextmanager)	Completer)CodeType)
deprecatedc                       ] tR t^ltRtRtR# )RestartzBCauses a debugger to be restarted for the debugged python program. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r
       lib/python3.14/pdb.pyr	   r	   l   s    Lr   r	   runPdbhelpc                   Rp\         P                  ! V 4       FX  pVeP   VP                  R8X  d?   VP                  P                  e   VP                  P                  u # V P
                  u # TpKZ  	  V P
                  # )zTry to find the first executable line of the code object.

Equivalently, find the line number of the instruction that's
after RESUME

Return code.co_firstlineno if no executable line is found.
NRESUME)disget_instructionsopname	positionslinenoco_firstlineno)codeprevinstrs   &  r   find_first_executable_liner!   t   sn     D%%d+x 7%%1---&&& , r   c                   a  \         P                  ! R \         P                  ! S 4      ,          4      p \        P                  ! V4      pRp^ pT;_uu_ 4        \        V^R7       F  w  rxVP                  V4      '       d   YxrVMV'       d	   WX,          pV'       g   K9   \        WQR4      p	\        T 3R lT	P                   4       4      p
\!        T
4      pS YT,           ^,
          3u uuRRR4       # 	  RRR4       R#   \
         dK    \        P                  ! T4      pT'       g    R# \        P                  ! RP                  T4      4      p EL
i ; i  \         d     EK  i ; i  + '       g   i     R# ; i)zdef\s+%s(\s*\[.+\])?\s*[(]N )startexecc              3   ~   <"   T F2  p\        V\        4      '       g   K  VP                  S8X  g   K.  Vx  K4  	  R # 5iN)
isinstancer   co_name).0cfuncnames   & r   	<genexpr> find_function.<locals>.<genexpr>   s4       S>a *1h 7 !"<=II<Q !">s   ==
=)recompileescapetokenizeopenOSError	linecachegetlinesioStringIOjoin	enumeratematchSyntaxErrornext	co_constsr!   )r,   filenamecrefplinesfuncdef	funcstartr   liner   funccodelineno_offsets   f&          r   find_functionrH      s3   
**2RYYx5HH
IC)]]8$ GI	%b2LFyy%+7w"7f=D    S4>>  S S :8 D}+Dq+HHH! 
2 
" 3  )""8,[[(	)$ #  
" sS   D  4E+E+ E,=E+4E+ (E,%EEE(	#E+'E(	(E++E<	c                     \        \        P                  ! V 4      4      pVP                  4        V F  w  r4W8  g   K  Vu # 	  ^ # )    )listr   findlinestartsreverse)r   lasti
linestartsir   s   &&   r   lasti2linenorQ      s>    c((./J	:M   r   c                   *   a  ] tR t^t o RtR tRtV tR# )_rstrz#String that doesn't quote its repr.c                    V # r'   r
   selfs   &r   __repr___rstr.__repr__   s    r   r
   N)r   r   r   r   r   rW   r   __classdictcell____classdict__s   @r   rS   rS      s     - r   rS   c                   ,   a  ] tR t^t o V 3R ltRtV tR# )_ExecutableTargetc                N   < V ^8  d   Qh/ S[ ;R&   S[S[ ,          ;R&   S[;R&   # )   r?   r   	namespace)strr   dict)formatr[   s   "r   __annotate___ExecutableTarget.__annotate__   s*     M 
S.  O r   r
   N)r   r   r   r   __annotate_func__r   rY   rZ   s   @r   r]   r]      s      r   r]   c                   \   a  ] tR t^t o R tR t]R 4       t]R 4       t]R 4       t	Rt
V tR# )_ScriptTargetc                V   \         P                  P                  V4      V n        \         P                  P	                  V P                  4      '       g&   \        R V R24       \        P                  ! ^4       \         P                  P                  V P                  4      '       d&   \        R V R24       \        P                  ! ^4       \        P                  P                  '       g=   \         P                  P                  V P                  4      \        P                  ^ &   R# R# )zError: z does not existz is a directoryN)ospathrealpath_targetexistsprintsysexitisdirflags	safe_pathdirname)rV   targets   &&r   __init___ScriptTarget.__init__   s    ww''/ww~~dll++GF8?34HHQK77==&&GF8?34HHQK yy"""''//$,,7CHHQK #r   c                    V P                   # r'   rm   rU   s   &r   rW   _ScriptTarget.__repr__       ||r   c                    V P                   # r'   rz   rU   s   &r   r?   _ScriptTarget.filename   s    ||r   c                    \         P                  ! V P                  4      ;_uu_ 4       pR VP                  4       : RV P                  : R2uuRRR4       #   + '       g   i     R# ; i)zexec(compile(z, z
, 'exec'))N)r7   	open_coderm   read)rV   rA   s   & r   r   _ScriptTarget.code   sE     \\$,,''2"2779-r$,,1AL ('''s   #AA(	c                <    \        R V P                  \        RR7      # )__main__N)r   __file____builtins____spec__)rb   rm   r   rU   s   &r   r`   _ScriptTarget.namespace   s    \\%	
 	
r   rz   Nr   r   r   r   rw   rW   propertyr?   r   r`   r   rY   rZ   s   @r   rh   rh      sM     8   M M
 
 
r   rh   c                   \   a  ] tR t^t o R tR t]R 4       t]R 4       t]R 4       t	Rt
V tR# )_ModuleTargetc                V   Wn         ^ RIp VP                  V P                   4      w  q0n        V n        R#   \
         d0   p\        RT 24       \        P                  ! ^4        Rp?R# Rp?i\         d0    \        P                  ! 4        \        P                  ! ^4        R# i ; irJ   NzImportError: )rm   runpy_get_module_details_spec_codeImportErrorro   rp   rq   	Exception	traceback	print_excrV   rv   r   _es   &&   r   rw   _ModuleTarget.__init__   sw    	(-(A(A$,,(O%Az4: 	M!%&HHQKK 	!HHQK	s!   (6 B($A++B(8,B('B(c                    V P                   # r'   rz   rU   s   &r   rW   _ModuleTarget.__repr__   r|   r   c                .    V P                   P                  # r'   r   co_filenamerU   s   &r   r?   _ModuleTarget.filename       zz%%%r   c                    V P                   # r'   r   rU   s   &r   r   _ModuleTarget.code       zzr   c           	        \        R \        P                  P                  \        P                  P	                  V P
                  4      4      V P                  P                  V P                  P                  V P                  \        R7      # r   )r   r   __package__
__loader__r   r   
rb   rj   rk   normcaseabspathr?   r   parentloaderr   rU   s   &r   r`   _ModuleTarget.namespace   Y    WW%%bggoodmm&DE

))zz((ZZ%
 	
r   r   r   rm   Nr   rZ   s   @r   r   r      sK      & &   
 
r   r   c                   \   a  ] tR tRt o R tR t]R 4       t]R 4       t]R 4       t	Rt
V tR# )	
_ZipTargeti  c                   ^ RI p\        P                  P                  V4      V n        \
        P                  P                  ^ V P                  4        VP                  4       w  q0n        V n	        R#   \         d0   p\        RT 24       \
        P                  ! ^4        Rp?R# Rp?i\         d0    \        P                  ! 4        \
        P                  ! ^4        R# i ; ir   )r   rj   rk   rl   rm   rp   insert_get_main_module_detailsr   r   r   ro   rq   r   r   r   r   s   &&   r   rw   _ZipTarget.__init__  s    ww''/4<<(	(-(F(F(H%Az4: 	M!%&HHQKK 	!HHQK	s$   A3 3C%>$B((C%5,C%$C%c                    V P                   # r'   rz   rU   s   &r   rW   _ZipTarget.__repr__  r|   r   c                .    V P                   P                  # r'   r   rU   s   &r   r?   _ZipTarget.filename  r   r   c                    V P                   # r'   r   rU   s   &r   r   _ZipTarget.code  r   r   c           	        \        R \        P                  P                  \        P                  P	                  V P
                  4      4      V P                  P                  V P                  P                  V P                  \        R7      # r   r   rU   s   &r   r`   _ZipTarget.namespace  r   r   r   Nr   rZ   s   @r   r   r     sK      & &   
 
r   r   c                   8   a a ] tR tRt oV 3R ltR tRtVtV ;t# )_PdbInteractiveConsolei+  c                6   < W n         \        SV `	  VR R7       R# )T)locals
local_exitN)_messagesuperrw   )rV   nsmessage	__class__s   &&&r   rw   _PdbInteractiveConsole.__init__,  s    t4r   c                ,    V P                  VR R7       R# )r#   endNr   )rV   datas   &&r   write_PdbInteractiveConsole.write0  s    d#r   r   )	r   r   r   r   rw   r   r   rY   __classcell__r   r[   s   @@r   r   r   +  s     5$ $r   r   z
-> settracec                <    V R9  d   \        RV ,          4      hV sR# )z1Set the default backend to use for Pdb instances.zInvalid backend: %sN)r   
monitoring)
ValueError_default_backend)backends   &r   set_default_backendr   A  s$     00.899r   c                     \         # )z1Get the default backend to use for Pdb instances.)r   r
   r   r   get_default_backendr   I  s    r   c                   6  a a ] tR tRt oRtRt/ tRtRvR ltRwRR/V 3R lllt	RwRR/R llt
R tR	 tR
 tR t]]! R4      R 4       4       t]P$                  ]! R4      R 4       4       tR tR t]tR tR tR tR tR tR tR tR t]R 4       tR t R t!R t"]R 4       t#R t$R  t%R! t&R" t'R# t(R$ t)R% t*R& t+R' t,RxR( lt-R) t.R* t/V 3R+ lt0R, t1R- t2R. t3R/ t4R0 t5R1 t6]R2 4       t7R3 t8R4 t9R5 t:R6 t;]2t<RyR7 lt=R8 t>]=t?]1t@]1tAR9 tB]1tCR: tDRwR; ltER< tF]2tGR= tH]2tIR> tJ]2tKR? tL]2tMR@ tNRA tO]OtP]1tQ]1tRRB tS]StT]StURC tVRD tWRE tX]XtYRF tZ]Zt[RG t\]\t]RH t^]^t_RI t`]`taRJ tb]btcRK td]dteRL tf]f;tgthRM ti]itjRN tkRO tl]3tmRP tn]nto]ntpRQ tqRR tr]rtsRS tt]ttuRT tvRwRU ltwRV txRW tyRX tzRY t{RZ t|]3t}]3t~]3tR[ t]tR\ t]tR] t]3tRzR^ ltR_ t]3tR` t]3tRa tRb tRc tRd tRe tRf t. R{OtRwRg lt]3Rh ltRi t]tRj tRk tRl tV3Rm lRn ltV3Ro lRp ltRq tRr tRyRs ltRt tRutVtV ;t# )|r   iN  Ni  c
                   \         P                  P                  YV'       d   TM	\        4       R 7       \        P
                  P                  WW#4       \        P                  ! R4       V'       d   ^ V n        RV n	        / V n
        / V n        RV n        RV n        / V n        Wpn        T	;'       d0    \         P"                  ! T;'       g    \        P$                  R7      V n         ^ RIp
V
P+                  R4       RV n        WPn        \        P
                  P2                  R,           V n        . V n        V'       d    \7        \8        P:                  P=                  R	4      R
R7      ;_uu_ 4       pV P4                  P?                  V4       RRR4        \7        RR
R7      ;_uu_ 4       pT P4                  P?                  T4       RRR4       / V n!        RV n"        RV n#        RV n$        RV n%        \M        4       V n'        ^ V n(        RV n)        R#   \,         d     EL#i ; i  + '       g   i     L; i  \@         d     Li ; i  + '       g   i     L; i  \@         d     Li ; i))skipr   zpdb.Pdbz(Pdb) r#   FfileNz 	
`@#%^&*()=+[{]}\|;:'",<>?z=.[](),"'+-*/%@&|<>~^z~/.pdbrczutf-8)encodingz.pdbrc)*bdbBdbrw   r   cmdCmdrp   audituse_rawinputpromptaliases
displaying
mainpyfile_wait_for_mainpyfile	tb_linenomode	_colorizecan_colorizestdoutcolorizereadlineset_completer_delimsr   allow_kbdintnosigint
identcharsrcLinesr3   rj   rk   
expanduserextendr4   commandscommands_definingcommands_bnumasync_shim_frameasync_awaitabletuple_chained_exceptions_chained_exception_index_current_task)rV   completekeystdinr   r   r   readrcr   r   r   r   rcFiles   &&&&&&&&&&  r   rw   Pdb.__init__Y  s   W'J]J_`E:		) !D$)!	 VVY%;%;AUAU3::%V	))*LM "  '',,/GG "'',,Z87KKvLL''/ L(W55LL''/ 6
 !&! !%##(7 ()%!E  		 LK  65 sr   (H  2H7 2H$H7 I ,II H! H!$H4	/H7 4H7 7III	I I I)(I)r   c                  < V \         n        Vf    \        P                  ! 4       P                  pVe   V P
                  P                  V4       \        SV `!  V4       R # r'   )	r   _last_pdb_instancerp   	_getframef_backr   r   r   	set_trace)rV   framer   r   s   &&$r   r  Pdb.set_trace  sF    !%=MMO**ELL)% r   c               4  "   V P                   e   R # Vf    \        P                  ! 4       P                  pV P	                  WR7       Wn        V P                  4        \        P                  ! 4       V n        R V n          R V n         V P                  VRR 4       V P                   el    V P                  '       dC   V P                  V4      ;_uu_ 4        V P                  4        R R R 4       V P                  4        V P                   G R j  xL
  K   R T n        T P                  f&   T P                   R8X  d   T P                  '       g   R # T P                  4        R #   + '       g   i     L; i Lf  \         d    T P                  4         EK  i ; i5i)Nr   opcode)r   rp   r  r  r  	stopframe
stop_tracer   trace_dispatchbreaksset_enterframeset_continuestart_tracer   
_error_excreturnframe
stoplineno)rV   r  r   s   &&$r   set_trace_asyncPdb.set_trace_async  sA    +=MMO**E
 	u0 	 ###'D  x6##/&{{{!0077 --/ 8 ((*....  $ #2(=dkkk % 87 /  &OO%%&sZ   B&F)E5 ;E5 E %'E5 E3E5 :FF E0	+	E5 5FFFFc                    V P                   '       d   \        hV P                  R 4       V P                  4        V P	                  V4       R# )z-
Program interrupted. (Use 'cont' to resume).N)r   KeyboardInterruptr   set_stepr  )rV   signumr  s   &&&r   sigint_handlerPdb.sigint_handler  s6    ##EFur   c                d    \         P                  P                  V 4       V P                  4        R # r'   )r   r   resetforgetrU   s   &r   r(  	Pdb.reset  s    dr   c                   R V n         . V n        ^ V n        \        V R4      '       d9   V P                  '       d'   V P                  P
                  P                  RR 4       R V n        V P                  P                  4        R # )Ncurframe__pdb_convenience_variables)	r   stackcurindexhasattrr,  	f_globalspopr   clearrU   s   &r   r)  
Pdb.forget  s^    
4$$MM##''(EtLr   c                   V P                  4        V P                  W4      w  V n        V n        V'       dQ   \	        VP
                  P                  VP                  4      pW0P                  VP
                  &   VP                  pKX  V P                  V P                  ,          ^ ,          V n
        V P                  V P                  RV P                  4       V P                  '       d(   V P                  V P                  RV P                  4       V P                  V P                  4       V P                  '       d9   V P                  V P                  RV P                  V P                  ,          4       V P                   '       dj   V P                    Uu. uFD  pVP#                  4       '       g   K  VP#                  4       P%                  R4      '       d   KB  VNKF  	  upV n        . V n        R# R# u upi )rJ   _frame
_asynctask
_exception#N)r)  	get_stackr.  r/  rQ   tb_framef_codetb_lastir   tb_nextr,  set_convenience_variabler  _save_initial_file_mtimer  r  r   strip
startswithcmdqueue)rV   ftbr   rE   s   &&&  r   setup	Pdb.setup  sc   $(NN1$9!
DM ""++"4"4bkkBF*0NN2;;'B

4==1!4%%dmmXt}}M))$--tGYGYZ%%dmm4###))(()F)FG <<<!%!-::< (,

(?(?(D DM DL s   G22"G2G2zPThe frame locals reference is no longer cached. Use 'curframe.f_locals' instead.c                .    V P                   P                  # r'   )r,  f_localsrU   s   &r   curframe_localsPdb.curframe_locals   s     }}%%%r   zgSetting 'curframe_locals' no longer has any effect. Update the contents of 'curframe.f_locals' instead.c                    R # r'   r
   )rV   values   &&r   rJ  rK    s     	r   c                    V P                   '       d   R# V P                  V4      '       d&   V P                  R4       V P                  VR4       R# R# )zfThis method is called when there is the remote possibility
that we ever need to stop in this function.Nz--Call--)r   	stop_herer   interaction)rV   r  argument_lists   &&&r   	user_callPdb.user_call  sC     $$$>>%  LL$UD) !r   c                N   V P                   '       d>   V P                  V P                  VP                  P                  4      8w  d   R# RV n         V P
                  '       d!   VP                  f   V P                  4        R# V P                  V4       V P                  VR4       R# )z;This function is called when we stop or break at this line.NF)
r   r   canonicr<  r   trace_opcodesf_linenoset_stepinstrbp_commandsrP  )rV   r  s   &&r   	user_linePdb.user_line  s}    $$$4<<0H0H#II(-D% ~~%""$%r   c                J   \        V RR4      '       d   V P                  V P                  9   ds   V P                  p^ V n        V P                  V,           F  pV P                  P	                  V4       K   	  V P                  P	                  RV P
                   24       R# R# R# )zCall every command that was set for the current active breakpoint
(if there is one).

Returns True if the normal interaction function must be called,
False otherwise.	currentbpFz_pdbcmd_restore_lastcmd N)getattrr]  r   rC  appendlastcmd)rV   r  r]  rE   s   &&  r   rY  Pdb.bp_commands'  s     4e,,~~.IDNi00$$T* 1MM  #;DLL>!JK / -r   c                    V P                   '       d   R# W!P                  R&   V P                  VRV4       V P                  R4       V P	                  VR4       R# )z7This function is called when a return trap is set here.N
__return___retvalz
--Return--)r   rI  r?  r   rP  )rV   r  return_values   &&&r   user_returnPdb.user_return6  sK    $$$'3|$%%eYE\"%r   c                   V P                   '       d   R# Vw  r4pW43VP                  R&   V P                  VRV4       V'       g   V\        J d   RMRpV P	                  V: V P                  V4      : 24       V P                  W4       R# )zgThis function is called if an exception occurs,
but only if we are to stop at or just below this level.N__exception__r8  z	Internal r#   )r   rI  r?  StopIterationr   _format_excrP  )rV   r  exc_infoexc_type	exc_valueexc_tracebackprefixs   &&&    r   user_exceptionPdb.user_exception?  s     $$$-5*]*2*='%%e\9E &3(0M(A HJ 	vt'7'7	'BCD.r   c                      R V n         V P                  4        RV n         R#   \         d    T P                  R4        KA  i ; i)TFz--KeyboardInterrupt--N)r   cmdloopr"  r   rU   s   &r   _cmdloopPdb._cmdloopS  sD    6 %)!$)!$ 6456s   # AAc                    V'       db   VP                   P                  pW P                  9  d.    \        P                  P                  V4      V P                  V&   VP                  pKi  R#   \         d     Li ; i)znsave the mtime of the all the files in the frame stack in the file mtime table
if they haven't been saved yet.N)r<  r   _file_mtime_tablerj   rk   getmtimer   r  )rV   r  r?   s   && r   r@  Pdb._save_initial_file_mtime_  sj     ||//H55579ww7G7G7QD**84 LLE 
 ! s   ,A, ,A:9A:c                F    V P                   P                  P                  p\        P                  P                  V4      pYP                  9   d?   Y P                  T,          8w  d&   T P                  RT R24       Y P                  T&   R# R# R#   \         d     R# i ; i)z|Check if the source file of the current frame has been modified.
If so, give a warning and reset the modify time to current.Nz*** WARNING: file 'z;' was edited, running stale code until the program is rerun)	r,  r<  r   rj   rk   ry  r   rx  r   )rV   r?   mtimes   &  r   _validate_file_mtimePdb._validate_file_mtimek  s    	}}++77HGG$$X.E ...++H55LL.xj 9I I J/4""8, 6 /  		s   ?B B B c                V   V P                   P                  V P                  4      pV'       d|   VP                  4        Fe  w  r#V P	                  V4      pWCJg   K  WC8w  g   K%  WAV&   V P                  R V: RV P                  WB4      : RV P                  W24      : R24       Kg  	  R# R# )display : z  [old: ]N)r   getr,  items_getval_exceptr   
_safe_repr)rV   r   exproldvaluenewvalues   &    r   _show_displayPdb._show_display{  s    __((7
","2"2"4..t4 +0D'/t$LL"&(G"&//("A"C D #5 r   c                   . p\        V\        4      '       d   VP                  TrCVe   WB9   d   MVP                  V4       VP                  e   VP                  pM,VP
                  e   VP                  '       g   VP
                  p\        V4      V P                  8  g   K  V P                  RV P                   R24       MMTp\        \        V4      4      V3# )a  
Given a tracecack or an exception, return a tuple of chained exceptions
and current traceback to inspect.

This will deal with selecting the right ``__cause__`` or ``__context__``
as well as handling cycles, and return a flattened list of exceptions we
can jump to with do_exceptions.

z
More than zQ chained exceptions found, not all exceptionswill be browsable with `exceptions`.)r(   BaseException__traceback__r_  	__cause____context____suppress_context__lenMAX_CHAINED_EXCEPTION_DEPTHr   r  reversed)rV   	tb_or_exc_exceptionsr   currents   &&   r   _get_tb_and_exceptionsPdb._get_tb_and_exceptions  s     i//!*!8!8)w%)""7+$$0%//G''3G<X<X<X%11G{#t'G'GGLL$T%E%E$F??
 # && "IXk*+Y66r   c              #     "    Wn         \        V4      ^,
          V n        Rx  \        4       V n         ^ V n        R#   \        4       T n         ^ T n        i ; i5i)a  
Context manager to ensure proper cleaning of exceptions references

When given a chained exception instead of a traceback,
pdb may hold references to many objects which may leak memory.

We use this context manager to make sure everything is properly cleaned

N)r  r  r  r  )rV   
exceptionss   &&r   _hold_exceptionsPdb._hold_exceptions  sM     	.'1$,/
Oa,?D) (-wD$,-D) (-wD$,-D)s   A!= AAAc                Z     \         P                  ! 4       pV#   \         d    R p T# i ; ir'   )asynciocurrent_taskRuntimeError)rV   tasks   & r   _get_asyncio_taskPdb._get_asyncio_task  s7    	'')D   	D	s    **c                   \         P                  '       d@    \        P                  ! \        P                  \         P                  4       R \         n        V P                  4       V n        V P                  V4      w  r4\        V\        4      '       d   Vf   Q R4       hV P                  V4      ;_uu_ 4        V P                  W4       V P                  P                  R4       V P                  4        V P                  '       d3   V P                  R,          R8X  d   V P                  P                  4        V P!                  4        R R R 4       R #   \         d     ELi ; i  + '       g   i     R # ; i)Nz$main exception must have a traceback_pdbcmd_print_frame_statusr  )r   _previous_sigint_handlersignalSIGINTr   r  r  r  r(   r  r  rF  rC  r_  ru  r2  r)  )rV   r  r  r  rE  s   &&&  r   rP  Pdb.interaction  s   '''4fmmS-I-IJ 04,!335"&"="=i"Hi//>I#II>""#677JJu! MM  !=>MMO}}}r!26R!R!!#KKM 87   877s   3E 8BE%E"!E"%E6	c                F    Ve   V P                  \        V4      4       R# R# )zkCustom displayhook for the exec in default(), which prevents
assignment of the _ variable in the builtins.
N)r   reprrV   objs   &&r   displayhookPdb.displayhook  s    
 ?LLc# r   c              #    a"    ^ RI oT3R lpT P                  p T P                  T n        SP	                  T4       Rx  SP	                  4        Y n        R#   \         d	    Rx   R# i ; i  SP	                  4        Y n        i ; i5i)rJ   Nc                  r  < SP                  4       p SP                  V 4      pV'       d   VP                  4       '       d   R # VP                  R4      p\	        V4      \	        VP                  4       4      ,
          pVP                  R4      '       d
   V^,          pSP                  RV,          4       R # R # )N
: )get_current_history_lengthget_history_itemisspacerstripr  lstripendswithinsert_text)
last_index	last_lineindentr   s      r   input_auto_indent6Pdb._enable_multiline_input.<locals>.input_auto_indent  s    !<<>J 11*=I$$&&%,,V4	Y#i.>.>.@*AA%%c**aKF$$S6\2 r   )r   r   completenamescomplete_multiline_namesset_startup_hook)rV   r  r  r   s   &  @r   _enable_multiline_inputPdb._enable_multiline_input  s     	
	3 **	/!%!>!>D%%&78%%'!.5  		0 %%'!.s>   BA B&A0 BA-)B,A--B0BBc                z  a
 \        VRR4      p\        ;QJ d&    R VP                   4       F  '       g   K   RM	  RM! R VP                   4       4      '       g   R# \        V4      o
RRR/ /S
R	&    \        VRR
4       RV,           pR\
        P                  ! VR4      ,           R,           R,           R,           pRRP                  R S
 4       4      ,           R,           R,           RP                  R S
 4       4      ,           R,           \
        P                  ! VR4      ,           R,           R,           p/ p \        V/ V4       TR,          ! 4       p\        ;QJ d!    . T
3R lTP                   4       F  NK  	  5M! T
3R lTP                   4       4      p \        YBS
TR7       S
R	,          pTR,          P                  R	4       TP                  TR,          4       TR,          p	T	e   \        \        T	4      4       R#   \         d     ELi ; i  \         d     R# i ; i  \         d     R# i ; i)zRun source code in closure so code object created within source
can find variables in locals correctly

returns True if the source is executed, False otherwise
<string>r%   c              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir'   )r(   r   )r*   consts   & r   r-   'Pdb._exec_in_closure.<locals>.<genexpr>  s     KN5:eX..N   TFresultN
write_back__pdb_eval__evalz__pdb_eval__['result'] = ztry:
  
z	finally:
z'  __pdb_eval__['write_back'] = locals()zdef __pdb_outer():
c              3   .   "   T F  pR V R2x  K  	  R# 5i)r  z = NoneNr
   r*   vars   & r   r-   r  <  s     (Rks2cU'):ks   z  def __pdb_scope():
c              3   ,   "   T F
  pR V 2x  K  	  R# 5i)z    nonlocal Nr
   r  s   & r   r-   r  >  s     (V+3=)>+s       z  return __pdb_scope.__code____pdb_outerc              3   n   <"   T F*  p\         P                  ! SP                  V4      4      x  K,  	  R # 5ir'   )typesCellTyper  )r*   r  locals_copys   & r   r-   r  M  s(     WFVsenn[__S%9::FVs   25)closure)r0   anyr>   rb   r<   textwrapr  r9   r%   r   r  co_freevarsr2  updatero   r  )rV   sourceglobalsr   r   source_with_closurer   cellspdb_evaleval_resultr  s   &&&&      @r   _exec_in_closurePdb._exec_in_closure  s*    vz62sKDNNKsssKDNNKKK 6l d"'
N#	:FJ/ 169F //&$/0267 <<  6#yy(Rk(RR SUY Z7 8  $yy(V+(VV W Z^ ^  (vv>	 ? BF	 F
  ? ? 	$b"- - "WdFVFVWWdFVFVWW	U;
 ~. 	"">2 	h|,-x("${#$o  		@  		  		s6   4H ;H H+ HHH('H(+H:9H:c                    R\         P                  ! VR4      ,           R,           R,           pW#,          pW5R&   \        WE4       VR,          ! 4       V n        R# )zDRun source code that contains await by playing with async shim framezasync def __pdb_await():
r  r  z!    __pdb_locals.update(locals())__pdb_locals__pdb_awaitN)r  r  r%   r   )rV   r  r  r   source_asyncr   s   &&&&  r   _exec_awaitPdb._exec_awaitb  sY     )OOFF+,.23/0 	
 #>\!-02r   c                   TpR pRp \         P                  ! VR,           RR4      ;pEfW   V P                  4       ;_uu_ 4        TpRp\         P                  ! VRR4      ;pEf   V P                  '       d    \	        V4      pMV P                  P                  V4       V P                  P                  4        V P                  P                  4       p\        V4      '       gI   RV n        V P                  P                  R4       V P                  P                  4        R
uuRRR4       # VP                  R4      pVP!                  4       '       d   VR,          pEK  VRV,           ,          pEK*  W n        RRR4       M WBV3#   \
        \        3 d"    RT n        \        R4       R
u uuRRR4       # i ; i  + '       g   i     LI; i  \"         d-   pT P$                  e   TP&                  R8X  d   R	p Rp?L}h Rp?ii ; i)FNr  <stdin>singlez...   r#   r  z'await' outside functionT)NNF)codeopcompile_commandr  r   inputEOFErrorr"  r`  ro   r   r   flushr  r   r  r  r  r<   r   msg)rV   rE   bufferis_await_coder   continue_promptr   s   &&     r   
_read_codePdb._read_codep  s   '	..td{IxPPY1133!F&.O#)#9#9&)X#VV4_,,,9',_'= !KK--o> KK--/#'::#6#6#8D#&t99/1 $ 1 1$ 7 $ 1 1 3'8' 43* (,{{6':<<>>"dNF"dTk1F#)L7 43 ZP ]**? %-.?#@ 9/1 %d'8 8 439 438  	 %%1EE77 $	sx   <G 3F<9FBF<"
G -&F<%F<9G %F9,F<-
G 8F99F<<G	G G H!H HHc                @   VR ,          R8X  d   VR,          P                  4       pV P                  P                  pV P                  P                  p V P	                  V4      w  rEpVf   R# \
        P                  p\
        P                  p\
        P                  p	 V P                  \
        n        V P                  \
        n        V P                  \
        n        V'       d7   V P                  WSV4        V\
        n        V\
        n        V	\
        n        R# V P                  WSV4      '       g   \        WCV4       V\
        n        V\
        n        V	\
        n        R#   T\
        n        T\
        n        T	\
        n        i ; i   T P                  4         R# ; i):N   N!r  NNNT)rA  r,  rI  r1  r  rp   r   r  r  r  r  r%   r  )
rV   rE   r   r  r   r  r  save_stdout
save_stdinsave_displayhooks
   &&        r   defaultPdb.default  s(   8s?48>>#3D''--))	*.//$*?'D-~**KJ"3 JJ	![[
"&"2"2 $$Vf=
 )
&	"2  00&IITF3(
&	"2 )
&	"2	OOs=   F -0F AE" %E" 8!F $E" ?!F "#FF Fc                Z   RV9  d   V# R;r#. p \         P                  ! \        P                  ! V4      P                  4       Fj  pVw  rgrp
V\
        P                  8X  d   VR8X  d   Yr2K)  W8X  g   K1  V\
        P                  8X  g   KH  VP                  V^,          V	^,          V34       Kl  	  T'       g   T# ^ p. pT F&  w  rpTP                  YT RT R2,           4       T	pK(  	  TP                  YR 4       RP                  T4      #   \         P                   d    Tu # i ; i)zReplace the convenience variables in 'line' with their values.
e.g. $foo is replaced by __pdb_convenience_variables["foo"].
Note: such pattern in string literals will be skipped$z__pdb_convenience_variables["z"]Nr#   )r  r  )r2   generate_tokensr7   r8   r   tokenOPNAMEr_  
TokenErrorr9   )rV   rE   dollar_start
dollar_endreplace_variablest
token_typetoken_stringr$   r   r   last_endline_piecesnames   &&            r   _replace_convenience_variables"Pdb._replace_convenience_variables  s&   
 d?K$,,		--bkk$.?.H.HI:;7
%a)lc.A/4*(Z5::-E%,,l1os1v|-TU J !K 1EtU38UVZU[[]6^^_H !2 	4	?+ww{## "" 	K	s   A D 5D &D D*)D*c                p   VP                  4       '       g   V# VP                  4       pV^ ,          V P                  9   d   V P                  V^ ,          ,          p\        ^^
4       F  pRV 2V9   dM   V\	        V4      8  d    V P                  RV^ ,           R24        R# VP                  RV 2W#,          4      pKY  RV9  g   Kb  V\	        V4      8  d    V P                  RV^ ,           R24        R#  M	  VP                  RRP                  VR,          4      4      pVP                  4       pEK  V^ ,          R	8w  da   VP                  R
4      pV^ 8  dI   W^,           R P                  4       pV P                  P                  ^ V4       VRV P                  4       pV P                  V4      pV# )z*Handle alias expansion and ';;' separator.%z Not enough arguments for alias ''r   %*zToo many arguments for alias 'r  r  aliasz;;N)rA  splitr   ranger  errorreplacer9   findr  rC  r   r  r  )rV   rE   argsidxmarkerr=   s   &&    r   precmd
Pdb.precmd  sr   zz||Kzz|1g%<<Q(DQ|se9$c$i'

%Ed1gYa#PQ"<<!C5	49=D%SY

%CDG9A#NO" $ <<chhtBx&89D::<D 7gYYt_F{1HI--/$$Q-GV}++- 2248r   c                    V P                   '       gm   VP                  R4      '       d7   V P                  V4      w  r#p\        W4      '       d   \	        W4      ! V4      # \
        P                  P                  W4      # V P                  V4      # )zInterpret the argument as though it had been typed in response
to the prompt.

Checks whether this line is typed at the normal prompt or in
a breakpoint command list definition.
_pdbcmd)	r   rB  	parseliner0  r^  r   r   onecmdhandle_command_def)rV   rE   commandargs   &&  r   r+  
Pdb.onecmd  sq     %%%y))%)^^D%9"d4))"41#6677>>$--**400r   c                   V P                  V4      w  r#pV'       g   R# VR8X  d   R# VR8X  d   V P                  R4       R# V P                  V P                  ,          pVR8X  d   VP	                  R4       R# V'       d!   VP	                  VR,           V,           4       MVP	                  V4        \        V R	V,           4      pVP                  V P                  9   d   R# R#   \         d    T P                  p L8i ; i)
z8Handles one command line during command list definition.Fr   TEOFr#   silent_pdbcmd_silence_frame_statusr  do_)
r*  r   r   r   r_  r^  AttributeErrorr  r   commands_resuming)rV   rE   r   r.  cmdlistfuncs   &&    r   r,  Pdb.handle_command_def  s    -$%<E\LL-- 2 23(?NN9:NN3s73;'NN3	 4-D ==D222  	 <<D	 s   3C% %C?>C?c                    V P                   '       d]   \        \        P                  P	                  V4      4      p\        P                  P                  WR R7      w  r4RP                  V4      pV# )T)colorsforce_colorr#   )r   rK   _pyreplutils
gen_colorsdisp_strr9   )rV   r   r;  charsr   s   &&   r   _colorize_codePdb._colorize_code.  sQ    ==='--22489F}}--dt-THE775>Dr   c                4    \        WV P                  R 7       R# ))r   r   Nro   r   rV   r  r   s   &&&r   r   Pdb.message7  s    c-r   c                4    \        R WP                  R7       R# )***r   NrE  rV   r  s   &&r   r   	Pdb.error:  s    eS{{+r   c                p    R VP                   9  d   / VP                   R &   W1P                   R ,          V&   R# )r-  N)r1  )rV   r  r  rM  s   &&&&r   r?  Pdb.set_convenience_variable?  s/    (?=?EOO9:?D56t<r   c                  < \         SV `  WW44      pV P                   F-  pVP                  V4      '       g   K  VP	                  V4       K/  	  V'       d   V# V P                  WW44      pV'       d   V# V P                  WW44      # r'   )r   r  r   rB  r_  _complete_expressioncompletedefault)	rV   textrE   begidxendidxr   r  expressionsr   s	   &&&&&   r   r  Pdb.completenamesG  sy     7(VD\\E%%& " O33DOK""''FCCr   c                ^   VP                  4       P                  R4      '       d   . #  V P                  WW44      p\        P                  ! \        P
                  ! V4      R,           4      pV F  p\        P                  P                  V4      '       d   VP                  VR,           4       KB  \        P                  P                  V4      '       g   Ki  VP                  4       P                  R4      '       g   K  VP                  VR ,           4       K  	  V#   \         d    . p Li ; i)r  */)r  ,).pyz.pyw)rA  r  rO  r   globr1   rj   rk   rr   r_  isfilelower)rV   rQ  rE   rR  rS  retglobsfns   &&&&&   r   _complete_locationPdb._complete_locationV  s    ::<  ,,I	++DGC 		$++d+c12Bww}}R  

28$##
(;(;O(L(L

28$	 
 
  	C	s   D D,+D,c                    \        \        P                  P                  4       UUu. uF8  w  rVVf   K  \	        V4      P                  V4      '       g   K-  \	        V4      NK:  	  upp# u uppi r'   )r:   r   
Breakpoint
bpbynumberra   rB  )rV   rQ  rE   rR  rS  rP   bps   &&&&&  r   _complete_bpnumberPdb._complete_bpnumberi  sZ     %.cnn.G.G$H ?$H51 &)!f&7&7&= A$H ? 	? ?s   A)A)A)c                   V P                   '       g   . # / V P                   P                  CV P                   P                  CpR V9   d   VP                  R 4      p V^ ,          P	                  R4      '       d4   V P                   P                  R,          V^ ,          R,          ,          pMWV^ ,          ,          pV^R  F  p\        Wx4      pK  	  R P                  TRR 4      R ,           p	\        T4       U
u. uF*  qP	                  TR,          4      '       g   K"  Y,           NK,  	  up
# VP	                  R4      '       d[   V P                   P                  P                  R/ 4      pV Uu. uF'  qP	                  VR,          4      '       g   K"  RV 2NK)  	  up# VP                  4        U
u. uF  qP	                  V4      '       g   K  V
NK  	  up
#   \        \        3 d    . u # i ; iu up
i u upi u up
i ).r  r-  r  Nr  )r,  r1  rI  r  rB  r^  KeyErrorr5  r9   dirr  keys)rV   rQ  rE   rR  rS  r   dottedr  partrp  n	conv_varsr  s   &&&&&        r   rO  Pdb._complete_expressionp  s   }}}I C''B4==+A+AB$; ZZ_F!9'',,--112OPQWXYQZ[]Q^_CAY-C"1RLD!#,C ) XXfSbk*S0F(+CM1LL4LJFJJMMs## MM33778UWYZ	/8VytOODQSH<U
!D6
yVV!wwy?y!LL,>AAy?? n- 	 N
 W?s=   G :AG ;G0G0/G5	G51G:G:G-,G-c                ~     ^ RI pR^TP                  4       ^,          ,
          ,          .#   \         d    . u # i ; i)rJ   Nr  )r   r   
get_begidx)rV   rQ  rE   rR  rS  r   s   &&&&& r   _complete_indentationPdb._complete_indentation  sC    	 q8..0144566  	I	s   , <<c                v    VP                  4       '       g   V P                  WW44      # V P                  WW44      # r'   )rA  ru  rP  )rV   rQ  rE   rR  rS  s   &&&&&r   r  Pdb.complete_multiline_names  s5     zz||--d&II##D??r   c                   VP                  R 4      '       d[   V P                  P                  P                  R/ 4      pV Uu. uF'  qfP                  VR,          4      '       g   K"  R V 2NK)  	  up# ^ p. p\	        V P                  P                  V P                  P
                  ,          4      p	V	P                  W4      ;p
e   VP                  V
4       V^,          pK1  V# u upi )r  r-  r  )rB  r,  r1  r  r   rI  completer_  )rV   rQ  rE   rR  rS  rq  r  statematches	completerr;   s   &&&&&      r   rP  Pdb.completedefault  s    ??3//334QSUVI+4R94R8QJavJ9RR dmm558N8NNO	!**477uDNN5!QJE Ss   C#&	C#c              #    "    ^ RI p TP                  4       p\        T4      pTP	                  TP
                  4       Rx  TP	                  T4       R#   \         d	    Rx   R# i ; i  TP	                  X4       i ; i5irJ   N)r   r   get_completerr   set_completerrz  )rV   r   r   old_completerr}  s   &&   r   _enable_rlcompleterPdb._enable_rlcompleter  su     	
	2$224M!"I""9#5#56""=1  		 ""=1s9   BA :A, BA)%B(A))B,A??Bc                h    V P                  ^ 4       V P                  4        V P                  4        R# r  )print_stack_tracer}  r  rV   r.  s   &&r   r  Pdb._pdbcmd_print_frame_status  s(    q!!!#r   c                    V P                   '       d7   V P                   R,          R8X  d   V P                   P                  4        R# R# R# )r  r  Nr  )rC  r2  r  s   &&r   r3   Pdb._pdbcmd_silence_frame_status  s4    ===T]]2.2NNMM O=r   c                    Wn         R # r'   )r`  r  s   &&r   _pdbcmd_restore_lastcmdPdb._pdbcmd_restore_lastcmd  s    r   c                   V'       g,   \        \        P                  P                  4      ^,
          pM \	        V4      p V P                  V4       Y n	        Y P                  9   d   T P                  T,          pMRp. T P                  T&   T P                  pRT n        RT n         T P                  4        RT n        YPn        R#    T P                  T4        R# ; i  \         d$   pT P                  RT,          4        Rp?R# Rp?ii ; i  \         d9    T'       d   Y@P                  T&   MT P                  T T P                  R4        Li ; i  RT n        YPn        i ; i)aR  (Pdb) commands [bpnumber]
(com) ...
(com) end
(Pdb)

Specify a list of commands for breakpoint number bpnumber.
The commands themselves are entered on the following lines.
Type a line containing just 'end' to terminate the commands.
The commands are executed when the breakpoint is hit.

To remove all commands from a breakpoint, type commands and
follow it immediately with end; that is, give no commands.

With no bpnumber argument, commands refers to the last
breakpoint set.

You can use breakpoint commands to start your program up
again.  Simply use the continue command, or step, or any other
command that resumes execution.

Specifying any command resuming execution (currently continue,
step, next, return, jump, quit and their abbreviations)
terminates the command list (as if that command was
immediately followed by end).  This is because any time you
resume execution (even with a simple next or step), you may
encounter another breakpoint -- which could have its own
command list, leading to ambiguities about which list to
execute.

If you use the 'silent' command in the command list, the usual
message about stopping at a breakpoint is not printed.  This
may be desirable for breakpoints that are to print a specific
message and then continue.  If none of the other commands
print anything, you will see no sign that the breakpoint was
reached.
Nzcannot set commands: %sz(com) Tz1command definition aborted, old commands restoredF)r  r   rd  re  int_print_invalid_argget_bpbynumberr   r   r   r   r   r   rt  r"  )rV   r.  bnumerrold_commandsprompt_backs   &&    r   do_commandsPdb.do_commands  s2   J s~~001A5D3x	%
 "== ==.LL dkk!%	&LLN &+D"%K?'',  	JJ0367	" ! 	L&2d#MM$'JJJK	L &+D"%KsM   C C  (D C D+D		DE$-EE EE E&c                   V'       gp   V P                   '       d\   V P                  R4       \        P                  P                   F,  pV'       g   K  V P                  VP                  4       4       K.  	  R# RpRpRpRpVP                  R4      pV^ 8  da   W^,           R P                  4       pV P                  V4      ;p	'       d   V P                  RV: RV	: 24       R# VRV P                  4       pVP                  R4      p
RpV
^ 8  do   VRV
 P                  4       pV P                  V4      pV'       g   V P                  RV,          4       R# TpW^,           R P                  4       p \        V4      pM \        V4      pV'       g   V P7                  4       pV P9                  V4      pV P;                  WEV4      pV'       d   V P=                  VVW&V4      p	V	'       d   V P                  V	4       R# V P?                  VV4      R,          pV P                  RVP@                  VPB                  VPD                  3,          4       R# R#   \         d    T P                  RT,          4        R# i ; i  \         d     \        TT P                   P"                  T P                   P$                  4      pM	   Tp M; i \'        TR	4      '       d   TP(                  pTP*                  pTP,                  p\/        T4      pTP0                  pTP2                  p EL   T P5                  T4      w  rpT'       g   T P                  R
T,          4         R# Tp\        T4      p  EL; ii ; i)a[  b(reak) [ ([filename:]lineno | function) [, condition] ]

Without argument, list all breaks.

With a line number argument, set a break at this line in the
current file.  With a function name, set a break at the first
executable line of that function.  If a second argument is
present, it is a string specifying an expression which must
evaluate to true before the breakpoint is honored.

The line number may be prefixed with a filename and a colon,
to specify a breakpoint in another file (probably one that
hasn't been loaded yet).  The file is searched for on
sys.path; the .py suffix may be omitted.
z!Num Type         Disp Enb   WhereNrY  Invalid condition r  r  z%r not found from sys.pathzBad lineno: %s__func__zJThe specified object %r is not a function or was not found along sys.path.zBreakpoint %d at %s:%dr  )#r  r   r   rd  re  bpformatr"  r  _compile_error_messager   r  rfindlookupmoduler  r   r  r,  r1  rI  r0  r  __code__r)   r!   r   __globals__lineinfodefaultFilerU  	checkline	set_break
get_breaksnumberr   rE   )rV   r.  	temporaryrf  r?   r   condmodule_globalscommar  colonr,   rD  r8  r   oklnrE   s   &&&               r   do_breakPdb.do_break  s     {{{@A..33BrR[[]3 4  19Qwx='')D11$77s7

sCDfu+$$&C		#A:6E{))+H!!(+A

7(BCAgh-&&(CS%S6 '')H<<)~~h?..4(KC

3__Xt4R85 ii"'':; < M  

+c12  % $ 7 7 $ 6 68DD%tZ00#}}==D  $||H7=F#//H%)%5%5N%)-s);&R2

 $FHK$L M!H WF3%s[   4I I> #I;:I;>M5
5K ?M5 KM5
AL&&6M1M5 M1-M51M5c                    V P                   P                  P                  pVR8X  d   V P                  '       d   V P                  pV# )zProduce a reasonable default.r  )r,  r<  r   r   )rV   r?   s   & r   r  Pdb.defaultFile  s5    ==''33z!doooHr   c                *    V P                  VR4       R# )ztbreak [ ([filename:]lineno | function) [, condition] ]

Same arguments as break, but sets a temporary breakpoint: it
is automatically deleted when first hit.
TN)r  r  s   &&r   	do_tbreakPdb.do_tbreak  s     	c4 r   c                <   RpVP                  R4      p\        V4      ^8X  d   V^ ,          P                  4       pM*\        V4      ^8X  d   V^,          P                  4       pMV# VR8X  d   V# VP                  R4      pV^ ,          R8X  d   V^  \        V4      ^ 8X  d   V# V P                  4       p\        V4      ^8X  d   V^ ,          pM+V P	                  V^ ,          4      pV'       d   TpV^,          p\        WpP                  V4      4      p	T	;'       g    T# )Nr  r#   rj  rV   )NNN)r  r  rA  r  r  rH   rU  )
rV   
identifierfailedidstringidpartsfnameitemrD  answers
   &&        r   r  Pdb.lineinfo  s    ###C(x=A!""$B]a!""$BM8F]8va5zQ  "u:?8D !!%(+A8Dt\\%%89r   c                b   \        V RR4      pVf   V'       d   VP                  MRp\        P                  ! WV4      pV'       g   V P	                  R4       ^ # VP                  4       pV'       d+   V^ ,          R8X  g   VR,          R8X  g   VR,          R8X  d   V P                  R4       ^ # V# )	zCheck whether specified line seems to be executable.

Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
line or EOF). Warning: testing is not comprehensive.
r,  NzEnd of filer9  :N   Nz"""z'''zBlank or comment)r^  r1  r5   getliner   rA  r   )rV   r?   r   r  r  rE   s   &&&&  r   r  Pdb.checkline  s     j$/!05U__4N  >BLL'zz|aC2h%DH$5JJ)*r   c                6   V'       g   V P                  V4       R# VP                  4       pV F=  p V P                  V4      pVP                  4        V P	                  RV,          4       K?  	  R#   \
         d   pT P                  T4        Rp?Ke  Rp?ii ; i)zoenable bpnumber [bpnumber ...]

Enables the breakpoints given as a space separated list of
breakpoint numbers.
Nz
Enabled %s)r  r  r  enabler   r   r   rV   r.  r#  rP   rf  r  s   &&    r   	do_enablePdb.do_enable  s}     ##C(yy{A0((+ 		\B./    

3    A11B<BBc                6   V'       g   V P                  V4       R# VP                  4       pV F=  p V P                  V4      pVP                  4        V P	                  RV,          4       K?  	  R#   \
         d   pT P                  T4        Rp?Ke  Rp?ii ; i)a  disable bpnumber [bpnumber ...]

Disables the breakpoints given as a space separated list of
breakpoint numbers.  Disabling a breakpoint means it cannot
cause the program to stop execution, but unlike clearing a
breakpoint, it remains in the list of breakpoints and can be
(re-)enabled.
NzDisabled %s)r  r  r  disabler   r   r   r  s   &&    r   
do_disablePdb.do_disable  s}     ##C(yy{A1((+ 

]R/0    

3 r  c                   V'       g   V P                  V4       R# VP                  R^4      p V^,          pV P                  V4      ;p'       d   V P                  RV: RV: 24       R#   V P                  V^ ,          P                  4       4      pW5n        V'       g%   V P                  RVP                  ,          4       R# V P                  RVP                  ,          4       R#   \         d    Rp Li ; i  \         d    T P                  R4        R# \         d   pT P                  T4        Rp?R# Rp?ii ; i)zcondition bpnumber [condition]

Set a new condition for the breakpoint, an expression which
must evaluate to true before the breakpoint is honored.  If
condition is absent, any existing condition is removed; i.e.,
the breakpoint is made unconditional.
Nr  r  r  z#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.Breakpoint number expected)r  r  r  r   
IndexErrorr  rA  r  r   r  r   )rV   r.  r#  r  r  rf  s   &&    r   do_conditionPdb.do_condition  s    ##C(yya 	7D11$77s7

sCD 8
	Q$$T!W]]_5B GBRYYNOCbiiOP  	D	  	5JJ34 	JJsOO	s;   !C* C* .&C= *C:9C:=EE%E&D==Ec                   V'       g   V P                  V4       R# VP                  4       pV'       g   V P                  R4       R# \        V4      ^8X  d   ^ pM7\        V4      ^8X  d    \	        V^,          4      pMV P                  V4       R#  V P                  V^ ,          P                  4       4      pW4n        V^ 8  d9   V^8  d   RV,          pMRpV P                  RWTP                  3,          4       R# V P                  RVP                  ,          4       R#   \
         d    T P                  T4        R# i ; i  \
         d   pT P                  T4        Rp?R# Rp?ii ; i)a_  ignore bpnumber [count]

Set the ignore count for the given breakpoint number.  If
count is omitted, the ignore count is set to 0.  A breakpoint
becomes active when the ignore count is zero.  When non-zero,
the count is decremented each time the breakpoint is reached
and the breakpoint is not disabled and any associated
condition evaluates to true.
Nr  z%d crossingsz
1 crossingz%Will ignore next %s of breakpoint %d.z-Will stop next time breakpoint %d is reached.)r  r  r   r  r  r   r  rA  ignorer   r  )rV   r.  r#  countrf  countstrr  s   &&     r   	do_ignorePdb.do_ignore  s4    ##C(yy{JJ34t9>EY!^DG
 ##C(	*$$T!W]]_5B Iqy19-5H+HD&		23 4 L!yy) *)  '',  	JJsOO	s*   +D! &E !E EE+E&&E+c                |     \        V4      pVP                  4       P                  4       #   \         d    Tp L-i ; ir'   )r  r  rA  r]  )rV   r   r  replys   &&& r   _prompt_for_confirmationPdb._prompt_for_confirmationM  s=    	&ME {{}""$$  	E	s   + ;;c                   V'       g   V P                  RRR7      pVR	9   dd   \        P                  P                   Uu. uF  q3'       g   K  VNK  	  ppV P	                  4        V F  pV P                  RV,          4       K  	  R# RV9   d   VP                  R4      pVRV pW^,           R p \        V4      pV P                  Wg4      R,          pV P                  Wg4      pV'       d   V P                  V4       R# X F  pV P                  RV,          4       K  	  R# VP                  4       p	V	 F>  p V P                  V4      pV P                  V4       V P                  RV,          4       K@  	  R# u upi   \         d    RT,          p Li ; i  \         d   pT P                  T4        Rp?K  Rp?ii ; i)
a  cl(ear) [filename:lineno | bpnumber ...]

With a space separated list of breakpoint numbers, clear
those breakpoints.  Without argument, clear all breaks (but
first ask confirmation).  With a filename:lineno argument,
clear all breaks at that line in that file.
zClear all breaks? no)r  z
Deleted %sNr  NNNzInvalid line number (%s))yyes)r  r   rd  re  clear_all_breaksr   r  r  r  clear_breakr   r   r  r  clear_bpbynumber)
rV   r.  r  rf  bplistrP   r?   r   r  
numberlists
   &&        r   do_clearPdb.do_clearT  s    11$ 2 E $'*~~'@'@G'@B""'@G%%' BLL!23 !#:		#A2AwHcd)C9S :1=&&x8

3  !BLL!23 !YY[
A0((+ %%a(\B./ 1 H  70367   

3 s5   	E9E91E> 9F>FFF?#F::F?c                    V'       g   RpM \        V4      pV P                  V4       R#   \         d    T P                  RT,          4        R# i ; i)a  w(here) [count]

Print a stack trace. If count is not specified, print the full stack.
If count is 0, print the current frame entry. If count is positive,
print count entries from the most recent frame. If count is negative,
print -count entries from the least recent frame.
An arrow indicates the "current frame", which determines the
context of most commands.  'bt' is an alias for this command.
NzInvalid count (%s))r  r   r   r  )rV   r.  r  s   && r   do_wherePdb.do_where  sP     EC 	u%  

/#56s   + #AAc                f   ^ Tu;8:  d   \        V P                  4      8  g   Q h Q hWn        V P                  V P                  ,          ^ ,          V n        V P	                  V P                  RV P                  4       V P                  V P                  V P                  ,          4       RV n        R# )rJ   r6  N)r  r.  r/  r,  r?  print_stack_entryr   )rV   r  s   &&r   _select_framePdb._select_frame  s}    F,S_,,,,,

4==1!4%%dmmXt}}Mtzz$--89r   c                   V P                   '       g   V P                  R4       R# V'       g   \        V P                   4       F  w  r#W P                  8X  d   RMRp\	        V4      p\        V4      ^P8  d   VR,          R,           pV P                   V,          P                  f   RMVR pV P                  V RV RV 24       K  	  R#  \        V4      p^ Tu;8:  d   \        T P                   4      8  d   M MT P                   T,          P                  f   T P                  R
4       R# Ypn        T P                  RT P                   T,          P                  4       T P                  T P                  T P                  ,          4       R# T P                  R4       R#   \         d    T P                  R	4        R# i ; i)a2  exceptions [number]

List or change current exception in an exception chain.

Without arguments, list all the current exception in the exception
chain. Exceptions will be numbered, with the current exception indicated
with an arrow.

If given an integer as argument, switch to the exception at that index.
zDid not find chained exceptions. To move between exceptions, pdb/post_mortem must be given an exception object rather than a traceback.N>r  :NM   N...z  -z>3zArgument must be an integerz;This exception does not have a traceback, cannot jump to itzNo exception with that number)r  r   r:   r  r  r  r  r  r   r   rF  r  r.  r/  )rV   r.  ixexcr   rep	indicatorr  s   &&      r   do_exceptionsPdb.do_exceptions  sz    '''LL3
 $T%=%=> "&C&C C3is8b=c(U*C //3AAI r7 
 xq1SE:; ?S F:S!9!9::++F3AAIJJ\]06-

4!9!9&!A!O!OP&&tzz$--'@A

:;  

89s   F" "GGc                >   V P                   ^ 8X  d   V P                  R4       R#  \        T;'       g    ^4      pT^ 8  d   ^ pM\	        ^ T P                   T,
          4      pT P                  T4       R#   \         d    T P                  RT,          4        R# i ; i)zku(p) [count]

Move the current frame count (default one) levels up in the
stack trace (to an older frame).
zOldest frameNInvalid frame count (%s))r/  r   r  r   maxr  rV   r.  r  newframes   &&  r   do_up	Pdb.do_up  s     ==AJJ~&	qME 19H1dmme34H8$  	JJ1C78	s   A5 A5 5#BBc                   V P                   ^,           \        V P                  4      8X  d   V P                  R4       R#  \	        T;'       g    ^4      pT^ 8  d   \        T P                  4      ^,
          pM7\        \        T P                  4      ^,
          T P                   T,           4      pT P                  T4       R#   \
         d    T P                  RT,          4        R# i ; i)znd(own) [count]

Move the current frame count (default one) levels down in the
stack trace (to a newer frame).
zNewest frameNr  )r/  r  r.  r   r  r   minr  r  s   &&  r   do_downPdb.do_down  s     ==1DJJ/JJ~&	qME 194::*H3tzz?Q.0EFH8$  	JJ1C78	s    C C #C*)C*c                   V'       d;    \        V4      pY P                  P                  8:  d   T P                  R4       R# MRpV P                  V P                  V4       ^#   \         d    T P                  RT,          4        R# i ; i)a  unt(il) [lineno]

Without argument, continue execution until the line with a
number greater than the current one is reached.  With a line
number, continue execution until a line with a number greater
or equal to that is reached.  In both cases, also stop when
the current frame returns.
Error in argument: %rNz7"until" line number is smaller than current line number)r  r   r   r,  rW  	set_until)rV   r.  r   s   && r   do_untilPdb.do_until  s     S ///

 ) * 0
 Ft}}f-  

2S89s   A# ##B
	B
c                \    V'       d   V P                  V4       R# V P                  4        ^# )zs(tep)

Execute the current line, stop at the first possible occasion
(either in a function that is called or in the current
function).
N)r  r#  r  s   &&r   do_stepPdb.do_step  s$     ##C(r   c                r    V'       d   V P                  V4       R# V P                  V P                  4       ^# )zan(ext)

Continue execution until the next line in the current function
is reached or it returns.
N)r  set_nextr,  r  s   &&r   do_nextPdb.do_next%  s+     ##C(dmm$r   c                \   V P                   R8X  d   V P                  R4       R# V'       dJ   ^ RIp\        P                  R,          p VP                  V4      \        n        T\        P                  R&   \        h  \         d%   pT P                  RT: RT: 24        Rp?R# Rp?ii ; i)zrun [args...]

Restart the debugged python program. If a string is supplied
it is split with "shlex", and the result is used as the new
sys.argv.  History, breakpoints, actions and debugger options
are preserved.  "restart" is an alias for "run".
inlinezrun/restart command is disabled when pdb is running in inline mode.
Use the command line interface to enable restarting your program
e.g. "python -m pdb myscript.py"N:rJ   r  NzCannot run r  :NrJ   N)r   r   shlexrp   argvr  r   r	   )rV   r.  r  argv0r   s   &&   r   do_run
Pdb.do_run2  s     99 JJ : ; HHSME ;;s+ !CHHRL  

#q9:s   	A< <B+B&&B+c                r    V'       d   V P                  V4       R# V P                  V P                  4       ^# )zAr(eturn)

Continue execution until the current function returns.
N)r  
set_returnr,  r  s   &&r   	do_returnPdb.do_returnM  s+    
 ##C(&r   c                   V'       d   V P                  V4       R# V P                  '       g:    \        P                  ! \        P                  V P                  4      \
        n        V P                  4        ^#   \         d     Li ; i)zNc(ont(inue))

Continue execution, only stop when a breakpoint is encountered.
N)	r  r   r  r  r%  r   r  r   r  r  s   &&r   do_continuePdb.do_continueY  sm    
 ##C(}}}MM&--1D1DE , 	  
 s   8A9 9BBc                l   V'       g   V P                  V4       R# V P                  ^,           \        V P                  4      8w  d   V P	                  R4       R#  \        V4      p WP                  n        V P                  V P                  ,          ^ ,          V3V P                  V P                  &   V P                  V P                  V P                  ,          4       R#   \         d$   pT P	                  RT,          4        Rp?R# Rp?ii ; i  \         d    T P	                  R4        R# i ; i)ad  j(ump) lineno

Set the next line that will be executed.  Only available in
the bottom-most frame.  This lets you jump back and execute
code again, or jump forward to skip code that you don't want
to run.

It should be noted that not all jumps are allowed -- for
instance it is not possible to jump into the middle of a
for loop or out of a finally clause.
Nz)You can only jump within the bottom framezJump failed: %sz)The 'jump' command requires a line number)
r  r/  r  r.  r   r  r,  rW  r  r   )rV   r.  r   s   && r   do_jumpPdb.do_jumpo  s     ##C(==1DJJ/JJBC	2c(C2 *-&,0JJt}},Ea,H#,M

4==)&&tzz$--'@A 2

,q0112  	DJJBC	Ds+   D 'A9C" "D-DDD32D3c                X    \        V P                  V P                  V P                  4      # r'   )r   r  r  r   rU   s   &r   _create_recursive_debuggerPdb._create_recursive_debugger  s    4##TZZ==r   c                0   V'       g   V P                  V4       R# V P                  4        V P                  P                  pV P                  P                  pV P                  4       pRV P                  P                  4       ,          Vn        V P                  R4        \        P                  ! VP                  WV34       V P                  R4       V P                  4        VP                  V n        R#   \         d    T P                  4         LQi ; i)zdebug code

Enter a recursive debugger that steps through the code
argument (which is an arbitrary expression or statement to be
executed in the current environment).
Nz(%s) zENTERING RECURSIVE DEBUGGERzLEAVING RECURSIVE DEBUGGER)r  r  r,  r1  rI  r#  r   rA  r   rp   call_tracingr   r   r  r  r`  )rV   r.  r  r   ps   &&   r   do_debugPdb.do_debug  s     ##C(--))''++-T[[..0023	QUUS6$:; 	12yy	  	OO	s    #C7 7DDc                   V P                   R8X  d   \        \        R4      '       gk     \        R4      pVP	                  4       P                  4       pVR8X  g   VR8X  d   \        P                  ! ^4       KQ  VP	                  4       R8X  g   Kh  R# RV n	        V P                  4        ^#   \         d    RpT P                  R4        Lxi ; i)	zNq(uit) | exit

Quit from the debugger. The program being executed is aborted.
r  ps1Tz7Quitting pdb will kill the process. Quit anyway? [y/n] r  r#   rp  N)r   r0  rp   r  r]  rA  r  r   rq   _user_requested_quitset_quit)rV   r.  r  s   && r   do_quitPdb.do_quit  s     99 e)<)<%!"[\E!KKM//1E C<5B;HHQK[[]c)$(!   %ELL$%s   )B+ +CCc                F    V P                  R4       V P                  V4      # )z.EOF

Handles the receipt of EOF as a command.
r#   )r   r.  r  s   &&r   do_EOF
Pdb.do_EOF  s    
 	R||C  r   c           	     n   V'       d   V P                  V4       R# V P                  P                  pV P                  P                  pVP                  VP
                  ,           pVP                  \        P                  ,          '       d
   V^,           pVP                  \        P                  ,          '       d
   V^,           p\        V4       Fa  pVP                  V,          pWc9   d1   V P                  V: RV P                  W6,          V4      : 24       KL  V P                  V: R24       Kc  	  R# )z9a(rgs)

Print the argument list of the current function.
N = z = *** undefined ***)r  r,  r<  rI  co_argcountco_kwonlyargcountco_flagsinspect
CO_VARARGSCO_VARKEYWORDSr  co_varnamesr   r  )rV   r.  corb   rp  rP   r  s   &&     r   do_argsPdb.do_args  s    
 ##C(]]!!}}%%NNR111;;++++1Q;;////QqSqA>>!$D|$
D0QRS?@ r   c                   V'       d   V P                  V4       R# RV P                  P                  9   d?   V P                  V P	                  V P                  P                  R,          R4      4       R# V P                  R4       R# )zBretval

Print the return value for the last return of a function.
Nrc  retvalzNot yet returned!)r  r,  rI  r   r  r   r  s   &&r   	do_retvalPdb.do_retval  s]    
 ##C(4==111LL)?)?)MxXYJJ*+r   c                     \        WP                  P                  V P                  P                  4      #    T P	                  4        h ; ir'   )r  r,  r1  rI  r  r  s   &&r   _getvalPdb._getval  s<    	]]44dmm6L6LMM	OOs	   36 A	c                &    Vf5   \        WP                  P                  V P                  P                  4      # \        WP                  VP                  4      #   \         d,   p\        RT P                  T4      ,          4      u R p?# R p?ii ; i)Nz** raised %s **)r  r,  r1  rI  r  rS   rk  )rV   r.  r  r  s   &&& r   r  Pdb._getval_except  sq    	D}C!8!8$--:P:PQQC%..AA 	D*T-=-=c-BBCC	Ds"   7A A B% BBBc                p    \         P                  ! 4       pV P                  V P                  V4      4       R # r'   )rp   	exceptionr   rk  rV   r  s   & r   r  Pdb._error_exc  s$    mmo

4##C()r   c                     V P                  V4      p T P                  T! T4      4       R #     R # ; i   T P                  4         R # ; ir'   )rD  r   r  )rV   r.  r8  vals   &&& r   _msg_val_funcPdb._msg_val_func  sD    	,,s#C	LLc#		OOs   - 5 2A
c           	          \        V4      #   \         d,   p\        R T RT P                  T4       R24      u Rp?# Rp?ii ; i)z	*** repr(z
) failed: z ***N)r  r   rS   rk  )rV   r  r  r   s   &&& r   r  Pdb._safe_repr  sJ    	P9 	P9TF*T5E5Ea5H4INOO	Ps   
 A >AAc                h    V'       g   V P                  V4       R# V P                  V\        4       R# )z1p expression

Print the value of the expression.
N)r  rN  r  r  s   &&r   do_pPdb.do_p  s(    
 ##C(3%r   c                |    V'       g   V P                  V4       R# V P                  V\        P                  4       R# )z9pp expression

Pretty-print the value of the expression.
N)r  rN  pprintpformatr  s   &&r   do_pp	Pdb.do_pp"  s,    
 ##C(3/r   c                   RV n         RpV'       d   VR8w  d    RV9   dU   VP                  R4      w  r2\        VP                  4       4      p\        VP                  4       4      pW#8  d	   W2,           pM}\        VP                  4       4      p\	        ^V^,
          4      pMPV P                  e   VR8X  d)   \	        ^V P                  P                  ^,
          4      pMV P                  ^,           pVf
   V^
,           pV P                  P                  P                  pV P                  V4      p \        P                  ! W@P                  P                  4      pV P!                  Wc^,
          V W5V P                  4       \#        V\%        V4      4      V n        \%        V4      V8  d   V P'                  R4       T P+                  4        R#   \
         d    T P                  RT,          4        R# i ; i  \(         d     LIi ; i)aX  l(ist) [first[, last] | .]

List source code for the current file.  Without arguments,
list 11 lines around the current line or continue the previous
listing.  With . as argument, list 11 lines around the current
line.  With one argument, list 11 lines starting at that line.
With two arguments, list the given range; if the second
argument is less than the first, it is a count.

The current line in the current frame is indicated by "->".
If an exception is being debugged, the line where the
exception was originally raised or propagated is indicated by
">>", if it differs from the current line.
rK   Nrj  rY  r  z[EOF])r`  r  r  rA  r  r   r   r   r,  rW  r<  r   get_file_breaksr5   r6   r1  _print_linesr  r  r   r"  r}  )rV   r.  lastfirstr?   	breaklistrB   s   &&     r   do_listPdb.do_list0  s    3#:#:"%))C.KE.Etzz|,D|$|		,E519-E [[ C3J4==11A56EKK!OE<2:D==''33((2		&&x1H1HIEe!GD15"mm-dCJ/DK5zD W% 	!!#)  

2S89$ ! 		s+   AG 5,G 1BG8 #G54G58HHc                   V'       d   V P                  V4       R# V P                  P                  P                  pV P	                  V4      p V P                  V P                  4      w  rET P                  YEY0P                  4       T P                  4        R#   \         d   pT P                  T4        Rp?R# Rp?ii ; i)zMll | longlist

List the whole source code for the current function or frame.
N)
r  r,  r<  r   r[  _getsourcelinesr4   r   r\  r}  )rV   r.  r?   r_  rB   r   r  s   &&     r   do_longlistPdb.do_longlistd  s    
 ##C(==''33((2		 00?ME 	%MMB!!#	  	JJsO	s   B C $B;;C c                   V'       g   V P                  V4       R#  V P                  V4      p T P                  T4      w  r4T P                  Y44       R#     R# ; i  \        \        3 d   pT P                  T4        Rp?R# Rp?ii ; i)zOsource expression

Try to get source code for the given object and display it.
N)r  rD  rc  r4   	TypeErrorr   r\  )rV   r.  r  rB   r   r  s   &&    r   	do_sourcePdb.do_sourcew  s    
 ##C(	,,s#C	 005ME 	%(	 # 	JJsO	s"   A A AB
.BB
c                   V'       d*   VP                   pV P                  P                  VR4      pMR;rV\        W4       F  w  rx\	        V4      P                  ^4      p	\        V	4      ^8  d
   V	R,          p	Ws9   d   V	R,          p	M	V	R,          p	Wu8X  d   V	R,          p	MWv8X  d
   V	R,          p	V P                  '       d   V P                  V4      pV P                  V	R,           VP                  4       ,           4       K  	  R# )zPrint a range of lines.r  Bz->z>>	Nr  )rW  r   r  r:   ra   rjustr  r   rB  r   r  )
rV   rB   r$   r  r  current_lineno
exc_linenor   rE   ss
   &&&&&     r   r\  Pdb._print_lines  s    "^^N++E26J*,,N%e3LFF!!!$A1vzSSS'T	%T	}}}**40LLTDKKM12 4r   c                j   V'       g   V P                  V4       R#  V P                  V4      pRp TP                  P                  pT'       d%   T P                  RTP                  ,          4       R#  TP                  pT'       d%   T P                  RTP                  ,          4       R# TP                  \        J d0   T P                  RTP                  : RTP                  : 24       R# T P                  \        T4      4       R#     R# ; i  \         d     Li ; i  \         d     Li ; i)z3whatis expression

Print the type of the argument.
Nz	Method %szFunction %szClass rj  )r  rD  r  r  r   r   r)   r   typer   r   )rV   r.  rM  r   s   &&  r   	do_whatisPdb.do_whatis  s    
 ##C(	LL%E 	>>**D LLt||34	>>D LL56??d"LL%*:*:E<N<NOPT%[!3	
  		  		s.   D D 4D$ DD! D!$D21D2c           	     x   V'       g   V P                   '       dx   V P                  R4       V P                   P                  V P                  / 4      P	                  4        F,  w  r#V P                  V: RV P                  W24      : 24       K.  	  R# V P                  R4       R# V P                  V4      ;p'       d   V P                  RV: RV: 24       R# V P                  V4      pW0P                   P                  V P                  / 4      V&   V P                  RV: RV P                  W14      : 24       R# )zdisplay [expression]

Display the value of the expression if it changed, each time execution
stops in the current frame.

Without expression, list all display expressions for the current frame.
zCurrently displaying:r  z No expression is being displayedzUnable to display r  N)
r   r   r  r,  r  r  r  r   r  
setdefault)rV   r.  keyrM  r  s   &&   r   
do_displayPdb.do_display  s     45 $ 3 3DMM2 F L L NHCLLS$//#2K!LM !O ?@11#66s6

cBC))#.EH**4=="=cBdooc6OPQr   c                
   V'       d+    V P                   P                  V P                  / 4      V R# V P                   P                  V P                  R4       R#   \         d    T P	                  RT,          4        R# i ; i)zundisplay [expression]

Do not display the expression any more in the current frame.

Without expression, clear all display expressions for the current frame.
znot displaying %sN)r   r  r,  rk  r   r2  r  s   &&r   do_undisplayPdb.do_undisplay  sf     6OO''r:3? OOt4  6

.456s   'A #BBc                    V P                   P                  V P                  / 4       Uu. uF  pVP                  V4      '       g   K  VNK   	  up# u upi r'   )r   r  r,  rB  )rV   rQ  rE   rR  rS  r   s   &&&&& r   complete_undisplayPdb.complete_undisplay  sJ    ??..t}}bA 'Aa<<% A ' 	' 's   AAc                    / V P                   P                  CV P                   P                  CpV P                  V4      ;_uu_ 4        \	        W P
                  R7      pVP                  RRR7       RRR4       R#   + '       g   i     R# ; i)zinteract

Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
)r   *pdb interact start* *exit from pdb interact command*)bannerexitmsgN)r,  r1  rI  r  r   r   interact)rV   r.  r   consoles   &&  r   do_interactPdb.do_interact  sp     C''B4==+A+AB%%b)),RFG$:%G  I *)))s   *A<<B	c                   VP                  4       p\        V4      ^ 8X  dX   \        V P                  P	                  4       4      pV F,  pV P                  V: RV P                  V,          : 24       K.  	  R# \        V4      ^8X  dp   V^ ,          V P                  9   d:   V P                  V^ ,          : RV P                  V^ ,          ,          : 24       R# V P                  RV^ ,           R24       R# RP                  VR,          4      pRV9  dJ   Rp\        ^^
4       F7  pR	V 2V9  d   R
pR	V 2V9   g   K  V'       d   K%  V P                  R4        R# 	  W@P                  V^ ,          &   R# )a  alias [name [command]]

Create an alias called 'name' that executes 'command'.  The
command must *not* be enclosed in quotes.  Replaceable
parameters can be indicated by %1, %2, and so on, while %* is
replaced by all the parameters.  If no command is given, the
current alias for name is shown. If no name is given, all
aliases are listed.

Aliases may be nested and can contain anything that can be
legally typed at the pdb prompt.  Note!  You *can* override
internal pdb commands with aliases!  Those internal commands
are then hidden until the alias is removed.  Aliasing is
recursively applied to the first word of the command line; all
other words in the line are left alone.

As an example, here are two useful aliases (especially when
placed in the .pdbrc file):

# Print instance variables (usage "pi classInst")
alias pi for k in %1.__dict__.keys(): print("%1.",k,"=",%1.__dict__[k])
# Print instance variables in self
alias ps pi self
r4  NzUnknown alias 'r  r  r  r  Tr  Fz*Replaceable parameters must be consecutive)	r  r  sortedr   rm  r   r   r9   r  )rV   r.  r#  rm  r  consecutiver$  s   &&     r   do_aliasPdb.do_alias	  s(   2 yy{t9>$,,++-.D%e1DEF t9>Aw$,,&$q''4<<Q3HIJ

_T!WIQ78 HHT"X&E5 " B<C3%y-&+3%yE)++

#OP ( %*LLa!r   c                    VP                  4       p\        V4      ^ 8X  d   V P                  V4       R# V^ ,          V P                  9   d   V P                  V^ ,           R# R# )z*unalias name

Delete the specified alias.
N)r  r  r  r   )rV   r.  r#  s   && r   
do_unaliasPdb.do_unalias4	  sP    
 yy{t9>##C(7dll"T!W% #r   c                t    V P                    Uu. uF  qUP                  V4      '       g   K  VNK  	  up# u upi r'   )r   rB  )rV   rQ  rE   rR  rS  as   &&&&& r   complete_unaliasPdb.complete_unalias@	  s)    <<><a<<+=<>>>s   55c                   Vf   V P                   pMNV^ 8X  d    V P                   V P                  ,          .pM(V^ 8  d   V P                   R V)  pMV P                   V) R  p V F  pV P                  V4       K  	  R #   \         d     R # i ; ir'   )r.  r/  r  r"  )rV   r  stack_to_printframe_linenos   &&  r   r  Pdb.print_stack_traceS	  s    =!ZZNaZ"jj78NQY!ZZ%0N!ZZ0N	 .&&|4 !/  		s   !A= =BBc                F   Vw  r4W0P                   J d   R pMRpV P                  W4      pV P                  '       dO   VP                  V^4      p\	        V4      ^8  d-   V P                  V^,          4      V^&   VP                  V4      pV P                  WV,           4       R# )z> r  N)r,  format_stack_entryr   r  r  rB  r9   r   )rV   r  prompt_prefixr  r   rp  stack_entryrB   s   &&&     r   r  Pdb.print_stack_entryb	  s    $MM!FF--lJ===%%mQ7E5zA~..uQx8a+007V)*r   c                @   V'       g    \         P                  P                  W4      #   \        V RV,           4      pV! 4       #   \         d    \        T RT,           4      p Mi ; i \
        P                  P                  ^8  d   T P                  RT,          4       R# TP                  f   T P                  RT,          4       R# T P                  T P                  TP                  4      4       R#   \         d    T P                  RT,          4        R# i ; i)zh(elp)

Without argument, print the list of available commands.
With a command name as argument, print help about that command.
"help pdb" shows the full pdb documentation.
"help exec" gives help on the ! command.
help_r4  zJNo help for %r; please do not run Python with -OO if you need command helpNz&No help for %r; __doc__ string missingzNo help for %r)r   r   do_helpr^  r5  rp   rs   optimizer   r   r   _help_message_from_doc)rV   r.  topicr-  s   &&  r   r  Pdb.do_helps	  s     77??4--	G5gm4w! 5!$45 yy!!Q&

 68;< =&

CcIJLL44W__EF  	/JJ'#-.	/s)   A A%"C6 $A%%C6 6#DDc                    T P                  V P                  P                  ;'       g    RP                  4       4       R# )ax  (!) statement

Execute the (one-line) statement in the context of the current
stack frame.  The exclamation point can be omitted unless the
first word of the statement resembles a debugger command, e.g.:
(Pdb) ! n=42
(Pdb)

To assign to a global variable you must always prefix the command with
a 'global' command, e.g.:
(Pdb) global list_options; list_options = ['-l']
(Pdb)
r#   N)r   	help_execr   rA  rU   s   &r   r  Pdb.help_exec	  s+     	dnn,,2299;<r   c                    \        4        R # r'   r   rU   s   &r   help_pdbPdb.help_pdb	  s    r   c                V   VP                  R4      '       g(   VP                  R\        P                  4      R,           p\        P                  P                  V4      '       d*   \        P                  P                  V4      '       d   V# R# \        P                   F  p\        P                  P                  V4      '       d   \        P                  ! V4      pK=  \        P                  P                  W!4      p\        P                  P                  V4      '       g   K  Vu # 	  R# )a  Helper function for break/clear parsing -- may be overridden.

lookupmodule() translates (possibly incomplete) file or module name
into an absolute file name.

filename could be in format of:
    * an absolute path like '/path/to/file.py'
    * a relative path like 'file.py' or 'dir/file.py'
    * a module name like 'module' or 'package.module'

files and modules will be searched in sys.path.
rZ  rj  N)r  r!  rj   seprk   isabsrn   rp   islinkreadlinkr9   )rV   r?   ru   fullnames   &&  r   r  Pdb.lookupmodule	  s       ''''RVV4u<H77==""ww~~h''xxG''..))++g.ww||G6Hww~~h''   r   c                    < V ^8  d   QhRS[ /# )r_   rv   )r]   )rc   r[   s   "r   rd   Pdb.__annotate__	  s      , r   c                R   R V n         RV n        V P                  VP                  4      V n        ^ RIpVP                  P                  4        VP                  P                  VP                  4       V P                  P                  4        V P                  VP                  4       R# TFN)r   r,  rU  r?   r   r   __dict__r3  r  r`   rx  r   r   )rV   rv   r   s   && r   _runPdb._run	  s}     %)!$)!,,v7
 	!  !1!12 	$$&r   c                    < V ^8  d   QhRS[ /# )r_   r  )r  )rc   r[   s   "r   rd   r  	  s     @ @} @r   c                X    \         P                  ! V4      R,          P                  4       # )r  r  )r   format_exception_onlyrA  rJ  s   &&r   rk  Pdb._format_exc	  s!    ..s3B7==??r   c                     \        VRR4       R#   \         d%   p\        T P                  T4      4      u Rp?# Rp?ii ; i)z=Return the error message as string if compiling `expr` fails.r  r  Nr#   )r0   r<   rS   rk  )rV   r  r  s   && r   r  Pdb._compile_error_message	  s@    	0D)V,   	0))#.//	0s    A ;A A c                P    \         P                  ! V4      w  r#\        ^V4      pW#3# )r  )r8  getsourcelinesr  )rV   r  rB   r   s   &&  r   rc  Pdb._getsourcelines	  s)      ..s3Q}r   c                   VP                  4       P                  4        Uu. uF  q3P                  4       NK  	  ppV'       g   R # RV9   d   VP                  R4      pM^p. pR\	        V P
                  4      ,          p\        V4       FB  w  rV^ 8X  d   Rp	MW8  d   Rp	MV'       d    M$Rp	VP                  Wy,           V,           4       KD  	  RP                  V4      # u upi )zNo help message found.r#   r  zUsage: z       r  )	r  
splitlinesrA  indexr  r   r:   r_  r9   )
rV   doc
usage_onlyrE   rB   	usage_end	formattedr  rP   rp  s
   &&&       r   r  Pdb._help_message_from_doc	  s    *-**,*A*A*CD*C$*CD+;BII	s4;;'' 'GAAv""V_t34 ( yy##' Es   C c                B   V'       g   V P                  R4       MV P                  RV 24       \        P                  ! \        V \        P
                  ! ^4      P                  P                  4      4      pVe%   V P                  V P                  VRR7      4       R# R# )z'Return the usage string for a function.z%Argument is required for this commandzInvalid argument: NT)r  )
r   r8  getdocr^  rp   r  r<  r)   r   r  )rV   r.  r  s   && r   r  Pdb._print_invalid_arg
  sz     JJ>?JJ+C512
 nnWT3==+;+B+B+J+JKL?LL44ST4JK r   )r  r  r  r,  r   r   r   r   r   rC  r   r   r   r   r  r,  r/  r]  r   r   r`  r   r   r   r   r   r   r.  r  r   r   )	tabNNNFTNNFr'   r  )F)r
   N)r  r  r  r  r  r.  r   )r   r   r   r   r  r  rx  r  rw   r  r  r%  r(  r)  rF  r   r   rJ  setterrR  rZ  user_opcoderY  rf  rq  ru  r@  r}  r  r  r   r  r  rP  r  r  r  r  r  r  r  r&  r+  r,  rB  r   r   r?  r  ra  rg  rO  ru  r  rP  r  r  r3  r  r  complete_commandsr  r  do_bcomplete_break
complete_br  complete_tbreakr  r  r  complete_enabler  complete_disabler  complete_conditionr  complete_ignorer  r  do_clcomplete_clearcomplete_clr  do_wdo_btr  r  r  do_ur  do_dr  do_untr  do_sr  do_nr  
do_restartr  do_rr  do_cdo_contr   do_jr#  r(  complete_debugr.  do_qdo_exitr1  r=  do_arA  do_rvrD  r  r  rN  r  rS  rX  complete_print
complete_pcomplete_ppr`  do_lrd  do_llrh  complete_sourcer\  rt  complete_whatisry  complete_displayr|  r  r  r  r  r  r6  r  line_prefixr  r  do_hr  r  r  r  rk  r  rc  r  r  r   rY   r   r   s   @@r   r   r   N  s    # #&6"p! ! !1D 1f< bc& d & yz { 
*&  KL&/(
6
!5 D"7H . .(:$  >Rh3-+^8$B$L1 8.,
ED&?@@7@ 2 2"
 I&V +a<H D'N#J! )O B.0& )O1, *Q@ ,+*Z )O%-0\ E'N$K&& DE-<^%& D%& D. F D
 D2 J	 D( ! D72> D>!0 *N2 DG!A& D, ED*P&0 *N%J&K1$d D$" E)& +O3.#"J +OR. ,5'
I0*d
&?; =H +"G8 D= 
< 0@ @$,L Lr   wheredownupbreaktbreakr3  r  r  r  	conditionr   stepr=   untiljumpreturnr@  continuerK   longlistr#  r'  ppwhatisr  display	undisplayr  r  unaliasdebugquitr4  z

c                :    \        4       P                  WV4       R# )a  Execute the *statement* (given as a string or a code object)
under debugger control.

The debugger prompt appears before any code is executed; you can set
breakpoints and type continue, or you can step through the statement
using step or next.

The optional *globals* and *locals* arguments specify the
environment in which the code is executed; by default the
dictionary of the module __main__ is used (see the explanation of
the built-in exec() or eval() functions.).
N)r   r   	statementr  r   s   &&&r   r   r   +
  s     EIIi&)r   c                6    \        4       P                  WV4      # )zEvaluate the *expression* (given as a string or a code object)
under debugger control.

When runeval() returns, it returns the value of the expression.
Otherwise this function is similar to run().
)r   runeval)
expressionr  r   s   &&&r   r  r  :
  s     5==f55r   c                     \        WV4       R # r'   )r   r  s   &&&r   runctxr  C
  s    	F#r   c                 6    \        4       P                  ! V / VB # )zCall the function (a function or method object, not a string)
with the given arguments.

When runcall() returns, it returns whatever the function call
returned. The debugger prompt appears as soon as the function is
entered.
)r   runcall)r#  kwdss   *,r   r  r  G
  s     5==$'$''r   headerc                    \         P                  e   \         P                  pM\        RRRR7      pV e   VP                  ! V 4       VP                  ! \        P
                  ! 4       P                  VR7       R# )ad  Enter the debugger at the calling stack frame.

This is useful to hard-code a breakpoint at a given point in a
program, even if the code is not otherwise being debugged (e.g. when
an assertion fails). If given, *header* is printed to the console
just before debugging begins. *commands* is an optional list of
pdb commands to run when the debugger starts.
Nr  r   Tr   r   r   r  )r   r  r   r  rp   r  r  r  r   pdbs   $$ r   r  r  Q
  sU     )$$xEFMM#--/((8<r   c                  "   \         P                  e   \         P                  pM\        RRRR7      pV e   VP                  ! V 4       VP                  ! \        P
                  ! 4       P                  VR7      G Rj  xL
  R#  L5i)zEnter the debugger at the calling stack frame, but in async mode.

This should be used as await pdb.set_trace_async(). Users can do await
if they enter the debugger with this function. Otherwise it's the same
as set_trace().
Nr  r   Tr  r  )r   r  r   r  rp   r  r  r  s   $$ r   r  r  b
  s`      )$$xEF


cmmo44x
HHHs   A<B>B?Bc                     a a ] tR tRt oRV 3R llt]R 4       tR t]R 4       t	R t
]P                  RR l4       t]P                  R 4       tV3R	 lR
 ltR tR tRR ltV 3R ltR tV 3R ltV 3R ltV 3R ltR t]tR tR tR t]P                  R 4       t]P                  R 4       tR t]t V 3R lt!V 3R lt"Rt#Vt$V ;t%# ) 
_PdbServeris
  c                   < W0n         R V n        Wn        . V n        RV n        V'       d   V P                  V4       \        SV `  ! RRR/VB  W@n        R # )NFr   r
   )	_owns_sockfile_interact_state	_sockfile_command_name_cache_write_failed_start_signal_listenerr   rw   r   )rV   sockfilesignal_serverowns_sockfiler   kwargsr   s   &&&&&,r   rw   _PdbServer.__init__t
  sU     ,#!#% "''6 	2%262 r   c                 z    \         P                  p ^ p\        V P                  R V P                  R VR R2^4      # )rJ   02XF0)rp   version_infor  majorminor)vrevisions     r   protocol_version_PdbServer.protocol_version
  s>     aggc]1773-~R@"EEr   c                   T; d2    ^8  d+   R ;e#   w  \         Rc ;e   w   \         Rc ;e	   w      R#     ; d$    ^8  d   R	 ;e   w  \         Rc ;e   w      R#    ; d2    ^8  d+   R
 ;e#   w  \         Rc ;e   w   \         Rc ;e	   w      R#     ; d_    ^8  dX   R ;eP   w  \        Rc;eC   w  p  \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d    R#     d^    ^8  dW   R ;eO   w  \        Rc;eB   w  p  \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   R#     \        RV 24      h)r_   Nr
   c              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir'   r(   ra   r*   r+   s   & r   r-   3_PdbServer._ensure_valid_message.<locals>.<genexpr>
  s     =AZ3''r  FTc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir'   r8  r9  s   & r   r-   r:  
       >AZ3''r  'PDB message doesn't follow the schema! r   rs  r  r   r{  completionscommand_list)ra   rK   allAssertionError)rV   r  rA  rC  s   &&  r   _ensure_valid_message _PdbServer._ensure_valid_message
  s     222SUCE2
  3 !#% ! 322CECE2  3  #0======	
   $ 2>>>>>>  $=cUC r   c                   aa V3R  lpVV3R lp\         P                  ! 4       o\         P                  ! V\        P                  ! V^R7      .RR7      o\
        P                  ! V4       SP                  4        R# )c                   < \        V 4      ;_uu_ 4        V P                  R 4       V P                  \        P                  4       SP                  4       '       gK    V P                  R4      pTR8X  d    RRR4       R# \        P                  ! \        P                  4       K`   RRR4       R#   \        P                   d     K  i ; i  + '       g   i     R# ; i)g      ?   r   N)r   
settimeoutshutdownsocketSHUT_WRis_setrecvtimeoutr  raise_signalr  )sockr   	shut_downs   & r   listener3_PdbServer._start_signal_listener.<locals>.listener
  s     %fnn-#**,,!#yy s{  ''6 -  ">> ! ! s6   ACB1.C &C1C
C	C

CC	c                  H   < S P                  4        SP                  4        R # r'   )setr9   )rT  threads   r   stop_thread6_PdbServer._start_signal_listener.<locals>.stop_thread
  s    MMOKKMr   )rQ  T)rv   r#  daemonN)	threadingEventThreadrM  create_connectionatexitregisterr$   )clsaddressrU  rZ  rT  rY  s   &&  @@r   r&  !_PdbServer._start_signal_listener
  s[    	7	 OO%	!!**7A>?

 	$r   c                (   V P                  V4       \        P                  ! V4      p V P                  P	                  VP                  4       R ,           4       V P                  P                  4        R#   \        \        3 d    RT n	         R# i ; i   
TN)
rF  jsondumpsr#  r   encoder  r4   r   r%  rV   r*  json_payloads   &, r   _send_PdbServer._send
  sq    ""6*zz&)
	&NN  !4!4!6!>?NN  "$ 	& "&D	&s   A
A5 5BBc                L    V P                  \        V4      V,           R R7       R# )infor>  Nrn  ra   rF  s   &&&r   r   _PdbServer.message
  s    

3s8c>
7r   c                >    V P                  \        V4      R R7       R# )r   r>  Nrr  rJ  s   &&r   r   _PdbServer.error
  s    

3s8'
2r   c                    < V ^8  d   QhRS[ /# )r_   r  )ra   )rc   r[   s   "r   rd   _PdbServer.__annotate__
  s     " "3 "r   c                    VR 8X  dH   V P                   '       g6   V P                  RR^ ^ 4      V n         V P                  V P                   R7       V P                  WR7       V P                  4       # )r  r#   rB  r?  )r$  r  rn  _read_reply)rV   r   r{  s   &&&r   
_get_input_PdbServer._get_input
  s`     E>$":":":'+'9'9"b!Q'GD$JJD$<$<J=

&
.!!r   c           
         V P                   '       d   \        hV P                  P                  4       pV'       g   \        h \        P
                  ! V4      pT; d%    ^8  d   R ;e   w  \        Rc;e	   w  p   T#    ; dW    ^8  dP   R	 ;eH   w  \        Rc;e;   w  p   TR8X  d   \        hTR8X  d   \        hT P                  RT 24       \        h    d    ^8  d   R
 ;e   w   d    ^8  d   R ;e   w  \        Rc;er   w  uuuuuuu\        Rc;e^   w  uuuuuuu\        Rc;eJ   w  uuuuuuu\        Rc;e6   w  uuuuuu    rVrxT P                  YVYx4      p	T P                  T	R7       EK          T P                  RT 24       EK    \        P                   d    T P                  RT: 24       \        hi ; i)Tz(Disconnecting: client sent invalid JSON r
   INTr1  zReceived unrecognized signal: r@  z&Ignoring invalid message from client: r  r  rz  rQ  rE   rR  rS  )r%  r  r#  r   ri  loadsJSONDecodeErrorr   ra   r"  r  _complete_anyrn  )
rV   r  payloadr  r  rQ  rE   rR  rS  r  s
   &         r   ry  _PdbServer._read_reply
  sb    !!!..))+C**S/
 ***sz* L +,,,,//5&

<VHE
 ' -  ! ! ! #	D #	D"%+f"%+f	! !..t6JEJJ5J1 JJ?uEF? '' 

EcWMNs   F! !1Gc                   V P                   '       d   V P                  pMdV^ 8X  d   V P                  WW44      # V P                  V4      ^ ,          pV'       d    \	        V RV,           V P                  4      pMV P                  pV! WW44      # )rJ   	complete_)r"  rP  r  r*  r^  )rV   rQ  rE   rR  rS  compfuncr   s   &&&&&  r   r  _PdbServer._complete_any-  sz    ++H{))$fEE..&q)C"4s):D<P<PQ//F33r   c                Z   V P                  4        Ve   Wn        V P                  '       d%   V P                  \        V P                  4      4       R pV'       g   V P                  e(    V P                  RRR7      pV P                  V4       K=  V P                  '       gP    V P                  '       d   RMRpV P                  V P                  VR7      pV P                  P                  V4       V P                  P                  ^ 4      pV P                  V4      pV P                  V4      pV P!                  W%4      pK  V P#                  4        R #   \         d    T P                  R4        L\         d    T P                  R4       R T n         ELi ; i  \         d    Rp Li ; i)	Nz>>> r  r?  z
KeyboardInterruptz!
*exit from pdb interact command*r   r  r1  )preloopintror   ra   r"  rz  _run_in_python_replr"  r  rC  r   r   r_  r2  r&  r+  postcmdpostloop)rV   r  stopr  r{  rE   s   &&    r   rt  _PdbServer.cmdloop<  sR   J:::LLTZZ)##/	4 OO6OLE ,,U3==="*.*@*@*@JeE OO4;;eOLE $$U+==$$Q'D;;t$D;;t$D<<+D/ ) 8LL!67 0LL!EF+/D(0   "!E"s6   *E #F 5!F F1F:FFF*)F*c                l   < \         SV `  4        V P                  '       d   V P                  4        R # R # r'   )r   r  quittingdetach)rV   r   s   &r   r  _PdbServer.postloop`  s%    ===KKM r   c                    R V n         V P                  '       d)   R\        n         V P                  P                  4        R# R#   \         d     R# i ; i)FN)r  r!  r   r  r#  closer4   rU   s   &r   r  _PdbServer.detache  sK    %)C"$$&	 
  s   A AAc                0   < . V n         \        SV `	  V4      # r'   )r$  r   r(  rV   r.  r   s   &&r   r(  _PdbServer.do_debugq  s     $& w$$r   c                0   < . V n         \        SV `	  V4      # r'   )r$  r   r  r  s   &&r   r  _PdbServer.do_aliasw  s    #% w$$r   c                0   < . V n         \        SV `	  V4      # r'   )r$  r   r  r  s   &&r   r  _PdbServer.do_unalias|  s    #% w!#&&r   c                *    V P                  VR 7       R# )r  N)rn  r  s   &&r   r  _PdbServer.do_help  s    


r   c                \    Ve(   V P                  \        V4      4       V\        n        R # R # r'   )r   r  builtinsr   r  s   &&r   _interact_displayhook _PdbServer._interact_displayhook  s#    ?LLc#HJ r   c                t   V P                   '       g   Q h\        P                  p V P                  \        n        V P                   R ,          ! VR,           4      pVf   \	        R4      h\        W0P                   R,          4       T\        n        R#    T P                  4         L!; i  T\        n        i ; i)compilerr  NIncomplete commandr   )r"  rp   r  r  r<   r%   r  )rV   rB   r  code_objs   &&  r   r  _PdbServer._run_in_python_repl  s    #####??		/"88CO++J7EH!"677//56 /CO	OO.COs   A B B'%B* *B7c                    V P                  R 4       \        \        P                  ! 4       / V P                  P
                  CV P                  P                  CR7      V n        R# )r  )r  r   N)r   rb   r  CommandCompilerr,  r1  rI  r"  r  s   &&r   r  _PdbServer.do_interact  sK     	+,#++-D$--))DT]]-C-CD 
r   c                F    \        V P                  R V P                  R7      # )F)r)  r   )r  r#  r   rU   s   &r   r#  %_PdbServer._create_recursive_debugger  s     NN]]
 	
r   c                \     V P                  VR R7      #   \        \        3 d    Tu # i ; i)confirmr?  )rz  r  r"  )rV   r   r  s   &&&r   r  #_PdbServer._prompt_for_confirmation  s4    	??&	?BB+, 	N	s    ++c                (    V P                  R 4       R# )z%remote PDB cannot restart the programN)r   r  s   &&r   r  _PdbServer.do_run  s    

:;r   c                   < V P                   '       dR   \        \        P                  ! 4       \        4      '       d)   R V n         \
        SV `  4       pV P                  R4       V# \
        SV `  4       # )Nr  )r"  r(   rp   rI  
SystemExitr   r  r   )rV   r^  r   s   & r   r  _PdbServer._error_exc  sV    Js}}
$K$K#'D '$&CLL;<J7%''r   c                   <  VP                  R 4      R,           p\        P                  ! VRR4      f   \        R4      h\        SV `  V4      #    T P                  4         R# ; i)r   r  r  r  Nr  )removeprefixr  r  r<   r   r  r  )rV   rE   	candidater   s   && r   r  _PdbServer.default  s^    	))#.5I%%iHEM!"6777?9--	OOs   AA A$)r$  r"  r!  r#  r%  r   r  r  )NTFr  r'   )&r   r   r   r   rw   staticmethodr4  rF  classmethodr&  rn  typingoverrider   r   rz  ry  r  rt  r  r  r(  r  r  r  r  r  r  r  r#  r  r  r  r  r  r   rY   r   r   s   @@r   r  r  s
  s    !* 
F 
F&P  @& __8 8 __3 3" ",G\4"H

%%
'
 D/
 __
 
 __ < J(	 	r   r  c                      a  ] tR tRt o R tR tR tR tR tR t	]
R 4       t]
R	 4       t]
R
 4       tR tR tR tR tR tRtV tR# )
_PdbClienti  c                    Wn         R V n        RV n        RV n        RV n        RV n        W n        W0n        \        4       V n	        \        4       V n        . V n        RV n        RV n        RV n        R# )r   NFdumb)pidread_bufsignal_readsignal_writesigint_receivedraise_on_sigintserver_socketinterrupt_sockr   pdb_instancerX  pdb_commandscompletion_matchesr{  write_failedmultiline_block)rV   r  r  r  s   &&&&r   rw   _PdbClient.__init__  sm     $$*,EE"$
!$r   c           
        T; d$    ^8  d   R ;e   w  \         Rc ;e   w      R#    ; d    ^8  d   R ;e   w  R8X  d      R#    ; d    ^8  d   R ;e   w  R8X  d      R#     dd    ^8  d]   R ;eU   w   dO    ^8  dH   R	 ;e@   w  \         Rc ;e0   w   \         Rc ;e$   w   \        Rc ;e   w   \        Rc ;e   w       R#          \        RV 24      h)
r  Nr
   r1  r}  r=  r~  r  r  r  )ra   r  rE  rJ  s   &&r   rF   _PdbClient._ensure_valid_message  s     !!!35! " #""E" # #""E" #    EE!e!e	  $=cUC r   c                    V P                  V4       \        P                  ! V4      p V P                  P	                  VP                  4       R ,           4       R#   \         d    RT n         R# i ; irg  )rF  ri  rj  r  sendallrk  r4   r  rl  s   &, r   rn  _PdbClient._send  s^    ""6*zz&)	%&&|':':'<u'DE 	% !%D	%s   0A A10A1c                Z   V P                   '       d   R V n         \        h\        P                  ! 4       pVP	                  V P
                  \        P                  4       VP	                  V P                  \        P                  4       RV P                  9  d   VP                  4        F  w  r#VP                  V P
                  8X  d=   V P
                  P                  R4       V P                   '       d   R V n         \        hK\  VP                  V P                  8X  g   Ky  V P                  P                  R4      pV ;P                  V,          un        V'       d   K  RV P                  9  g   K  RV n         R# 	  K  V P                  P                  R4      w  rVV n        WV,           # )Frh  rJ  r   i @  )r  r"  	selectorsDefaultSelectorrb  r  
EVENT_READr  r  selectfileobjrP  	partition)rV   selectorrx  r   r   r^  r  s   &      r   	_readline_PdbClient._readline  sA   #(D ## ,,.$**I,@,@A$,,i.B.BC4==("//+;;$"2"22$$))$/+++ 05,//	 ,
 [[D$6$66--229=DMMT)M4E$>(+" ,  #'--"9"9%"@$-yr   c                    W n         V P                  4       ;_uu_ 4        \        V4      uuR R R 4       #   + '       g   i     R # ; ir'   )r  !_sigint_raises_keyboard_interruptr  )rV   r   r  s   &&&r   
read_input_PdbClient.read_input*  s-    .3355= 6555s	   5A	c                   V P                  VR R7      pV P                  R8X  d   V# RpV P                  R8X  d   V P                  P                  V4      ^ ,          pW@P                  9   g   VP                  4       R8X  d   V# VP                  R4      '       d"   RpVP                  V4      P                  4       p\        P                  ! VR,           RR4      e	   W2,           # R	P                  \        V4      4      p\        P                  ! VRR4      f$   VRV P                  VR
R7      ,           ,          pK=  W2,           # )F)r  r  r#   r  r   r  r  r  r  T)r  r{  r  r*  r  rA  rB  r  r  r  r  ljustr  )rV   r   r  rp  r   more_prompts   &&    r   read_command_PdbClient.read_command/  s   >::L::##--e4Q7C'''5;;=B+> $$**6299;!!%$,	8DP>! kk#f+.$$UIx@HTDOOKONNNE~r   c              #  ,  "    ^ RI pTP                  4       p TP                  T4       TP                  R8X  d   RpMRpTP                  T4       Rx  TP                  T4       R#   \         d	    Rx   R# i ; i  TP                  T4       i ; i5i)rJ   Neditlinezbind ^I rl_completeztab: complete)r   r   r  r  r   parse_and_bind)rV   r}  r   r  command_strings   &&   r   readline_completion_PdbClient.readline_completionM  s     	
 !..0
	2""9-:-!6!0##N3""=1  		 ""=1s>   BA( B<A> B(A;7B:A;;B>BBc           
   #    a "   V 3R  lp\        4       pTpTp\        P                  ! 4       w  S n        S n        \        S P                  4      ;_uu_ 4        \        S P                  4      ;_uu_ 4        S P                  P                  R4       S P                  P                  R4        \        P                  ! \        P                  V4      p \        P                  ! S P                  P                  4       RR7      pRx  WBJd   \        P                  ! V4       R;S n        S n        Y2Jd&   \        P                  ! \        P                  T4       RRR4       RRR4       R#   YBJd   \        P                  ! T4       i i ; i  R;S n        S n        Y2Jd'   \        P                  ! \        P                  T4       i i ; i  + '       g   i     Ly; i  + '       g   i     R# ; i5i)c                 b   < R Sn         SP                  '       d   RSn        RSn         \        hR# r  )r  r  r"  )r$  r  rV   s   &&r   handler+_PdbClient._sigint_handler.<locals>.handleri  s2    #'D ###',$',$''	 $r   F)warn_on_full_bufferN)objectrM  
socketpairr  r  r   setblockingr  r  set_wakeup_fdfileno)rV   r  sentinelold_handlerold_wakeup_fds   f    r   _sigint_handler_PdbClient._sigint_handlerb  sr    	( 8 .4.?.?.A+$+d&&''1B1B)C)C((/))%0>$mmFMM7C	<$*$8$8))002,1%M  %4,,];7;; 4#4.MM&--=+ *D'' %4,,]; 5 8<; 4#4.MM&--= /' *D)C'''sf   AG2G57G	-%F4E,F"8G	G"
G2,F

F;GG	GGG/	)	G2c              #     "   V P                   '       d   R V n         \        h RV n        Rx  R V n        R#   R T n        i ; i5i)FTN)r  r"  r  rU   s   &r   r  ,_PdbClient._sigint_raises_keyboard_interrupt  s?     #(D ##	)#'D #(D 5D s    A7 	A	A  Ac           
     :   V P                  4       ;_uu_ 4        V P                  V P                  4      ;_uu_ 4        V P                  '       gF    V P	                  4       ;p'       g   M+  \        P                  ! T4      pT P                  T4       KW  RRR4       RRR4       R#   \
         d    T P                  4         K  i ; i  \        P                   d    \        R T: 2RR7        K  i ; i  + '       g   i     Li; i  + '       g   i     R# ; i)z*** Invalid JSON from remote: Tr  N)r  r  rz  r  r  r"  send_interruptri  r  r  ro   process_payload)rV   payload_bytesr  s   &  r   rt  _PdbClient.cmdloop  s      ""$$T]]33'''-1^^-==M= >"jj7G $$W-' 4 #" ) '') ++ 88IJ"  43 #""sj   $D	C6	B')C6	,C	C6	D	'CC6	CC6		&C3/C6	2C33C6	6DD		D	c                    V P                   e:   V P                   P                  \        P                  P	                  4       4       R # \
        P                  ! V P                  \        P                  4       R # r'   )r  r  r  r  to_bytesrj   killr  rU   s   &r   r  _PdbClient.send_interrupt  sI    *
 ''(>(>(@A
 GGDHHfmm,r   c                   T; dc    ^8  d\   R ;eT   w   p  \         ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d    \        V4      V n        R#    ; d\    ^8  dU   R ;eM   w  \        Rc;e?   w  uuu\        Rc;e/   w  p  p VR8X  d   \	        RVRR7       R# \	        VR	RR
7       R#     ; d@    ^8  d9   R ;e1   w  \        Rc;e$   w  p   V P
                  P                  V4       R#     dV    ^8  dO   R ;eG   w  \        Rc;e9   w  uuu\        Rc;e)   w  p  pVR9  d   RpWpn        V P                  V4       R#      \        RV 24      h)r  Nc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir'   r8  r9  s   & r   r-   -_PdbClient.process_payload.<locals>.<genexpr>  r<  r  FTr
   r   rI  r  r#   )r   r  r  zUnrecognized payload rB  r>  r  r?  r  r  )
rD  rX  r  ra   ro   r  r  r{  prompt_for_replyr  )rV   r  rC  r  msg_typer.  r   r{  s   &&      r   r  _PdbClient.process_payload  s      ,>>>>>>$'$5! >==SXs}=w&%D1#2T2	 >
 $###(#!!))#. $===CK#*= 33"E"
%%f-	 >
 "%:7)#DEEr   c                8     RV P                  V4      /pT P                  ! R	/ TB  R#   \         d    RR/p L%\         d    RR/p L5\         dE   p\        P
                  ! T4      R,          P                  4       p\        RTR R7        Rp?K  Rp?ii ; i)
Tr  r  r1  r}  rI  r  Nr  r
   )	r  r  r"  r   r   r  rA  ro   rn  )rV   r   r  r  r  s   &&   r   r  _PdbClient.prompt_for_reply  s    	"D$5$5f$=> JJ!!  ,#U+$ ,#U+ 55c:2>DDFeS-s,   * BBBBB9BBc           	        ^ RI pV^ 8X  Ed$   . V n        V P                  R
9  d   R# VP                  4       pVP	                  4       pV P
                  '       d
   RV,           p\        V4      \        V4      ,
          pVP                  4       V,
          pVP                  4       V,
          pRRVRVRVRV//p	V P                  ! R/ V	B  V P                  '       d   R# V P                  4       p
V
'       g   R# \        P                  ! V
4      p
RV
9  d   \        R	V
 24      hV
R,          V n         V P                  V,          #   \         d     R# i ; i)rJ   Nz! rz  rQ  rE   rR  rS  rA  z&Failed to get valid completions. Got: r  r
   )r   r  r{  get_line_bufferr  r  r  rt  
get_endidxrn  r  r  ri  r  r  r  )rV   rQ  r{  r   origlinerE   offsetrR  rS  r  r  s   &&&        r   rz  _PdbClient.complete  sH   A:&(D#zz!44//1H??$D### d{]SY.F((*V3F((*V3F DDff	C JJ   nn&Gjj)GG+"<WIF  '.m&<D#	**511 		s   1E EE)r  r  r  r  r  r  r  r  r  r  r  r  r{  r  N)r   r   r   r   rw   rF  rn  r  r  r  r   r  r  r  rt  r  r  r  rz  r   rY   rZ   s   @r   r  r    s     % <%>!
< 2 2( (> (>T 
) 
).0-F* - -r   r  c                 v   \        \        P                  ! W34      4      ;_uu_ 4       pVP                  R 4      pRRR4       V'       d   W3p	MRp	\	        XV	VR7      p
\
        P                  ! WP                  4       \        P                  e   V
P                  R4       R# WJP                  4       8w  d4   RV
P                  4       R 2pRVR 2pV
P                  RV RV 24       R# V
P                  P                  VP                  4       4       V
P                  VR7       R#   + '       g   i     L; i)	rwbN)r(  r   z)Another PDB instance is already attached.0x08XzThe target process is running a Python version that is incompatible with this PDB module.
Target process pdb protocol version: z&
Local pdb module's protocol version: )r  )r   rM  r`  makefiler  weakreffinalizer  r   r  r   r4  r   r   r  r  )hostportr  r   versionsignal_raising_threadr   connr'  r(  
remote_pdb
target_ver
attach_vers   $$$$$$$      r   _connectr*    s    
))4,7	8	8D==' 
9
 #J
 Z0
)DE	//1	1*557<=
'#'
66@\5j\C	
 	!!("5"5"785)= 
9	8s   D((D8	c                   \        4       ;_uu_ 4       pVP                  \        \        P                  ! R4      4      4      pVP                  4       ^,          pVP                  \        P                  ! RRR7      4      p\        P                  R8H  p\        P                  ! 4       pVP                  \        P                  ! RV R\        P                   ! RP#                  V4      4       R\$        P'                  4        R	V: R
V: R24      4       VP)                  4        \*        P,                  ! VP.                  4      P0                  p\*        P2                  ! VP.                  V\,        P4                  ,          \,        P6                  ,          4       \        P8                  ! WP.                  4       VP;                  4       w  rVP                  \        V	4      4       V'       d?   VP;                  4       w  rVP                  \        V4      4       VP=                  R4       MRp\?        W	V4      PA                  4        RRR4       R#   + '       g   i     R# ; i)z/Attach to a running process with the given PID.wF)delete_on_closewin32z~
                import pdb, sys
                pdb._connect(
                    host="localhost",
                    port=zK,
                    frame=sys._getframe(1),
                    commands=r  z,
                    version=z,,
                    signal_raising_thread=z,
                    colorize=z$,
                )
                N)	localhostrJ   )!r   enter_contextr   rM  create_servergetsocknametempfileNamedTemporaryFilerp   platformr   r   r   r  dedentri  rj  r9   r  r4  r  rj   statr  st_modechmodS_IROTHS_IRGRPremote_execacceptr  r  rt  )r  r   r.  serverr#  connect_scriptuse_signal_threadr   	orig_modeclient_sockr   r  s   &&          r   attachrC  ?  s   	$$F(()9:;
 !!#A&,,''UC
  LLG3))+OO   "jj8)<=> ?'88:; <++<*? @&\ *	
  	GGN//088	
$$i$,,&>&MN001  GK01 &N 78&&u-!N3^4<<>[ 
s   H4II"	c                *    \        V \        4       4      # )al  Enter post-mortem debugging of the given *traceback*, or *exception*
object.

If no traceback is given, it uses the one of the exception that is
currently being handled (an exception must be being handled if the
default is to be used).

If `t` is an exception object, the `exceptions` command makes it possible to
list and inspect its chained exceptions (if any).
)_post_mortemr   )r  s   &r   post_mortemrF  s  s     35!!r   c                   V f&   \         P                  ! 4       pVe   VP                  p V e%   \        V \        4      '       d   V P                  f   \        R4      hVP                  4        VP                  RV 4       R# )zZ
Private version of post_mortem, which allow to pass a pdb instance
for testing purposes.
NzAA valid traceback must be passed if no exception is being handled)rp   rI  r  r(   r  r   r(  rP  )r  r  r  s   && r   rE  rE    sn     	ymmo?!!AyZ=11aoo6M 6 7 	7 T1%r   c                 8    \        \        P                  4       R# )zCEnter post-mortem debugging of the traceback found in sys.last_exc.N)rF  rp   last_excr
   r   r   pmrJ    s    r   zimport x; x.main()c                  $    \        \        4       R # r'   )r   TESTCMDr
   r   r   testrM    s	    Lr   c                  8    ^ RI p V P                  \        4       R# r  )pydocpagerr   )rO  s    r   r   r     s    	KKr   a.  Debug the Python program given by pyfile. Alternatively,
an executable module or package to debug can be specified using
the -m switch. You can also attach to a running Python process
using the -p option with its PID.

Initial commands are read from .pdbrc files in your home directory
and in the current directory, if they exist.  Commands supplied with
-c are executed after commands from .pdbrc files.

To let the script run until an exception occurs, use "-c continue".
To let the script run up to a given line X in the debugged file, use
"-c 'until X'".c                 H    \        R4       \        P                  ! ^4       R# )z
Prints a message pointing to platform-specific permission help text and exits the program.
This function is called when a PermissionError is encountered while trying
to attach to a process.
zError: The specified process cannot be attached to due to insufficient permissions.
See the Python documentation for details on required privileges and troubleshooting:
https://docs.python.org/3.14/howto/remote_debugging.html#permission-requirements
N)ro   rp   rq   r
   r   r   exit_with_permission_help_textrR    s     
	]
 HHQKr   c            
         ^ RI p V P                  R\        V P                  RRR7      pVP	                  RRR. R	R
RR7       VP	                  RRRR7       VP	                  RR\
        RRR7       \        \        P                  4      ^8X  d'   VP                  4        \        P                  ! ^4       VP                  4       w  r#VP                  '       dW   VP                  4       pVP                  '       d   VP                  R4        \!        VP                  VP"                  4       R# VP                  '       dE   \        P                  P)                  R4      p\        P                  ^V pVP                  V4       Mb\+        \,        P.                  ! R V4      4      pV'       d:   VP                  RRP1                  V4       24       \        P                  ! ^4       VP                  '       d   VP                  p\3        V4      p	MXV'       g   VP                  R4       VP5                  ^ 4      pVP7                  R4      '       d   \9        V4      p	M\;        V4      p	V.V,           \        P                  R&   \=        RRRR7      p
V
P>                  PA                  VP"                  4         V
PB                  ! V	4       T
PV                  '       d   R# \G        R'4       K5    \$         d   p\'        4         Rp?R# Rp?ii ; i  \D         dG    \G        RT	R4       \G        R RP1                  \        P                  R!,          4      ,           4        L\H         d#   p\G        R"RR#7       \G        T4        Rp?LRp?i\J         d   p\L        PN                  ! T\P        PR                  ! 4       R$7       \G        R%4       \G        R&4        T
PT                  ! RT4        Rp?EL$  \D         dM    \G        RT	R4       \G        R RP1                  \        P                  R!,          4      ,           4         Rp?EK  i ; iRp?ii ; i)(rJ   NzC%(prog)s [-h] [-c command] (-m module | -p pid | pyfile) [args ...]FT)usagedescriptionformatter_classallow_abbrevcolorz-cz	--commandr_  r-  r   z4pdb commands to execute as if given in a .pdbrc file)actionr  metavardestr   z-mmodule)rZ  r[  z-pz--pidzattach to the specified PID)rs  r   r  z,argument -m: not allowed with argument --pidc                 $    V P                  R 4      # )-)rB  )r  s   &r   <lambda>main.<locals>.<lambda>  s    !,,s:Kr   zunrecognized arguments: r  zno module or script to runz.pyzr  clir   r  
Restartingzwith arguments:rl  r  z/The program exited via sys.exit(). Exit status:r   )r   z2Uncaught exception. Entering post mortem debuggingz1Running 'cont' or 'step' will restart the programz*The program finished and will be restarted),argparseArgumentParser_usageRawDescriptionHelpFormatteradd_argumentr  r  rp   r  
print_helprq   parse_known_argsr  
parse_argsr\  r   rC  r   PermissionErrorrR  r  rK   	itertools	takewhiler9   r   r2  r  r   rh   r   r   r   r  r	   ro   r  r  r   print_exceptionr   r   rP  r,  )rc  parseroptsr#  r   r$  args_to_pdbinvalid_argsr   rv   r  s              r   mainrs    sK   $$S << % F k(BPY`jS  U
hX>
gC6S]ab
388} 	((*JDxxx   ";;;LLGH	-488T]]+ 		 hhnnT"hhqo+&
 I//0KTRSLL3CHH\4J3KLMHHQK{{{{{t$LL56xx{==  %F"4(F&4-CHHQK 5,
>CKKt}}%
	HHV$ ###:;A  	-*,,	-Z  	1,(9:$#((2,//0 	CM!HH 		%%a)2H2H2JKFGEFa(( lF,=>dSXXchhrl334		so    K* 7L *L
5
LL
AQQ&Q'NQQAQO--AQ;QQQQr   )r   rJ  r   r  r  r  r  rF  r   r   r   )NN)r
   r'   )[r   rj   r7   r/   rp   r   r   r   r   r[  ri  r7  r
  r  ra  r  rV  r  rM  r  r  r8  r   r  r3  r  r2   rl  r   r5   r  r]  r   _pyrepl.utilsr=  
contextlibr   r   r   rlcompleterr   r   warningsr   r   r	   __all__r!   rH   rQ   ra   rS   r]   rh   r   r   InteractiveConsoler   r  r   r   r   r   r   r   _help_order_commandr^  rA  r  r   r  r  r  r  r  r  r  r*  rC  rF  rE  rJ  rL  rM  r   re  rR  rs  r   r  r
   r   r   <module>r|     ss  ?F 
 	 	 
 
 
 
                           9 9 !  	i 	P">C  $
% $
N"
% "
J#
" #
L$T44 $ 
  
F#L#''377 F#LTF !%'.08:ACL')35;=CEL 	  # %* ,6 8> @J 		 	 	 $	 &.	 09	 ;F	
 	
 
 '
 )0
 28K  73 0199??AFJJ  s}}$$$GX
*6$(= =t ="ID I4 I"Y Yx
B BJ
(*V/?h"&& 
c<N zHHJ r   