mirror of https://github.com/yandex/odyssey.git
Update machinarium-gdb.py: add ignore-errors (#643)
This commit is contained in:
parent
1a02229806
commit
e8f89da9e7
|
@ -489,8 +489,25 @@ Example:
|
|||
self._execute_in_coroutine_context(thread, coro, gdbcmd)
|
||||
|
||||
|
||||
class IgnoreErrorsCmd (gdb.Command):
|
||||
"""Execute a single command, ignoring all errors.
|
||||
Only one-line commands are supported.
|
||||
This is primarily useful in scripts."""
|
||||
|
||||
def __init__ (self):
|
||||
super (IgnoreErrorsCommand, self).__init__ ("ignore-errors",
|
||||
gdb.COMMAND_OBSCURE,
|
||||
# FIXME...
|
||||
gdb.COMPLETE_COMMAND)
|
||||
|
||||
def invoke (self, arg, from_tty):
|
||||
try:
|
||||
gdb.execute (arg, from_tty)
|
||||
except:
|
||||
pass
|
||||
|
||||
MMCoroutines()
|
||||
MMCoroutineCmd()
|
||||
|
||||
IgnoreErrorsCmd ()
|
||||
|
||||
gdb.write('done.\n', stream=gdb.STDLOG)
|
||||
|
|
Loading…
Reference in New Issue