gdbtk ...completely broken?

Simon Sobisch simonsobisch@gnu.org
Tue Jul 26 08:07:20 GMT 2022


After checking gdb --help I've wondered about the following:

   -w                 Use the GUI interface.
   --nw               Do not use the GUI interface.

it took a while to find out that `-w` only applies if GDB is configured 
with the GUI option and much more that this relates to --enable-gdbtk.

It seems that the documentation may be improved here:
* for GDB "Mode options" [1] (to at least mention what that GUI is)
* for gdb's --help (ideally not showing -nw / -w if the alter is not 
available or an additional line that tells it is ignored)
* for gdb's configure.ac to tell that --enable-gdbtk is about its -w 
option doing something

I've then tried to re-built GDB 12.1 using `configure --enable-gdbtk`, 
result: everything is built, -w doesn't do anything. Checking 
configure.log shows that it did not pick up tcl because it did not found 
tclConfig.sh (which isn't in PATH but under /usr/lib64), so re-tried 
with an additional --with-tcl; same result, configure.log now shows that 
tkConfig.sh is not found (which isn't in PATH but under /usr/lib64), so 
additional specified --with-tk which got me through configure with a 
build that would use gdbtk.

So far - I consider this a bug in gdb's configure.ac: if --enable-gdbtk 
is explicit specified and one of
* the OS does not match (seen in configure.ac when checking) [not sure 
that this is necessary / useful as we have the follow-up checks]
* tclConfig.sh is not found
* tkConfig.sh is not found
then it would be most reasonable to abort configure, giving a clear 
error message what the issue is.


Going on with `make -j8 -k; make -k`...

make[2]: Entering directory '/tmp/gdb-12.1/build_tk/gdb'
make[2]: *** No rule to make target 'gdbtk-bp.c', needed by 'gdbtk-bp.o'.
make[2]: *** No rule to make target 'gdbtk-cmds.c', needed by 
'gdbtk-cmds.o'.
make[2]: *** No rule to make target 'gdbtk-hooks.c', needed by 
'gdbtk-hooks.o'.
make[2]: *** No rule to make target 'gdbtk-interp.c', needed by 
'gdbtk-interp.o'.
make[2]: *** No rule to make target 'gdbtk-register.c', needed by 
'gdbtk-register.o'.
make[2]: *** No rule to make target 'gdbtk-stack.c', needed by 
'gdbtk-stack.o'.
make[2]: *** No rule to make target 'gdbtk-varobj.c', needed by 
'gdbtk-varobj.o'.
make[2]: *** No rule to make target 'gdbtk-wrapper.c', needed by 
'gdbtk-wrapper.o'.
make[2]: *** No rule to make target 'gdbtk.c', needed by 'gdbtk.o'.
make[2]: *** No rule to make target '../libgui/src/libgui.a', needed by 
'gdb'.
   CXX    main.o
../../gdb/main.c:53:10: fatal error: gdbtk/generic/gdbtk.h: No such file 
or directory
  #include "gdbtk/generic/gdbtk.h"
           ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


rechecked: those files are not part of the gdb distribution and I also 
did not found them when checking GDB git either.


Where are the necessary source files?
Should gdb's configure assume they exist or test for them (and again: 
error on --enable-gdbtk)?


I also did not found anything about this on the GDB bug database - so: 
Do I something totally wrong?

Simon


[1]: https://sourceware.org/gdb/onlinedocs/gdb/Mode-Options.html


More information about the Gdb mailing list