| 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()
|
|
|