diff options
| author | Aleksandr <[email protected]> | 2022-02-10 16:47:52 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:52 +0300 |
| commit | b05913d1c3c02a773578bceb7285084d2933ae86 (patch) | |
| tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /contrib/tools/cython/Cython/Debugger/Cygdb.py | |
| parent | ea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff) | |
Restoring authorship annotation for Aleksandr <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/Cygdb.py')
| -rw-r--r-- | contrib/tools/cython/Cython/Debugger/Cygdb.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/Cygdb.py b/contrib/tools/cython/Cython/Debugger/Cygdb.py index b71ba44d8ee..45f31ce6f77 100644 --- a/contrib/tools/cython/Cython/Debugger/Cygdb.py +++ b/contrib/tools/cython/Cython/Debugger/Cygdb.py @@ -138,21 +138,21 @@ def main(path_to_debug_info=None, gdb_argv=None, no_import=False): tempfilename = make_command_file(path_to_debug_info, no_import=no_import) logger.info("Launching %s with command file: %s and gdb_argv: %s", options.gdb, tempfilename, gdb_argv) - with open(tempfilename) as tempfile: - logger.debug('Command file (%s) contains: """\n%s"""', tempfilename, tempfile.read()) - logger.info("Spawning %s...", options.gdb) - p = subprocess.Popen([options.gdb, '-command', tempfilename] + gdb_argv) - logger.info("Spawned %s (pid %d)", options.gdb, p.pid) - while True: - try: - logger.debug("Waiting for gdb (pid %d) to exit...", p.pid) - ret = p.wait() - logger.debug("Wait for gdb (pid %d) to exit is done. Returned: %r", p.pid, ret) - except KeyboardInterrupt: - pass - else: - break - logger.debug("Closing temp command file with fd: %s", tempfile.fileno()) + with open(tempfilename) as tempfile: + logger.debug('Command file (%s) contains: """\n%s"""', tempfilename, tempfile.read()) + logger.info("Spawning %s...", options.gdb) + p = subprocess.Popen([options.gdb, '-command', tempfilename] + gdb_argv) + logger.info("Spawned %s (pid %d)", options.gdb, p.pid) + while True: + try: + logger.debug("Waiting for gdb (pid %d) to exit...", p.pid) + ret = p.wait() + logger.debug("Wait for gdb (pid %d) to exit is done. Returned: %r", p.pid, ret) + except KeyboardInterrupt: + pass + else: + break + logger.debug("Closing temp command file with fd: %s", tempfile.fileno()) logger.debug("Removing temp command file: %s", tempfilename) os.remove(tempfilename) logger.debug("Removed temp command file: %s", tempfilename) |
