[gnome-builder/wip/chergert/debugger: 14/16] gdb: setup gdb in prepare



commit d5f855524203f8f05a3af5029a03d5886f67a98a
Author: Christian Hergert <chergert redhat com>
Date:   Wed Mar 22 17:10:35 2017 -0700

    gdb: setup gdb in prepare
    
    This is really just a dummy plugin for now, but we might as well spawn
    gdb before running the application.
    
    We need a GdbProtocol which can communicate with the controller process
    over stdin/stdout to do our bidding.

 plugins/gdb/gdb_plugin.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/gdb/gdb_plugin.py b/plugins/gdb/gdb_plugin.py
index cf14cf0..fc79cbb 100644
--- a/plugins/gdb/gdb_plugin.py
+++ b/plugins/gdb/gdb_plugin.py
@@ -37,3 +37,9 @@ class GdbDebugger(Ide.Object, Ide.Debugger):
         else:
             return (False, 0)
 
+    def do_prepare(self, runner):
+        gdb_arguments = ['gdb', '-ex', 'run', '--args']
+
+        for arg in reversed(gdb_arguments):
+            runner.prepend_argv(arg)
+


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