This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Plugins: enhancements


Hi,

So I am revisiting the plugin architecture, which, thanks to Fernando, is
largely complete. [Thanks Fernando!]

I have some questions about some of the last problems that exist with this
code...

1) Building plugins (C/C++ code)

Right now, one cannot generically build a plugin from C code. That part of
the configury was not completed.

I believe that I have now practically isolated all the host dependencies
for all the configury to accomplish building code on both unix (Linux only
tested) and Windows (tested on cygwin, of course). Using the following
Makefile.in for rhabout, I can now successfully build and install the
loadable module "rhabout":

   PLUGIN = rhabout
   PLUGIN_OBJS = rhabout.$(OBJEXT)
   PLUGIN_IMAGE_BASE = 0x65000000
   PLUGIN_TARGETS = rhabout.itcl

   include ../Make-rules

Yep, that's all that's necessary to build "rhabout.so" and "rhabout.dll"
and install them and the corresponding tcl files in the right place. I've
changed a lot of configury to get this working, and although it's not
perfect, it is one huge step forward. (The image base thing is for Windows
dlls. I'm not convinced it's necessary, but other much more informed
people tell me it is good practice to specify this for windows, so I'm
leaving it in.)

If we ever decide to drop support for Tcl/Tk 8.0 baggage we carry, we can
then revisit this with TEA in mind.

Questions:

1) We are currently have plugins directory located in
gdb/gdbtk/library/plugins. I don't think this is the right place to put
it, since the plugins can be host-dependent, containing shared
libraries/DLLs. Instead, I'd like to move the plugins directory from
gdb/gdbtk/library/plugins to gdb/gdbtk/plugins.

2) The plugins are currently installed in
INSTALLDIR/share/insight1.0/plugins. This directory is NOT
platform-dependent, so if we install both Cygwin and linux toolchains into
the same directory (which I do quite often), the two are going to clobber
each other a little. I propose that these be moved to
$(libdir)/insight1.0/PLUGIN-NAME. The generic plugins.tcl file will be
installed at $(libdir)/insight1.0/plugins.tcl.

Comments?

All the configury for this is in gdb/configure.in. It is at least isolated
in our own little spot. I don't like this, but until we can put all of the
insight stuff under a directory in the gdb build directory, we're stuck.
(The limiting step here is being able to build separate gdb and insight
executables, which actually can be hackishly done, but gdb would never
approve of the "cp top.c gdbtk-top.c" method.)

Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]