insight & tcl linked vars

Keith Seitz keiths@redhat.com
Fri Apr 25 20:00:00 GMT 2003


On Fri, 2003-04-25 at 09:55, Duane Ellis wrote:

[big snip]

> Any suggestions?
> 
> Or explaination on what to look for - or how this might be done
> better?

Ok, maybe you don't want to hear this, but I don't particularly like
using linked variables. They're a real pain. I prefer to do stuff like
this via procedural wrappers around your globals. For example, register
a new C function(s) with the interpreter which will read/write your
global(s). Use this/these function(s) to do the actual setting/getting
of your variable. IMO, this is also much safer to use, too, in case you
ever dump those evil global variables for functions. :-)

>   how do I update 'tclIndex' I don't see any means to do this I had to
>   add all the functions from my tcl script by hand into tclIndex to
>   make things work.

Well, I don't know about in 5.2.x anymore, but I seem to recall that the
procedure is similar: we require installed versions of the tcl stuff to
regenerate the files. You must use "--enable-shared".

For example in CVS head, you can configure and build insight with
"--enable-shared", install it all, then go to gdb/gdbtk/library and type
"make" to regenerate the file. (Make sure the install dir is in your
path.) If it complains about not finding Itcl, you're using the wrong
tcl version, i.e., not the one you installed. In CVS head, I had to
change the Makefile to read "tclsh8.4". I guess we'll need to autoconf
that to work on cygwin. But I almost never work specifically on cygwin.
I usually just test on it.

Keith




More information about the Insight mailing list