diff options
Diffstat (limited to 'chromium/tools/cr/cr/commands/debug.py')
-rw-r--r-- | chromium/tools/cr/cr/commands/debug.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/chromium/tools/cr/cr/commands/debug.py b/chromium/tools/cr/cr/commands/debug.py deleted file mode 100644 index 48fb513b3cc..00000000000 --- a/chromium/tools/cr/cr/commands/debug.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""A module for the run command.""" - -import cr - - -class DebugCommand(cr.Command): - """The implementation of the debug command. - - This is much like the run command except it launches the program under - a debugger instead. - """ - - def __init__(self): - super(DebugCommand, self).__init__() - self.help = 'Debug a binary' - - def AddArguments(self, subparsers): - parser = super(DebugCommand, self).AddArguments(subparsers) - cr.Builder.AddArguments(self, parser) - cr.Installer.AddArguments(self, parser) - cr.Debugger.AddArguments(self, parser) - cr.Target.AddArguments(self, parser) - self.ConsumeArgs(parser, 'the binary') - return parser - - def Run(self, context): - targets = cr.Target.GetTargets(context) - if not cr.Debugger.ShouldInvoke(context): - cr.Debugger.Attach(context, targets, context.remains) - elif cr.Installer.Skipping(context): - cr.Debugger.Restart(context, targets, context.remains) - else: - cr.Builder.Build(context, targets, []) - cr.Debugger.Kill(context, targets, []) - cr.Installer.Reinstall(context, targets, []) - cr.Debugger.Invoke(context, targets, context.remains) |