[gnome-builder/wip/chergert/debugger: 11/39] gdb: stub out gdb plugin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/debugger: 11/39] gdb: stub out gdb plugin
- Date: Fri, 24 Mar 2017 23:57:40 +0000 (UTC)
commit 585375a75ea40e9376ff3ecce9a59eac044dd44c
Author: Christian Hergert <chergert redhat com>
Date: Wed Mar 22 15:29:13 2017 -0700
gdb: stub out gdb plugin
plugins/gdb/gdb.plugin | 9 +++++++++
plugins/gdb/gdb_plugin.py | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/plugins/gdb/gdb.plugin b/plugins/gdb/gdb.plugin
new file mode 100644
index 0000000..56849dd
--- /dev/null
+++ b/plugins/gdb/gdb.plugin
@@ -0,0 +1,9 @@
+[Plugin]
+Module=gdb_plugin
+Loader=python3
+Name=Gdb
+Description=Provides integration with the GNU Debugger
+Authors=Christian Hergert <chergert redhat com>
+Copyright=Copyright © 2017 Christian Hergert
+Builtin=true
+Hidden=false
diff --git a/plugins/gdb/gdb_plugin.py b/plugins/gdb/gdb_plugin.py
new file mode 100644
index 0000000..bd7338c
--- /dev/null
+++ b/plugins/gdb/gdb_plugin.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python3
+
+#
+# gdb_plugin.py
+#
+# Copyright (C) 2017 Christian Hergert <chris dronelabs com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from gi.repository import GLib
+from gi.repository import GObject
+from gi.repository import Ide
+
+class GdbDebugger(Ide.Object, Ide.Debugger):
+ def do_get_name(self):
+ return 'GNU Debugger'
+
+ def do_supports_runner(self, runner):
+ """
+ Checks to see if we support running this program.
+
+ TODO: We should check if it is an ELF binary.
+
+ For now, we just always return True, but with a priority that
+ allows other debuggers to take priority.
+ """
+ return (True, GLib.MAXINT)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]