From 1a0bc6a0b5ed8f42aca890ff0ebc4adb8831b6fc Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sun, 8 Jun 2008 19:32:23 +0200 Subject: [PATCH] adding a callable facade pygdb --- MainControlWindow.py | 18 ------------------ pygdb.py | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 18 deletions(-) mode change 100755 => 100644 MainControlWindow.py create mode 100755 pygdb.py diff --git a/MainControlWindow.py b/MainControlWindow.py old mode 100755 new mode 100644 index 42f8285..0a24f4c --- a/MainControlWindow.py +++ b/MainControlWindow.py @@ -120,21 +120,3 @@ class MainControlWindow (gtk.Window): cb(pos) - - -if __name__ == "__main__": - - - import StatusWindow - - - clientCmd = string.join(sys.argv[1:]) - dbgterm = GdbTerminal.GdbTerminal(clientCmd) - mainCtrlWnd = MainControlWindow(dbgterm) - - statusWnd = StatusWindow.StatusWindow(mainCtrlWnd, dbgterm) - mainCtrlWnd.newPosCbs += [statusWnd.updateValues] - - gtk.main() - - diff --git a/pygdb.py b/pygdb.py new file mode 100755 index 0000000..e6c1dbc --- /dev/null +++ b/pygdb.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +#shuber, 2008-06-08 + +__author__ = "shuber" + +import gtk +import string +import sys + +import GdbTerminal +import MainControlWindow +import StatusWindow + + +if __name__ == "__main__": + + #Check if enough arguments are given + if len(sys.argv) <= 1: + print "Please give executeable to debug." + sys.exit(-1) + + #Create the terminals + clientCmd = string.join(sys.argv[1:]) + dbgterm = GdbTerminal.GdbTerminal(clientCmd) + + #Create windows + mainCtrlWnd = MainControlWindow.MainControlWindow(dbgterm) + statusWnd = StatusWindow.StatusWindow(mainCtrlWnd, dbgterm) + + #Register callback function for new positions + mainCtrlWnd.newPosCbs += [statusWnd.updateValues] + + gtk.main() + + + -- 2.39.5