[gnome-builder/wip/chergert/debugger: 35/86] gdb: cleanup
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/debugger: 35/86] gdb: cleanup
- Date: Sun, 9 Apr 2017 02:41:49 +0000 (UTC)
commit 12bb5bb14ee953ef68977e31f6063b5044479858
Author: Christian Hergert <chergert redhat com>
Date: Fri Mar 24 03:12:46 2017 -0700
gdb: cleanup
plugins/gdb/gdb_plugin.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/gdb/gdb_plugin.py b/plugins/gdb/gdb_plugin.py
index 484fc8a..bd87bdc 100644
--- a/plugins/gdb/gdb_plugin.py
+++ b/plugins/gdb/gdb_plugin.py
@@ -94,8 +94,9 @@ class GdbDebugger(Ide.Object, Ide.Debugger):
# We stole the pty from the runner so that we could pass it to gdb
# instead. This will ensure that gdb re-opens that pty. Since gdb is
# in the same sandbox as the application, this should Just Workâ˘.
- command = '-gdb-set inferior-tty {}'.format(os.ttyname(self.inferior_pty))
- self.client.exec_async(command, None, self.on_client_exec_cb)
+ ttyname = os.ttyname(self.inferior_pty)
+ command = '-gdb-set inferior-tty {}'.format(ttyname)
+ self.client.exec_async(command, None, self.on_client_exec_cb, command)
# Add a breakpoint at main()
#breakpoint = Mi2.Breakpoint(function='main')
@@ -110,9 +111,11 @@ class GdbDebugger(Ide.Object, Ide.Debugger):
except Exception as ex:
print(repr(ex))
- def on_client_exec_cb(self, client, result):
+ def on_client_exec_cb(self, client, result, command=None):
try:
ret = client.exec_finish(result)
+ if command:
+ print('{} completed'.format(command))
except Exception as ex:
print(repr(ex))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]