[gnome-builder/wip/chergert/debugger: 65/134] gdb: check for gdb binary



commit 229080d6d9b78d658fe44ecfd7129c6a043cfa87
Author: Christian Hergert <chergert redhat com>
Date:   Wed Mar 22 15:40:55 2017 -0700

    gdb: check for gdb binary

 plugins/gdb/gdb_plugin.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gdb/gdb_plugin.py b/plugins/gdb/gdb_plugin.py
index bd7338c..0949e94 100644
--- a/plugins/gdb/gdb_plugin.py
+++ b/plugins/gdb/gdb_plugin.py
@@ -36,4 +36,7 @@ class GdbDebugger(Ide.Object, Ide.Debugger):
         For now, we just always return True, but with a priority that
         allows other debuggers to take priority.
         """
-        return (True, GLib.MAXINT)
+        if runner.get_runtime().contains_program('gdb'):
+            return (True, GLib.MAXINT)
+        else:
+            return (False, 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]