Qft ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlmZGddeZgdZdZdZGdd eZGd d eZGd d eZdZGddej:ej<Ze PgdZ!e!D],Z"e e#ede"zj@jIdzz Z .e ejJj@z Z [!["d"dZ&d"dZ'dZ(dZ)dddZ*d#dZ+dZ,dZ-dZ.dZ/dZ0d Z1e2d!k(rddl3Z3e3jbyy)$N)UnionceZdZ y)RestartN)__name__ __module__ __qualname__*/opt/alt/python312/lib64/python3.12/pdb.pyrr[sLr r) runpmPdbrunevalrunctxruncall set_trace post_mortemhelpc@tjdtj|z} tj|}|5t |dD]&\}}|j|s|||fccdddS dddy#t $rYywxYw#1swYyxYw)Nzdef\s+%s\s*[(])start)recompileescapetokenizeopenOSError enumeratematch)funcnamefilenamecrefplinenolines r find_functionr&bs **&8)<< =C ]]8 $ %b2LFDyy611222     s)B%B*B:B BBBcttj|}|j|D]\}}||k\s |cSyNr)listdisfindlinestartsreverse)codelasti linestartsir$s r lasti2linenor1osBc((./J 6 A:M  r ceZdZ dZy)_rstrc|SNr selfs r __repr__z_rstr.__repr__zs r N)rrrr8r r r r3r3xs -r r3cTeZdZfdZdZedZedZedZxZ S) _ScriptTargetcpt||tjj |}||_|Sr5)super__new__ospathrealpathorig)clsvalres __class__s r r=z_ScriptTarget.__new__s0goc277#3#3C#89 r ctjj|s,td|jdt j dtjj|r,td|jdt j dtjj|t jd<y)NzError:zdoes not existrzis a directoryr) r>r?existsprintrAsysexitisdirdirnamer6s r checkz_ScriptTarget.checksvww~~d# (DII'7 8 HHQK 77==  (DII'7 8 HHQKggood+ r c|Sr5r r6s r r!z_ScriptTarget.filenames r c(td|tdS)N__main__)r__file__ __builtins____spec__)dictrRr6s r namespacez_ScriptTarget.namespaces%   r ctj|5}d|jd|dcdddS#1swYyxYw)Nz exec(compile(z, z , 'exec')))io open_coderead)r7r#s r r-z_ScriptTarget.codes; \\$ 2"2779-r$D E E  s 7A) rrrr=rMpropertyr!rUr- __classcell__)rEs@r r:r:~sK ,  EEr r:cveZdZdZej dZedZedZ edZ edZ y) _ModuleTargetc |jy#t$r-}td|tjdYd}~yd}~wt $r,t jtjdYywxYw)Nz ImportError: r)_details ImportErrorrHrIrJ Exception traceback print_exc)r7es r rMz_ModuleTarget.checksY  MM  M!% & HHQKK     ! HHQK s  A8#A5A87A8c,ddl}|j|Sr()runpy_get_module_details)r7rfs r r_z_ModuleTarget._detailss((..r c.|jjSr5)r- co_filenamer6s r r!z_ModuleTarget.filenamesyy$$$r c&|j\}}}|Sr5r_r7namespecr-s r r-z_ModuleTarget.code==dD r c&|j\}}}|Sr5rkrls r _specz_ModuleTarget._specror ctdtjjtjj |j |j j|j j|j tS)NrP)rrQ __package__ __loader__rSrR) rTr>r?normcaseabspathr!rqparentloaderrRr6s r rUz_ModuleTarget.namespacesYWW%%bggoodmm&DE ))zz((ZZ%   r N) rrrrM functoolscached_propertyr_rZr!r-rqrUr r r r]r]sq//%%  r r]z -> ceZdZdZ dXdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZeZdYdZ dZ!e Z"eZ#eZ$dZ%eZ&d Z'd!Z(d"Z)eZ*d#Z+eZ,d$Z-eZ.d%Z/eZ0d&Z1e1Z2eZ3eZ4d'Z5e5Z6e5Z7d(Z8d)Z9e9Z:d*Z;e;Zd,Z?e?Z@d-ZAeAZBd.ZCeCZDd/ZEeEZFd0ZGeGxZHZId1ZJeJZKd2ZLeZMd3ZNeNZOeNZPd4ZQd5ZReRZSd6ZTeTZUd7ZVdZd8ZWd9ZXd:ZYd;ZZd<Z[d=Z\eZ]eZ^eZ_d>Z`e`Zad?ZbebZcd@ZdeZed[dAZfdBZgeZhdCZieZjdDZkdEZldFZmdGZndHZodIZpgdJZqdKZresfdLZtdMZueuZvdNZwdOZxdPZydQeze{e|ffdRZ}dSe~fdTZdUZdVZdWZy)\rNcFtjj||tjj||||t j d|rd|_d|_i|_ i|_ d|_ d|_ i|_ ddl}|jdd|_||_g|_|r t)t*j,j/dd 5}|j&j1|ddd t)d d 5}|j&j1|dddi|_i|_i|_d|_d|_y#t $rYwxYw#1swYnxYw#t2$rY|wxYw#1swYWxYw#t2$rYewxYw) N)skipzpdb.Pdbrz(Pdb) Fz `@#$%^&*()=+[{]}\|;:'",<>?z~/.pdbrczutf-8)encodingz.pdbrc)bdbBdb__init__cmdCmdrIaudit use_rawinputpromptaliases displaying mainpyfile_wait_for_mainpyfile tb_linenoreadlineset_completer_delimsr` allow_kbdintnosigintrcLinesrr>r? expanduserextendrcommandscommands_dopromptcommands_silentcommands_defining commands_bnum) r7 completekeystdinstdoutr}rreadrcrrcFiles r rz Pdb.__init__sy D) {E6: )  !D   $)!    ) )*M N"    "'',,Z87KvLL''/L (W5LL''/6  !#!!&!5   LK  65  sf E:*E9$E-E9 FF2F E*)E*-E62E99 FFF F F F c|jrt|jd|j|j |y)Nz- Program interrupted. (Use 'cont' to resume).)rKeyboardInterruptmessageset_stepr)r7signumframes r sigint_handlerzPdb.sigint_handler s3   # # EF  ur cbtjj||jyr5)rrresetforgetr6s r rz Pdb.resets  d r cd|_g|_d|_t|dr2|jr&|jj j ddd|_|jjy)Nrcurframe__pdb_convenience_variables) r$stackcurindexhasattrr f_globalspoprclearr6s r rz Pdb.forgetsY   4 $ MM # # ' '(Et L  r c|j|j||\|_|_|rRt |j j |j}||j|j <|j}|rR|j|jd|_ |jj|_ |j|jd|j|jrV|jDcgc]3}|jr!|jj!ds|5c}|_g|_yycc}w)Nr_frame#)r get_stackrrr1tb_framef_codetb_lastirtb_nextrf_localscurframe_localsset_convenience_variablerstrip startswithcmdqueue)r7ftbr$r%s r setupz Pdb.setups $(NN1b$9! DM""++"4"4bkkBF*0DNN2;; 'B  4==1!4  $}}55 %%dmmXt}}M <>% LL $   UD ) !r c |jrI|j|j|jjk7s|j dkryd|_|j |r|j|dyy)NrF)rrcanonicrrif_lineno bp_commandsr)r7rs r user_linez Pdb.user_lineAsgI  $ $4<< 0H0H#II>>Q&(-D %   E "   UD ) #r c t|ddr|j|jvr|j}d|_|j}|j |d|j|D]}|j |||_|j |s(|j|j|j|j|r|j|jyy)N currentbpFrr) getattrrrlastcmdronecmdrprint_stack_entryrrr_cmdloopr)r7rr lastcmd_backr%s r rzPdb.bp_commandsKs  4e ,~~.IDN< tjtjtjdt_|j |||j jd|j|j r,|j ddk(r|j j|jy#t$rYwxYw)N_pdbcmd_print_frame_status) r_previous_sigint_handlersignalSIGINT ValueErrorrrappendrrr)r7rrbs r rzPdb.interactions  ' ' 4 fmmS-I-IJ04, 5)$ 9:  ==T]]2.2NN MM      s2C C! C!c@ ||jt|yyr5)rrepr)r7objs r displayhookzPdb.displayhooks#  ? LLc # r cV|dddk(r|ddj}|j}|jj} t |dzdd}t j }t j}t j} |jt _|j t _|jt _t||||t _|t _|t _y#|t _|t _|t _wxYw#|jYyxYw)Nr! single) rrrrrrIrrrexec _error_exc)r7r%localsglobalsr- save_stdout save_stdinsave_displayhooks r defaultz Pdb.defaults 8s?48>>#3D%%--)) 4$; 8 D d?K$&& z --bkk$.?.H.HI:;7 L%a)lc.A/4c*Lj(Z5::-E%,,l1os1v|-TU J!K 1 E3   tHU38UVZU[[]6^^ _H!2 4 ?+ww{##"" K sAC5/C5C55D  D cd |js|S|j}|d|jvr|j|d}d}|ddD]%}|jdt |z|}|dz }'|jddj |dd}|j}|d|jvr|ddk7r[|j d}|dk\rE||dzdj}|jjd||d|j}|j|}|S) Nrr%z%* aliasz;;) rsplitrreplacestrrfindlstriprinsertrstripr)r7r%argsiitmpArgmarkernexts r precmdz Pdb.precmds08zz|Kzz|1g%<<Q(DBqr(||C#b'M&,.a#<<chhtABx&89D::>$- -**40 0r c |j|\}}}|sy|dk(rd|j|j<y|dk(ry|j|j}|r|j |dz|zn|j | t |d|z}|j|jvrd|j|j<yy#t $r|j}YJwxYw)NFsilentTrr!do_) r3rrrrrAttributeErrorr rcommands_resumingr)r7r%rr6cmdlistfuncs r r4zPdb.handle_command_defsF-S$ (?7;D !3!3 4 E\-- 2 23  NN3s73; ' NN3  4-D ==D22 29>D " "4#5#5 6  <r?rKrisfilelower)r7textr%begidxendidxretglobsfns r _complete_locationzPdb._complete_locationIs ::<  ,I ++D$GC $++d+c12Bww}}R  28$# (;(;O(L 28$    C sC33 DDcttjjDcgc],\}}|%t |j |r t |.c}}Scc}}wr5)rr Breakpoint bpbynumberr&r)r7rSr%rTrUr0bps r _complete_bpnumberzPdb._complete_bpnumber\sV%.cnn.G.G$H?$H51b>c!f&7&7&=A$H? ??s1Ac|jsgSi|jj|j}d|vry|jd} ||d}|ddD]}t ||} dj|dddz} t|D cgc]} | j|ds| | zc} S|jD cgc]} | j|s| c} S#t t f$rgcYSwxYwcc} wcc} w)N.rrr) rrrr$rKeyErrorr:rdirrkeys) r7rSr%rTrUnsdottedrpartrns r rOzPdb._complete_expressioncs }}IA '' @4+?+? @ $;ZZ_F m"1RLD!#t,C)XXfSbk*S0F(+CM1ALL4LFQJM M "wwy?y!ALL,>Ay? ? n-   N@s* C C7&C7C<C< C43C4ct|j|j|j|jyr5)rrrrr7r6s r rzPdb._pdbcmd_print_frame_status~s) tzz$--89 r c |s'ttjjdz }n t |} |j |||_||jvr-|j||j||j|f}nd}g|j|<d|j|<d|j|<|j}d|_ d|_ |jd|_ ||_ y#|j dYyxYw#t$r}|j d|zYd}~yd}~wwxYw#t$rt|r7|d|j|<|d|j|<|d|j|<n'|j|=|j|=|j|=|j d YwxYw#d|_ ||_ wxYw) Nrz.Usage: commands [bnum] ... endzcannot set commands: %sTFz(com) rr#z1command definition aborted, old commands restored)lenrr[r\intrEget_bpbynumberrrrrrrrrr)r7r6bnumerrold_command_defs prompt_backs r do_commandszPdb.do_commandss# Hs~~001A5D 3x     % " 4== $ d 3 $ 6 6t < $ 4 4T : <  $   d'+t$%*T"kk  !% & LLN&+D "%DKO  MN  JJ036 7  *! L&6q&9 d#/?/B&&t,-=a-@$$T*MM$'**40((. JJJ K L&+D "%DKsG C4D D64D  D3D..D36A:F30F62F33F66Gc |s_|jrR|jdtjjD]$}|s|j|j &yd}d}d}|j d}|dkDrT||dzdj}|j|x}r|jd|d|y|d|j}|jd} d} | dk\r`|d| j}|j|} | s|jd|zy| }|| dzdj} t|}n t|}|s|j5}|j7||}|rt|j9||||| }|r|j|y|j;||d }|jd |j<|j>|j@fzyy#t$r|jd |zYywxYw#t$r t||j j"|j$} n #|} YnxYw t'| d r | j(} | j*} | j,} | j.}| j0}nB#|j3|\}}}|s|jd |zYYy|} t|}YnxYwYwxYw)Nz!Num Type Disp Enb WhererJrrInvalid condition rrIz%r not found from sys.pathzBad lineno: %s__func__zJThe specified object %r is not a function or was not found along sys.path.rzBreakpoint %d at %s:%d)!breaksrrr[r\bpformatr'r(_compile_error_messagerEr*rfind lookupmodulerlrevalrrrrru__code__co_nameco_firstlinenorilineinfo defaultFile checkline set_break get_breaksnumberr@r%)r7r6 temporaryr]r!r$condcommarocolonr rr=r-oklnr%s r do_breakz Pdb.do_breaks {{ @A..33B R[[]34   19uQwx='')D11$77s7 sCDfu+$$&C # A:6E{))+H!!(+A 7(BCeAgh-&&(C S  %S4'')H~~h/ ..4D(KC 3__Xt4R8 5 ii"'':;< I  +c12  % $ 7 7 $ 4 46DD%tZ0#}}==D $||H!00F#//H%)-s);&R2 $FHK$LM!H WF1 %sa? G2 H2HH K$+I  K$ IK$AJK$-K K$ KK$#K$c |jjj}|dk(r|jr |j}|S)Nz)rrrir)r7r!s r rzPdb.defaultFile<s6+==''33 z !dooHr c* |j|dyNr)rris r do_tbreakz Pdb.do_tbreakHs c1r cd}|jd}t|dk(r|dj}n$t|dk(r|dj}n|S|dk(r|S|jd}|ddk(r|d=t|dk(r|S|j}t|dk(r|d}n|j |d}|r|}|d}t ||} | xs|S) N)NNN'rrr~r`r7)r$rkrrrzr&) r7 identifierfailedidstringidpartsfnameitemranswers r rz Pdb.lineinfoRs###C( x=A !""$B ]a !""$BM 8F]  8v a5zQ   " u:?8D!!%(+A8DtU+r c t|dd}|r |jnd}tj|||}|s|j dy|j }|r|ddk(s|dddk(s|dddk(r|j dy|S) Nrz End of filerrrz"""z'''zBlank or comment)rr linecachegetlinerrrE)r7r!r$rrWr%s r rz Pdb.checkliness j$/#(d  659 LL 'zz|aC2Ah%D!H$5 JJ) * r c |j}|D]8} |j|}|j|jd|z:y#t$r}|j |Yd}~[d}~wwxYw)Nz Enabled %s)r$rmenablerrrEr7r6r+r0r]ros r do_enablez Pdb.do_enablesn yy{A 0((+  \B./  3 A A4A//A4c |j}|D]8} |j|}|j|jd|z:y#t$r}|j |Yd}~[d}~wwxYw)Nz Disabled %s)r$rmdisablerrrErs r do_disablezPdb.do_disablesn yy{A 1((+  ]R/0  3 rc |jdd} |d}|j|x}r|jd|d|y |j |dj }||_|s|jd|jzy|jd|jzy#t$rd}YwwxYw#t$r|jdYyt$r}|j|Yd}~yd}~wwxYw) Nr!rrtrrz#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.Breakpoint number expected) r$rxrE IndexErrorrmrrrrr)r7r6r+rror]s r do_conditionzPdb.do_conditions yya  7D11$77s7 sCD8 Q$$T!W]]_5B BG BRYYNO CbiiOP D  5 JJ3 4  JJsOO s//B0"C0 B>=B>DD%C;;Dc |j} t|dj} |j|dj}||_|dkDr.|dkDrd|z}nd}|j d||j fzy|j d|j zy#d}YxYw#t$r|jdYyt$r}|j|Yd}~yd}~wwxYw)Nrrz %d crossingsz 1 crossingz%Will ignore next %s of breakpoint %d.z-Will stop next time breakpoint %d is reached.r) r$rlrrmignorerrrrEr)r7r6r+countr]countstrros r do_ignorez Pdb.do_ignores yy{ Q (E *$$T!W]]_5B BIqy19-5H+H D& 234 L!yy)*% E 5 JJ3 4  JJsOO s(B+"B4+B14C3C3C..C3c\ |s td}|jj}|dvrUtj j Dcgc]}|s| }}|j|D]}|jd|zyd|vr|jd}|d|}||dzd} t|}|j||dd}|j||}|r|j|yD]}|jd|zy|j} | D]9} |j!|}|j#||jd|z;y#t$rd}YZwxYwcc}w#t$rd|z}YwxYw#t$r}|j|Yd}~d}~wwxYw)NzClear all breaks? no)yyesz Deleted %srIrzInvalid line number (%s))inputEOFErrorrrRrr[r\clear_all_breaksrryrlr clear_breakrrEr$rmclear_bpbynumber) r7r6replyr]bplistr0r!r$ro numberlists r do_clearz Pdb.do_clears  23KKM'')E $'*~~'@'@G'@B"'@G%%' BLL!23!  #: #A2AwHacd)C 9S6:1=&&x8 3 !BLL!23! YY[ A 0((+%%a( \B./9  H 7036 7  3 sG EE.E.+ E3#F E+*E+3FF F+F&&F+c& |jyr5)print_stack_traceris r do_wherez Pdb.do_where's  r c6||_|j|jd|_|jj|_|j |jd|j|j |j|jd|_y)Nrr)rrrrrrrr$)r7rs r _select_framezPdb._select_frame2sp  4==1!4 #}}55 %%dmmXt}}M tzz$--89 r c |jdk(r|jdy t|xsd}|dkrd}nt d|j|z }|j |y#t$r|jd|zYywxYw)Nrz Oldest framerInvalid frame count (%s))rrErlrmaxrr7r6rnewframes r do_upz Pdb.do_up;s ==A  JJ~ &  qME 19H1dmme34H 8$  JJ1C7 8  sA&&BBc |jdzt|jk(r|jdy t |xsd}|dkrt|jdz }n/t t|jdz |j|z}|j|y#t $r|jd|zYywxYw)Nrz Newest framerr)rrkrrErlrminrrs r do_downz Pdb.do_downPs ==1 DJJ / JJ~ &  qME 194::*H3tzz?Q. 0EFH 8$  JJ1C7 8  sB((CCc |r7 t|}||jjkr|jdyd}|j |j|y#t$r|jd|zYywxYw)NError in argument: %rz7"until" line number is smaller than current line numberr)rlrrErr set_until)r7r6r$s r do_untilz Pdb.do_untiles   S/// )*F t}}f-  2S89 s AA:9A:c& |jyr)rris r do_stepz Pdb.do_step~s r c< |j|jyr)set_nextrris r do_nextz Pdb.do_nexts dmm$r c |rEddl}tjdd} |j|t_|tjddt #t$r!}|j d|d|Yd}~yd}~wwxYw)Nrrz Cannot run r)shlexrIargvr$rrEr)r7r6rargv0rds r do_runz Pdb.do_runso   HHQqME  ;;s+!CHHRaL   #q9: sA A9A44A9c< |j|jyr) set_returnrris r do_returnz Pdb.do_returns   &r c |js8 tjtj|jt_|jy#t $rYwxYwr)rrrrrrr set_continueris r do_continuezPdb.do_continues\ }} MM&--1D1DE,     s7A A#"A#c |jdzt|jk7r|jdy t |} ||j _|j|jd|f|j|j<|j|j|jy#t$r}|jd|zYd}~yd}~wwxYw#t$r|jdYywxYw)Nrz)You can only jump within the bottom framerzJump failed: %sz)The 'jump' command requires a line number) rrkrrErlrrrr)r7r6rds r do_jumpz Pdb.do_jumps  ==1 DJJ / JJB C  2c(C 2*- &,0JJt}},Ea,H#,M 4==)&&tzz$--'@A 2 ,q011 2 D JJB C Ds* CA.B55 C>CCC<;C<c8 tjd|jj}|j}t |j |j|j}d|jjz|_ |jd tj|j|||f|jdtj|j |j"|_y#t$r|jY]wxYw)Nz(%s) zENTERING RECURSIVE DEBUGGERzLEAVING RECURSIVE DEBUGGER)rIsettracerrrrrrrrrr call_tracingr rartrace_dispatchr)r7r6rrps r do_debugz Pdb.do_debugs T--))%%   $**dkk :T[[..00 23    QUUS'6$: ; 12 T(()yy   OO  s#C==DDc4 d|_|jy)NTr)_user_requested_quitset_quitris r do_quitz Pdb.do_quits %)! r cV |jdd|_|jy)Nr~Tr)rrrris r do_EOFz Pdb.do_EOFs)  R$(! r c  |jj}|j}|j|jz}|j t jzr|dz}|j t jzr|dz}t|D]S}|j|}||vr*|j|d|j|||@|j|dUy)Nr = z = *** undefined ***) rrr co_argcountco_kwonlyargcountco_flagsinspect CO_VARARGSCO_VARKEYWORDSrange co_varnamesrr)r7r6corTrgr0rms r do_argsz Pdb.do_argss ]] ! !## NNR11 1 ;;++ +1Q ;;// /QqSqA>>!$Dt| $T D0QRS ?@ r c d|jvr/|j|j|jddy|jdy)NrretvalzNot yet returned!)rrrrEris r do_retvalz Pdb.do_retval"sF  4// / LL)=)=l)KXV W JJ* +r c t||jj|jS#|j xYwr5)r{rrrrris r _getvalz Pdb._getval-s: T]]44d6J6JK K  OO  s *-Ac |+t||jj|jSt||j|jS#t $r'}t d|j|zcYd}~Sd}~wwxYw)Nz** raised %s **)r{rrrr BaseExceptionr3r)r7r6rexcs r rzPdb._getval_except4sq D}C!8!8$:N:NOOC%..AA D*T-=-=c-BBC C Ds",A A BA;5B;Bcltj}|j|j|yr5)rI exceptionrErr7rs r rzPdb._error_exc=s$mmo 4##C()r c |j|} |j||y#YyxYw#|jYyxYwr5)rrr)r7r6r=rCs r _msg_val_funczPdb._msg_val_funcAsD ,,s#C  LLc #    OO s,30Ac  t|S#t$r+}td|d|j|dcYd}~Sd}~wwxYw)Nz *** repr(z ) failed: z ***)rrar3r)r7rrrds r rzPdb._safe_reprKsJ P9  P9TF*T5E5Ea5H4INO O Ps A <AAc2 |j|tyr5)rrris r do_pzPdb.do_pQs  3%r cF |j|tjyr5)rpprintpformatris r do_ppz Pdb.do_ppXs  3/r c" d|_d}|r|dk7r d|vrQ|jd\}}t|j}t|j}||kr.||z}n(t|j}t d|dz }nD|j|dk(r$t d|jjdz }n|jdz}||dz}|jjj}|jdr7|jjjd }t|t r|}|j#|} t%j&||jj}|j)||dz ||||jt+|t-||_t-||kr|j/d yy#t $r|j d|zYywxYw#t0$rYywxYw) Nr)r`rJrr zG? H Hc0 |jjj}|j|} |j |j\}}|j||||jy#t $r}|j |Yd}~yd}~wwxYwr5)rrrir_getsourcelinesrrEr)r7r6r!rrr$ros r do_longlistzPdb.do_longlists ==''33((2   00?ME6 %DMMB  JJsO  sA11 B:BBc |j|} |j|\}}|j ||y#YyxYw#ttf$r}|j |Yd}~yd}~wwxYwr5)rrr TypeErrorrEr)r7r6rrr$ros r do_sourcez Pdb.do_sourcess  ,,s#C  005ME6 %(  #  JJsO  s <AAA-A((A-cx |r)|j}|jj|d}ndx}}t||D]{\}}t |j d} t | dkr| dz } ||vr| dz } n| dz } ||k(r| dz } n ||k(r| dz } |j| dz|jz}y) Nrrr!Bz->z>> ) rrrrr&rjustrkrr*) r7rrrvrcurrent_lineno exc_linenor$r%ss r rzPdb._print_liness% "^^N++E26J*, ,NZ%eU3LFDF !!!$A1vzSSS'T :%T  LLTDKKM1 24r c |j|}d} |jj}|r|j d|j zy |j}|r|j d|j zy|j tur,|j d|jd|jy|j t|y#YyxYw#t$rYwxYw#t$rYwxYw)Nz Method %sz Function %szClass r`) rrur|rarr}rEtyperr)r7r6rGr-s r do_whatisz Pdb.do_whatiss  LL%E >>**D  LLt||3 4  >>D  LL5 6  ??d " LL%*:*:E$,,++-.D %e1DEF  t9>Aw$,,& $q'4<<Q3HIJ _T!WIQ78$'HHT!"X$6DLLa !r c |j}t|dk(ry|d|jvr|j|d=yyr()r$rkr)r7r6r+s r do_unaliaszPdb.do_unaliasRsF yy{ t9>6 7dll " T!W% #r cd|jDcgc]}|j|s|c}Scc}wr5)rr)r7rSr%rTrUas r complete_unaliaszPdb.complete_unalias\s)<<>>>s--)rrrrrrch |jD]}|j|y#t$rYywxYwr5)rrr)r7 frame_linenos r rzPdb.print_stack_traceks5  $ &&|4!+    s "% 11c||\}}||jurd}nd}|j||j||zy)Nz> z )rrformat_stack_entry)r7r? prompt_prefixrr$rs r rzPdb.print_stack_entryrsF$ v DMM !FF V,,\=IJ Kr c |s tjj||S t|d|z}|S#t$rt|d|z}YnwxYw t j jdk\r|jd|zy|j|jd|zy|j|j|jy#t$r|jd|zYywxYw)Nhelp_r9r#zJNo help for %r; please do not run Python with -OO if you need command helpz&No help for %r; __doc__ string missingzNo help for %r) rrdo_helprr:rIflagsoptimizerE__doc__r_help_message_from_doc)r7r6topicr5s r rEz Pdb.do_help}s 77??4- - G 5gm4w! 5!$ 4 5yy!!Q& 68;<=& CcIJ LL44W__E F / JJ'#- . /s'<ACACC98C9ct |j|jjxsdjy)Nr~)r help_execrHrr6s r rLz Pdb.help_execs-  dnn,,299;r?isabsrGrrIrrsplitextislinkreadlink)r7r!rrootextrLfullnames r rzzPdb.lookupmodules 77== "x(@O GGLL!h / GGNN1 $,,q/T__"DHGG$$X. c "9%'H 77== "OxxG''..)++g.''..)ww||GX6Hww~~h'  r targetcd|_d|_|j|j|_ddl}|j j|j j|j|j|jy)NTFr) rrrr!rrP__dict__rupdaterUr r-)r7rWrPs r _runzPdb._runsi %)!$)!,,v7 !  !1!12 r rcNtj|djS)Nr)rbformat_exception_onlyrrs r rzPdb._format_excs!..s3B7==??r c t|ddy#t$r$}t|j|cYd}~Sd}~wwxYw)Nrr{r~)r SyntaxErrorr3r)r7rrs r rxzPdb._compile_error_messagesCK 0 D)V , 0))#./ / 0s  >9>>cRtj|\}}td|}||fSr)rgetsourcelinesr)r7rrr$s r rzPdb._getsourceliness-  ..s3 vQf}r c|jjDcgc]}|j}}|syd|vr|jd}nd}g}dt |j z}t |D].\}}|dk(rd}n ||krd}nd}|j||z|z0dj|Scc}w) NzNo help message found.r~rr!rzUsage: z r) r* splitlinesrindexrkrrrr) r7docr%r usage_end formattedindentr0rs r rIzPdb._help_message_from_docs*-**,*A*A*CD*C$*CD+ ; BII s4;;'' 'GAtAv"Y"   Vf_t3 4(yy###EsB<)tabNNNFT)rr5)r N)rrrrrrrrrrrrrrrrrrr rr0rr4rrErrYr^rOrrrcomplete_commandsrrdo_bcomplete_break complete_brcomplete_tbreakrrrcomplete_enablercomplete_disablercomplete_conditionrcomplete_ignorerdo_clcomplete_clear complete_clrdo_wdo_btrrdo_urdo_drdo_untrdo_srdo_nr do_restartrdo_rrdo_cdo_contrdo_jrcomplete_debugrdo_qdo_exitrrdo_ardo_rvrrrrrrr complete_print complete_p complete_pprdo_lrdo_llrcomplete_sourcerr)complete_whatisr-complete_displayr/r1r5r8r:r=r;r line_prefixrrEdo_hrLrNrzrr]r:r[rrrxrrIr r r rrs#HL(,,"^4**0&/( 6 D,$*$B:1 8%, E&?@6Q&f+^(@}@$r r)"rwheredownupbreaktbreakrrrr conditionrstepr/untiljumpreturnrr continuer)longlistr+rppwhatissourcedisplay undisplayr4r"unaliasdebugquitr9z c< tj|||yr5)rr  statementrrs r r r s EIIi&)r c: tj|||Sr5)rr) expressionrrs r rr)s 5==Wf 55r ct|||yr5)r rs r rr2s 7F#r c8 tj|i|Sr5)rr)r+kwdss r rr6s! 35==$ '$ ''r )headerc t}||j||jtjj yr5)rrrrI _getframef_back)rpdbs r rr@s> %C  FCMM#--/(()r c |"tj}| |j}| tdt }|j |j d|y)NzAA valid traceback must be passed if no exception is being handled)rIr __traceback__rrrr)rrrs r rrOs` ymmo ?!!Ay67 7 AGGIMM$r c ttdrtjj}ntj}t |y)Nlast_exc)rrIrrlast_tracebackr)rs r r r ds0SsJ \\ ' '   Or zimport x; x.main()c"ttyr5)r TESTCMDr r r testrqs Lr c6ddl}|jtyr()pydocpagerrH)rs r rrus KKr ausage: pdb.py [-c command] ... [-m module | pyfile] [arg] ... Debug the Python program given by pyfile. Alternatively, an executable module or package to debug can be specified using the -m switch. 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 ddl}|jtjdddddg\}}|s$tttj dt d|Dr#tttj |Dcgc] \}}|dvs |}}}t d |D}|rtnt}||d}|j|tjddt} | jj| | j|| jrytd ,cc}}w#t$r>td |d td dj!tjddzYMt"$r"} tddt| Yd} ~ rd} ~ wt$$r,t'j(tj dYt*$re} t'j(tdtd| j,} | j.d| td|zdzYd} ~ d} ~ wwxYw)Nrrzmhc:rzcommand=r#c3*K|] \}}|dv yw))z-hz--helpNr .0optoptargs r zmain..s ;d{sF3" "d)z-cz --commandc3*K|] \}}|dv yw))z-mNr rs r rzmain..sAD[S&3&=Drz*The program finished and will be restarted Restartingzwith arguments:r"r!z/The program exited via sys.exit(). Exit status:)rz2Uncaught exception. Entering post mortem debuggingz1Running 'cont' or 'step' will restart the programz#Post mortem debugger finished. The z will be restarted)getoptrIrrH_usagerJanyr]r:rMrrrr[rrr SystemExitr_rbrcrrr) roptsr+rrrmodule_indicatedrBrWrrdrs r mainrssxx|Vfj5IJJD$  f    ;d ;; f   *.M$;3#9L2L$HMADAA+-C a\F LLNCHHQK %CKKx  ( CHHV '' > ? !N, 1 ,(9 : $#((12,// 0  C M !HH     ! HHQK (    ! F G E FA COOD! $ 7&@&' ( (  (sD EEE6 EAIIF335I*I2AIIrP)NNr5)4r>rWrrIrrr*r-rPrr rrrryrbrtypingrrar__all__r&r1r&r3r:r]rrrrrH _help_order_commandrrrLr rrrrrr rrrrrrrr r r rsi?F  i  "  C %EC%EP' C' ^ l$#''377l$`1 K 73 0199??AFJJ  s}}$$$GX *6$( **   4(p z CHHJr