This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: question about Insight
- From: Keith Seitz <keiths at redhat dot com>
- To: é ä ä <guojiaoyang at hotmail dot com>
- Cc: "insight at sources dot redhat dot com" <insight at sources dot redhat dot com>
- Date: Mon, 23 May 2005 09:34:18 -0700
- Subject: Re: question about Insight
- References: <BAY1-F151E7269909EBEAEE452D5AE0A0@phx.gbl>
On Sat, 2005-05-21 at 03:58 +0000, é ää wrote:
> When programming with Tcl/tk and C, we generally code core function
> with C and code GUI with tcl/tk. Iâd like to know how to implement the
> interface between GUI and gdb in Insight. When gdb is running, it is in
> wait loop. Iâd like to know how to pass the commands that received from
> GUI to gdb. I have not found any documents about Insightâs source code. So
> I cannot understand the structure of Insight source code.
Insight cannot be any different than your own applications. For the most
part, core functionality resides in C and the GUI in Tcl (and its
interpreter).
Gdb's event loop is not used (although it could). When the GUI needs to
execute something in gdb, it does exactly like any other Tcl/C[++] app
does: it calls new tcl commands installed into the interpreter. See
src/gdb/gdbtk/generic/gdbtk-cmds.c and others.
I am very surprised to hear that an experienced C/Tcl programmer
couldn't figure this out. Believe me when I say there are much trickier
things to figure out in Insight than this... This is also discussed in
the README file.
Good luck,
Keith