/snap/core22/2437/usr/lib/python3.10/__pycache__
NameSizeModeActions
abc.cpython-310.pyc67510644editdlrm
aifc.cpython-310.pyc246850644editdlrm
antigravity.cpython-310.pyc8220644editdlrm
argparse.cpython-310.pyc635390644editdlrm
ast.cpython-310.pyc557390644editdlrm
asynchat.cpython-310.pyc70250644editdlrm
asyncore.cpython-310.pyc160020644editdlrm
base64.cpython-310.pyc171620644editdlrm
bdb.cpython-310.pyc258320644editdlrm
binhex.cpython-310.pyc128700644editdlrm
bisect.cpython-310.pyc25880644editdlrm
bz2.cpython-310.pyc108700644editdlrm
calendar.cpython-310.pyc263030644editdlrm
cgi.cpython-310.pyc267230644editdlrm
cgitb.cpython-310.pyc99980644editdlrm
chunk.cpython-310.pyc48600644editdlrm
cmd.cpython-310.pyc127070644editdlrm
code.cpython-310.pyc99570644editdlrm
codecs.cpython-310.pyc332190644editdlrm
codeop.cpython-310.pyc55950644editdlrm
colorsys.cpython-310.pyc32650644editdlrm
compileall.cpython-310.pyc127330644editdlrm
configparser.cpython-310.pyc454580644editdlrm
contextlib.cpython-310.pyc208950644editdlrm
contextvars.cpython-310.pyc2460644editdlrm
copy.cpython-310.pyc69960644editdlrm
copyreg.cpython-310.pyc46830644editdlrm
cProfile.cpython-310.pyc51130644editdlrm
crypt.cpython-310.pyc35500644editdlrm
csv.cpython-310.pyc117980644editdlrm
dataclasses.cpython-310.pyc265780644editdlrm
datetime.cpython-310.pyc565330644editdlrm
decimal.cpython-310.pyc3620644editdlrm
difflib.cpython-310.pyc589050644editdlrm
dis.cpython-310.pyc156560644editdlrm
doctest.cpython-310.pyc761750644editdlrm
enum.cpython-310.pyc260630644editdlrm
filecmp.cpython-310.pyc87490644editdlrm
fileinput.cpython-310.pyc140720644editdlrm
fnmatch.cpython-310.pyc42440644editdlrm
fractions.cpython-310.pyc186000644editdlrm
ftplib.cpython-310.pyc289770644editdlrm
functools.cpython-310.pyc283350644editdlrm
genericpath.cpython-310.pyc39070644editdlrm
getopt.cpython-310.pyc63390644editdlrm
getpass.cpython-310.pyc42100644editdlrm
gettext.cpython-310.pyc182210644editdlrm
glob.cpython-310.pyc58520644editdlrm
graphlib.cpython-310.pyc76160644editdlrm
gzip.cpython-310.pyc185460644editdlrm
hashlib.cpython-310.pyc68450644editdlrm
heapq.cpython-310.pyc138650644editdlrm
hmac.cpython-310.pyc69730644editdlrm
imaplib.cpython-310.pyc423120644editdlrm
imghdr.cpython-310.pyc39050644editdlrm
imp.cpython-310.pyc97860644editdlrm
inspect.cpython-310.pyc851530644editdlrm
io.cpython-310.pyc36630644editdlrm
ipaddress.cpython-310.pyc626700644editdlrm
keyword.cpython-310.pyc9270644editdlrm
linecache.cpython-310.pyc41420644editdlrm
locale.cpython-310.pyc461540644editdlrm
lzma.cpython-310.pyc121000644editdlrm
mailbox.cpython-310.pyc600910644editdlrm
mailcap.cpython-310.pyc73200644editdlrm
mimetypes.cpython-310.pyc176190644editdlrm
modulefinder.cpython-310.pyc161660644editdlrm
netrc.cpython-310.pyc39330644editdlrm
nntplib.cpython-310.pyc316230644editdlrm
ntpath.cpython-310.pyc147040644editdlrm
nturl2path.cpython-310.pyc17470644editdlrm
numbers.cpython-310.pyc118660644editdlrm
opcode.cpython-310.pyc54470644editdlrm
operator.cpython-310.pyc135080644editdlrm
optparse.cpython-310.pyc477540644editdlrm
os.cpython-310.pyc315990644editdlrm
pathlib.cpython-310.pyc420520644editdlrm
pdb.cpython-310.pyc474400644editdlrm
pickle.cpython-310.pyc468820644editdlrm
pickletools.cpython-310.pyc677600644editdlrm
pipes.cpython-310.pyc77690644editdlrm
pkgutil.cpython-310.pyc183610644editdlrm
platform.cpython-310.pyc274290644editdlrm
plistlib.cpython-310.pyc237650644editdlrm
poplib.cpython-310.pyc135730644editdlrm
posixpath.cpython-310.pyc105600644editdlrm
pprint.cpython-310.pyc178750644editdlrm
profile.cpython-310.pyc143910644editdlrm
pstats.cpython-310.pyc236210644editdlrm
pty.cpython-310.pyc41430644editdlrm
pyclbr.cpython-310.pyc97750644editdlrm
pydoc.cpython-310.pyc856450644editdlrm
py_compile.cpython-310.pyc73390644editdlrm
queue.cpython-310.pyc107920644editdlrm
quopri.cpython-310.pyc57940644editdlrm
random.cpython-310.pyc227480644editdlrm
re.cpython-310.pyc142270644editdlrm
reprlib.cpython-310.pyc52500644editdlrm
rlcompleter.cpython-310.pyc59540644editdlrm
runpy.cpython-310.pyc94110644editdlrm
sched.cpython-310.pyc61150644editdlrm
secrets.cpython-310.pyc21750644editdlrm
selectors.cpython-310.pyc171050644editdlrm
shelve.cpython-310.pyc94920644editdlrm
shlex.cpython-310.pyc77820644editdlrm
shutil.cpython-310.pyc385360644editdlrm
signal.cpython-310.pyc29350644editdlrm
site.cpython-310.pyc179220644editdlrm
sitecustomize.cpython-310.pyc2250644editdlrm
smtpd.cpython-310.pyc261470644editdlrm
smtplib.cpython-310.pyc357660644editdlrm
sndhdr.cpython-310.pyc69620644editdlrm
socket.cpython-310.pyc289630644editdlrm
socketserver.cpython-310.pyc253470644editdlrm
sre_compile.cpython-310.pyc151940644editdlrm
sre_constants.cpython-310.pyc63570644editdlrm
sre_parse.cpython-310.pyc217550644editdlrm
ssl.cpython-310.pyc452710644editdlrm
stat.cpython-310.pyc42730644editdlrm
statistics.cpython-310.pyc370510644editdlrm
string.cpython-310.pyc71020644editdlrm
stringprep.cpython-310.pyc170750644editdlrm
struct.cpython-310.pyc3070644editdlrm
subprocess.cpython-310.pyc447410644editdlrm
sunau.cpython-310.pyc164820644editdlrm
symtable.cpython-310.pyc128350644editdlrm
sysconfig.cpython-310.pyc181510644editdlrm
tabnanny.cpython-310.pyc69500644editdlrm
tarfile.cpython-310.pyc706740644editdlrm
telnetlib.cpython-310.pyc185060644editdlrm
tempfile.cpython-310.pyc273390644editdlrm
textwrap.cpython-310.pyc138120644editdlrm
this.cpython-310.pyc12640644editdlrm
threading.cpython-310.pyc449690644editdlrm
timeit.cpython-310.pyc117690644editdlrm
token.cpython-310.pyc27380644editdlrm
tokenize.cpython-310.pyc171940644editdlrm
trace.cpython-310.pyc198700644editdlrm
traceback.cpython-310.pyc217120644editdlrm
tracemalloc.cpython-310.pyc175250644editdlrm
tty.cpython-310.pyc10790644editdlrm
turtle.cpython-310.pyc1288570644editdlrm
types.cpython-310.pyc95250644editdlrm
typing.cpython-310.pyc852770644editdlrm
uu.cpython-310.pyc38670644editdlrm
uuid.cpython-310.pyc224980644editdlrm
warnings.cpython-310.pyc136460644editdlrm
wave.cpython-310.pyc175940644editdlrm
weakref.cpython-310.pyc203430644editdlrm
webbrowser.cpython-310.pyc170000644editdlrm
xdrlib.cpython-310.pyc78800644editdlrm
zipapp.cpython-310.pyc60130644editdlrm
zipfile.cpython-310.pyc618450644editdlrm
zipimport.cpython-310.pyc170330644editdlrm
_aix_support.cpython-310.pyc28790644editdlrm
_bootsubprocess.cpython-310.pyc22940644editdlrm
_collections_abc.cpython-310.pyc329250644editdlrm
_compat_pickle.cpython-310.pyc58720644editdlrm
_compression.cpython-310.pyc45120644editdlrm
_distutils_system_mod.cpython-310.pyc54220644editdlrm
_markupbase.cpython-310.pyc75720644editdlrm
_osx_support.cpython-310.pyc115350644editdlrm
_pydecimal.cpython-310.pyc1577360644editdlrm
_pyio.cpython-310.pyc736540644editdlrm
_py_abc.cpython-310.pyc46830644editdlrm
_sitebuiltins.cpython-310.pyc35470644editdlrm
_strptime.cpython-310.pyc159450644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc353850644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-310.pyc353790644editdlrm
_threading_local.cpython-310.pyc65390644editdlrm
_weakrefset.cpython-310.pyc76080644editdlrm
__future__.cpython-310.pyc41310644editdlrm
__phello__.foo.cpython-310.pyc1300644editdlrm
Edit: /snap/core22/2437/usr/lib/python3.10/__pycache__/bdb.cpython-310.pyc (25832B)
o p̦i~@sdZddlZddlZddlZddlmZmZmZgdZeeBeBZ Gddde Z GdddZ d d Z Gd d d Zd dZddZGddde ZddZddZddZdS)zDebugger basicsN) CO_GENERATOR CO_COROUTINECO_ASYNC_GENERATOR)BdbQuitBdb Breakpointc@seZdZdZdS)rz Exception to give up completely.N)__name__ __module__ __qualname____doc__r r /usr/lib/python3.10/bdb.pyr src@seZdZdZd^ddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd_d&d'Zd^d(d)Zd*d+Zd,d-Zd.d/Zd^d0d1Zd2d3Zd4d5Zd6d7Z  d`d9d:Zd;d<Zd=d>Z d?d@Z!dAdBZ"dCdDZ#dEdFZ$dGdHZ%dIdJZ&dKdLZ'dMdNZ(dOdPZ)dQdRZ*dadTdUZ+dbdVdWZ,dbdXdYZ-dZd[Z.d\d]Z/dS)craGeneric Python debugger base class. This class takes care of details of the trace facility; a derived class should implement user interaction. The standard debugger class (pdb.Pdb) is an example. The optional skip argument must be an iterable of glob-style module name patterns. The debugger will not step into frames that originate in a module that matches one of these patterns. Whether a frame is considered to originate in a certain module is determined by the __name__ in the frame globals. NcCs0|rt|nd|_i|_i|_d|_|dSN)setskipbreaksfncacheframe_returning _load_breaks)selfrr r r __init__s  z Bdb.__init__cCsR|d|dddkr|S|j|}|s'tj|}tj|}||j|<|S)a%Return canonical form of filename. For real filenames, the canonical form is a case-normalized (on case insensitive filesystems) absolute path. 'Filenames' with angle brackets, such as "", generated in interactive mode, are returned unchanged. <>)rgetospathabspathnormcase)rfilenamecanonicr r r r!'s    z Bdb.canoniccCs&ddl}|d|_|dddS)z5Set values of attributes as ready to start debugging.rN) linecache checkcachebotframe _set_stopinfo)rr"r r r reset8sz Bdb.resetcCs|jrdS|dkr||S|dkr|||S|dkr"|||S|dkr,|||S|dkr3|jS|dkr:|jS|dkrA|jStd t||jS) aODispatch a trace function for debugged frames based on the event. This function is installed as the trace function for debugged frames. Its return value is the new trace function, which is usually itself. The default implementation decides how to dispatch a frame, depending on the type of event (passed in as a string) that is about to be executed. The event can be one of the following: line: A new line of code is going to be executed. call: A function is about to be called or another code block is entered. return: A function or other code block is about to return. exception: An exception has occurred. c_call: A C function is about to be called. c_return: A C function has returned. c_exception: A C function has raised an exception. For the Python events, specialized functions (see the dispatch_*() methods) are called. For the C events, no action is taken. The arg parameter depends on the previous event. Nlinecallreturn exceptionc_call c_exceptionc_returnz*bdb.Bdb.dispatch: unknown debugging event:)quitting dispatch_line dispatch_calldispatch_returndispatch_exceptiontrace_dispatchprintrepr)rframeeventargr r r r3?s$    zBdb.trace_dispatchcCs.||s ||r|||jrt|jS)a Invoke user function and return trace function for line event. If the debugger stops on the current line, invoke self.user_line(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. ) stop_here break_here user_liner.rr3rr6r r r r/js  zBdb.dispatch_linecCsd|jdur |j|_|jS||s||sdS|jr$|jjt@r$|jS| |||j r/t |jS)a Invoke user function and return trace function for call event. If the debugger stops on this function call, invoke self.user_call(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. N) r$f_backr3r9break_anywhere stopframef_codeco_flagsGENERATOR_AND_COROUTINE_FLAGS user_callr.rrr6r8r r r r0vs   zBdb.dispatch_callcCs||s ||jkr>|jr|jjt@r|jSz||_|||Wd|_nd|_w|j r.t |j|ur>|j dkr>| dd|jS)aInvoke user function and return trace function for return event. If the debugger stops on this function return, invoke self.user_return(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. Nr) r9 returnframer?r@rArBr3r user_returnr.r stoplinenor%rDr r r r1s  zBdb.dispatch_returncCs||r%|jjt@r|dtur|ddus"||||jr"t|j S|jrG||jurG|jjjt@rG|dtt fvrG||||jrGt|j S)aInvoke user function and return trace function for exception event. If the debugger stops on this exception, invoke self.user_exception(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope. rN) r9r@rArB StopIterationuser_exceptionr.rr? GeneratorExitr3rDr r r r2s        zBdb.dispatch_exceptioncCs.|durdS|jD] }t||rdSq dS)z4Return True if module_name matches any skip pattern.NFT)rfnmatch)r module_namepatternr r r is_skipped_modules  zBdb.is_skipped_modulecCsN|jr||jdrdS||jur |jdkrdS|j|jkS|js%dSdS)z>Return True if frame is below the starting frame in the stack.rFrT)rrO f_globalsrr?rGf_linenor<r r r r9s   z Bdb.stop_herecCs||jj}||jvrdS|j}||j|vr%|jj}||j|vr%dSt|||\}}|rB|j|_|r@|j r@| t |jdSdS)zReturn True if there is an effective breakpoint for this line. Check for line or function breakpoint and if in effect. Delete temporary breakpoints if effective() says to. FT) r!r@ co_filenamerrQco_firstlineno effectivenumber currentbp temporarydo_clearstr)rr6r linenobpflagr r r r:s  zBdb.break_herecCstd)zlRemove temporary breakpoint. Must implement in derived classes or get NotImplementedError. z)subclass of bdb must implement do_clear())NotImplementedError)rr8r r r rXsz Bdb.do_clearcCs||jj|jvS)zEReturn True if there is any breakpoint for frame's filename. )r!r@rRrr<r r r r>szBdb.break_anywherecCdS)z&Called if we might stop in a function.Nr )rr6 argument_listr r r rCz Bdb.user_callcCr^)z'Called when we stop or break at a line.Nr r<r r r r;r`z Bdb.user_linecCr^)z&Called when a return trap is set here.Nr )rr6 return_valuer r r rF r`zBdb.user_returncCr^)z$Called when we stop on an exception.Nr )rr6exc_infor r r rJr`zBdb.user_exceptionrcCs||_||_d|_||_dS)zSet the attributes for stopping. If stoplineno is greater than or equal to 0, then stop at line greater than or equal to the stopline. If stoplineno is -1, then don't stop at all. FN)r?rEr.rG)rr?rErGr r r r%s zBdb._set_stopinfocCs$|dur |jd}||||dS)zxStop when the line with the lineno greater than the current one is reached or when returning from current frame.Nr)rQr%)rr6rZr r r set_until$s z Bdb.set_untilcCs0|jr|jj}|r|js|j|_|dddS)zStop after one line of code.N)rr=f_tracer3r%)r caller_framer r r set_step,s  z Bdb.set_stepcCs||ddS)z2Stop on the next line in or below the given frame.N)r%r<r r r set_next8sz Bdb.set_nextcCs0|jjt@r||dddS||j|dS)z)Stop when returning from the given frame.Nr)r@rArBr%r=r<r r r set_return<s zBdb.set_returncCsN|dur tj}||r|j|_||_|j}|s|t|jdS)znStart debugging from frame. If frame is not specified, debugging starts from caller's frame. N) sys _getframer=r&r3rdr$rfsettracer<r r r set_traceCs z Bdb.set_tracecCsd||jdd|js*tdtj}|r,||jur0|`|j}|r.||jusdSdSdSdSdS)zStop only at breakpoints or when finished. If there are no breakpoints, set the system trace function to None. Nr)r%r$rrirkrjr=rdr<r r r set_continueRs   zBdb.set_continuecCs"|j|_d|_d|_tddS)zuSet quitting attribute to True. Raises BdbQuit exception in the next call to a dispatch_*() method. NT)r$r?rEr.rirkrr r r set_quitasz Bdb.set_quitcCs(|j|g}||vr||dSdS)z/Add breakpoint to breaks, if not already there.N)r setdefaultappend)rr rZ bp_linenosr r r _add_to_breaksrszBdb._add_to_breaksFc CsN||}ddl}|||}|sd||fS|||t|||||}dS)zSet a new breakpoint for filename:lineno. If lineno doesn't exist for the filename, return an error message. The filename should be in canonical form. rNzLine %s:%d does not exist)r!r"getlinersr) rr rZrWcondfuncnamer"r'r[r r r set_breakxs    z Bdb.set_breakcCs$tjD] \}}|||qdS)aOApply all breakpoints (set in other instances) to this one. Populates this instance's breaks list from the Breakpoint class's list, which can have breakpoints set by another Bdb instance. This is necessary for interactive sessions to keep the breakpoints active across multiple calls to run(). N)rbplistkeysrsrr rZr r r rszBdb._load_breakscCs8||ftjvr|j|||j|s|j|=dSdS)aPrune breakpoints for filename:lineno. A list of breakpoints is maintained in the Bdb instance and in the Breakpoint class. If a breakpoint in the Bdb instance no longer exists in the Breakpoint class, then it's removed from the Bdb instance. N)rrxrremoverzr r r _prune_breakss   zBdb._prune_breakscCsj||}||jvrd|S||j|vrd||fStj||fddD]}|q&|||dS)znDelete breakpoints for filename:lineno. If no breakpoints were set, return an error message. There are no breakpoints in %szThere is no breakpoint at %s:%dN)r!rrrxdeleteMer|)rr rZr[r r r clear_breaks     zBdb.clear_breakc CsXz||}Wnty}z t|WYd}~Sd}~ww|||j|jdS)zxDelete a breakpoint by its index in Breakpoint.bpbynumber. If arg is invalid, return an error message. N)get_bpbynumber ValueErrorrYr~r|filer')rr8r[errr r r clear_bpbynumberszBdb.clear_bpbynumbercCsX||}||jvrd|S|j|D]}tj||f}|D]}|qq|j|=dS)z`Delete all breakpoints in filename. If none were set, return an error message. r}N)r!rrrxr~)rr r'blistr[r r r clear_all_file_breakss   zBdb.clear_all_file_breakscCs,|jsdStjD]}|r|qi|_dS)z]Delete all existing breakpoints. If none were set, return an error message. zThere are no breakpointsN)rr bpbynumberr~)rr[r r r clear_all_breakss zBdb.clear_all_breakscCsz|stdzt|}Wntytd|dwztj|}Wnty0td|dw|dur;td||S)zReturn a breakpoint by its index in Breakpoint.bybpnumber. For invalid arg values or if the breakpoint doesn't exist, raise a ValueError. zBreakpoint number expectedz Non-numeric breakpoint number %sNz!Breakpoint number %d out of rangezBreakpoint %d already deleted)rintrr IndexError)rr8rUr[r r r rs    zBdb.get_bpbynumbercCs"||}||jvo||j|vS)z9Return True if there is a breakpoint for filename:lineno.r!rrzr r r get_breaks   z Bdb.get_breakcCs4||}||jvr||j|vrtj||fpgS)znReturn all breakpoints for filename:lineno. If no breakpoints are set, return an empty list. )r!rrrxrzr r r get_breakss    zBdb.get_breakscCs"||}||jvr|j|SgS)zrReturn all lines with breakpoints for filename. If no breakpoints are set, return an empty list. r)rr r r r get_file_breakss   zBdb.get_file_breakscCs|jS)z$Return all breakpoints that are set.)rrnr r r get_all_breaks szBdb.get_all_breakscCsg}|r |j|ur |j}|dur%|||jf||jurn|j}|dus|tdt|d}|durF||j|j f|j}|dus6|durStdt|d}||fS)zReturn a list of (frame, lineno) in a stack trace and a size. List starts with original calling frame, if there is one. Size may be number of frames above or below f. Nrr) tb_frametb_nextrqrQr$r=reversemaxlen tb_lineno)rftstackir r r get_stacks$ z Bdb.get_stack: c Csddl}ddl}|\}}||jj}d||f}|jjr$||jj7}n|d7}|d7}d|jvrA|jd} |d7}||| 7}|durW||||j } | rW||| 7}|S)a:Return a string with information about a stack entry. The stack entry frame_lineno is a (frame, lineno) tuple. The return string contains the canonical filename, the function name or '', the input arguments, the return value, and the line of code (if it exists). rNz%s(%r)zz() __return__z->) r"reprlibr!r@rRco_namef_localsr5rtrPstrip) r frame_linenolprefixr"rr6rZr srvr'r r r format_stack_entry's"    zBdb.format_stack_entryc Cs|dur ddl}|j}|dur|}|t|tr t|dd}t|jz(zt |||Wn t y8Yn wWd|_ tddSWd|_ tddSd|_ tdw)zDebug a statement executed via the exec() function. globals defaults to __main__.dict; locals defaults to globals. NrzexecT) __main____dict__r& isinstancerYcompilerirkr3rrr.)rcmdglobalslocalsrr r r runGs,     zBdb.runc Cs|dur ddl}|j}|dur|}|t|jz%zt|||WWd|_tdSty5YnwWd|_tddSd|_tdw)zDebug an expression executed via the eval() function. globals defaults to __main__.dict; locals defaults to globals. NrT) rrr&rirkr3evalr.r)rexprrrrr r r runeval]s&    z Bdb.runevalcCs||||dS)z.For backwards-compatibility. Defers to run().N)r)rrrrr r r runctxqsz Bdb.runctxc Os~|t|jd}z)z ||i|}Wn tyYn wWd|_td|SWd|_td|Sd|_tdw)zWDebug a single function call. Return the result of the function call. NT)r&rirkr3rr.)rfuncargskwdsresr r r runcallxs$     z Bdb.runcallr)rFNN)rNN)0rr r r rr!r&r3r/r0r1r2rOr9r:rXr>rCr;rFrJr%rcrfrgrhrlrmrorsrwrr|rrrrrrrrrrrrrrrr r r r rs` +                rcCstdS)zs* }z 5