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



commit 8edce220db5768f7bd61240fd528376ca2f58f79
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]