I built recent "stm8-binutils-gdb-sources-2017-05-25.tar.gz" as per https://stm8-binutils-gdb.sourceforge.io/
Everything works flawlessly in classic GDB mode, but I can't start GDB in TUI mode. As soon as I enter stm8-gdb blinky.elf --tui
I receive response stm8-gdb: TUI mode is not supported
To me it looks like the TUI mode isn't enabled during compilation. I tried to check this in compilation config files, but honestly I'm a bit lost in it, so I better didn't touch it.
How can I chceck whether TUI is enabled in config, or why it isn't supported in resulting GDB binary, please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gdb is configured depending on the different libraries available. For TUI to work you would need curses or ncurses. Check your config.log for searched libraries. The documentation does not mention all the required libraries but here is a starting point:
I checked that I have or installed expat, zlib and iconv, as per GDB requirements, as well as ncurses
# apt list --installed | grep curses
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
lib32ncurses5/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
libncurses5/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
libncurses5-dev/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
libncursesw5/xenial,now 6.0+20160213-1ubuntu1 i386 [installed]
ncurses-base/xenial,xenial,now 6.0+20160213-1ubuntu1 all [installed]
ncurses-bin/xenial,now 6.0+20160213-1ubuntu1 amd64 [installed]
ncurses-term/xenial,xenial,now 6.0+20160213-1ubuntu1 all [installed]
but when I rerun ./configure_binutils.sh, then make and make install, I can't start TUI mode either.
I checked config.log in gdb directory and found this
looks like here lies my problem, but ncurses library is apparently installed and other GDB debuggers (like arm-none-eabi) happily use it in TUI mode.
My google-fu is failing here.
Last edit: Jaromir Sukuba 2017-08-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you look in the config.log you also find the failing test snippet with compilation/linker errors causing the test to fail. It might give you some clues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The part of searching for ncurses.h, for example goes probably like this
for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
eval as_val=\$$as_ac_Header
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
My limited scripting knowledge (favorite programming language of mine is solder) tells me it's testing for existence of given header files in "ac_header", but I'm lost at the part where "ac_header" is actually defined or where it came from.
The same goes for checking of the library curses et al in "ac_lib":
for ac_lib in '' ncurses cursesX curses; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_waddstr=$ac_res
fi
Again, I'm somehow lost in configure file(s) structure. I believe the paths to search for the files are not correct, so configure script can't find it where it's searching for, despite it's being present somewhere else on my system - but I can't figure out how to change it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I built recent "stm8-binutils-gdb-sources-2017-05-25.tar.gz" as per https://stm8-binutils-gdb.sourceforge.io/
Everything works flawlessly in classic GDB mode, but I can't start GDB in TUI mode. As soon as I enter
stm8-gdb blinky.elf --tui
I receive response
stm8-gdb: TUI mode is not supported
To me it looks like the TUI mode isn't enabled during compilation. I tried to check this in compilation config files, but honestly I'm a bit lost in it, so I better didn't touch it.
How can I chceck whether TUI is enabled in config, or why it isn't supported in resulting GDB binary, please?
Gdb is configured depending on the different libraries available. For TUI to work you would need curses or ncurses. Check your config.log for searched libraries. The documentation does not mention all the required libraries but here is a starting point:
https://sourceware.org/gdb/onlinedocs/gdb/Requirements.html#Requirements
I checked that I have or installed expat, zlib and iconv, as per GDB requirements, as well as ncurses
and there is header file
but when I rerun ./configure_binutils.sh, then make and make install, I can't start TUI mode either.
I checked config.log in gdb directory and found this
and this
looks like here lies my problem, but ncurses library is apparently installed and other GDB debuggers (like arm-none-eabi) happily use it in TUI mode.
My google-fu is failing here.
Last edit: Jaromir Sukuba 2017-08-20
If you look in the config.log you also find the failing test snippet with compilation/linker errors causing the test to fail. It might give you some clues.
Ake, thank you for your support.
The part of searching for ncurses.h, for example goes probably like this
My limited scripting knowledge (favorite programming language of mine is solder) tells me it's testing for existence of given header files in "ac_header", but I'm lost at the part where "ac_header" is actually defined or where it came from.
The same goes for checking of the library curses et al in "ac_lib":
Again, I'm somehow lost in configure file(s) structure. I believe the paths to search for the files are not correct, so configure script can't find it where it's searching for, despite it's being present somewhere else on my system - but I can't figure out how to change it.
I guess this comes from configure? It does not make much sense since it is generated from autoconf tools. You should be looking in config.log.
It looks like this:
Better example:
Have you seen this?
https://sourceware.org/bugzilla/show_bug.cgi?id=11267
readline, termcap libs missing?