Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: tools/cr/cr/actions/gdb.py

Issue 116363002: [cr tool] Fixing import problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the place we hook late detection from Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/cr/cr/actions/ninja.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cr/cr/actions/gdb.py
diff --git a/tools/cr/cr/actions/gdb.py b/tools/cr/cr/actions/gdb.py
index d93fe27eb90135d0c795e85028a7b4cee7660fe9..64386dbce54cdd740f608f7a50cfbae37167fc6f 100644
--- a/tools/cr/cr/actions/gdb.py
+++ b/tools/cr/cr/actions/gdb.py
@@ -30,11 +30,10 @@ class GdbDebugger(cr.Debugger):
def Attach(self, context, targets, arguments):
raise NotImplementedError('Attach not currently supported for gdb.')
+ @classmethod
+ def ClassInit(cls):
+ # Attempt to find a valid gdb on the path.
+ gdb_binaries = cr.Host.SearchPath('gdb')
+ if gdb_binaries:
+ cls.DETECTED.Set(CR_GDB=gdb_binaries[0])
-def _DetectGdb():
- """Attempts to find a valid gdb on the path."""
- gdb_binaries = cr.Host.SearchPath('gdb')
- if gdb_binaries:
- GdbDebugger.DETECTED.Set(CR_GDB=gdb_binaries[0])
-
-_DetectGdb()
« no previous file with comments | « no previous file | tools/cr/cr/actions/ninja.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698