cgdb displays the prompt values instead of the color that are encoded in it

107 views
Skip to first unread message

yair gadelov

unread,
Sep 28, 2019, 3:52:18 AM9/28/19
to cgdb-dev
Hi,

I 'm using gentoo distro with gdb 8.3. and instead of display colors, it displays the prompt values like that:

Reading symbols from [32m./dataServer[m...
[0;32m(gdb) [0m

with gdb 8.2 it works fine.

Are someones knows what to do?

Yair
 

Robert Rossi

unread,
Sep 28, 2019, 7:22:55 AM9/28/19
to cgdb...@googlegroups.com
You'll have to update to the latest version of CGDB.

Let me know if that does not fix your issue.

Thanks!
Bob Rossi

--
You received this message because you are subscribed to the Google Groups "cgdb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-dev/29fe6dbe-6f66-4dcb-843b-5b1c6b4ee59b%40googlegroups.com.

yair gadelov

unread,
Sep 28, 2019, 1:59:07 PM9/28/19
to cgdb-dev
Thanks, but latest version 0.7 and 0.7.1 are unstable and I get segmentation fault. Also, they marked as unstable in the Gentoo portage



On Saturday, September 28, 2019 at 2:22:55 PM UTC+3, Bob Rossi wrote:
You'll have to update to the latest version of CGDB.

Let me know if that does not fix your issue.

Thanks!
Bob Rossi

On Sat, Sep 28, 2019 at 3:52 AM yair gadelov <yair....@gmail.com> wrote:
Hi,

I 'm using gentoo distro with gdb 8.3. and instead of display colors, it displays the prompt values like that:

Reading symbols from [32m./dataServer[m...
[0;32m(gdb) [0m

with gdb 8.2 it works fine.

Are someones knows what to do?

Yair
 

--
You received this message because you are subscribed to the Google Groups "cgdb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb...@googlegroups.com.

Robert Rossi

unread,
Sep 28, 2019, 2:03:42 PM9/28/19
to cgdb...@googlegroups.com
No way! Can you send the backtrace and the
steps to crash it?

You’ll have to use a newer version to fix the issue you have.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-dev/7d4ee586-1ee8-4119-954c-34c04f6bc14b%40googlegroups.com.

yair gadelov

unread,
Sep 28, 2019, 2:34:09 PM9/28/19
to cgdb-dev
here is debugging output of cgdb-0.7.1 till the crach:

yair@yair ~/cgdb-0.7.1/cgdb $ gdb cgdb
GNU gdb (Gentoo 8.2 vanilla) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from cgdb...done.
(gdb) b main
Breakpoint 1 at 0x8d00: file cgdb.cpp, line 1757.
(gdb) r
Starting program: /home/yair/cgdb-0.7.1/cgdb/cgdb 

Breakpoint 1, main (argc=1, argv=0x7fffffffdcc8) at cgdb.cpp:1757
1757 {
(gdb) n
1758     parse_long_options(&argc, &argv);
(gdb) 
1761     if (wait_for_debugger_to_attach) {
(gdb) 
1775     if (init_home_dir() == -1) {
(gdb) l
1770             read(0, &c, 1);
1771         }
1772     }
1773
1774     // Create the home directory and the log directory
1775     if (init_home_dir() == -1) {
1776         cgdb_cleanup_and_exit(-1);
1777     }
1778
1779     cgdb_start_logging();
(gdb) n
1779     cgdb_start_logging();
(gdb) 
1782     cgdbrc_init();
(gdb) 
1784     if (create_and_init_pair() == -1) {
(gdb) 
1791     if (start_gdb(argc, argv) == -1) {
(gdb) 
[Detaching after fork from child process 9130]
1799     if (init_readline() == -1) {
(gdb) 
1804     if (tty_cbreak(STDIN_FILENO, &term_attributes) == -1) {
(gdb) 
1809     if (init_kui() == -1) {
(gdb) 
1815     if (!swin_start()) {
(gdb) 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f901a9 in termattrs_sp () from /lib64/libncursesw.so.6
(gdb) 






On Saturday, September 28, 2019 at 9:03:42 PM UTC+3, Bob Rossi wrote:
No way! Can you send the backtrace and the
steps to crash it?

You’ll have to use a newer version to fix the issue you have.

On Saturday, September 28, 2019, yair gadelov <yair....@gmail.com> wrote:
Thanks, but latest version 0.7 and 0.7.1 are unstable and I get segmentation fault. Also, they marked as unstable in the Gentoo portage



On Saturday, September 28, 2019 at 2:22:55 PM UTC+3, Bob Rossi wrote:
You'll have to update to the latest version of CGDB.

Let me know if that does not fix your issue.

Thanks!
Bob Rossi

On Sat, Sep 28, 2019 at 3:52 AM yair gadelov <yair....@gmail.com> wrote:
Hi,

I 'm using gentoo distro with gdb 8.3. and instead of display colors, it displays the prompt values like that:

Reading symbols from [32m./dataServer[m...
[0;32m(gdb) [0m

with gdb 8.2 it works fine.

Are someones knows what to do?

Yair
 

--
You received this message because you are subscribed to the Google Groups "cgdb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-dev/29fe6dbe-6f66-4dcb-843b-5b1c6b4ee59b%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "cgdb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgdb...@googlegroups.com.

yair gadelov

unread,
Sep 28, 2019, 3:27:39 PM9/28/19
to cgdb-dev
also, backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f901a9 in termattrs_sp () from /lib64/libncursesw.so.6
(gdb) backtrace 
#0  0x00007ffff7f901a9 in termattrs_sp () from /lib64/libncursesw.so.6
#1  0x00007ffff7f8d51f in _nc_setupscreen_sp () from /lib64/libncursesw.so.6
#2  0x00007ffff7f88cae in newterm_sp () from /lib64/libncursesw.so.6
#3  0x00007ffff7f89138 in newterm () from /lib64/libncursesw.so.6
#4  0x00007ffff7f84c13 in initscr () from /lib64/libncursesw.so.6
#5  0x0000555555583549 in swin_initscr () at sys_win.cpp:73
#6  swin_start () at sys_win.cpp:56
#7  0x000055555555d010 in main (argc=0, argv=<optimized out>) at cgdb.cpp:1815

Robert Rossi

unread,
Sep 28, 2019, 4:32:38 PM9/28/19
to cgdb...@googlegroups.com
Huh,

This points to a gentoo/ncurses issue.


Try compiling against libncurses instead of libncursesw.
You could edit the configure script here from
        if test "$ac_cv_lib_ncursesw_initscr" = "yes"; then
        curses_lib_name="ncursesw"
        elif test "$ac_cv_lib_ncurses_initscr" = "yes"; then
        curses_lib_name="ncurses"
        else
to
        if test "$ac_cv_lib_ncurses_initscr" = "yes"; then
        curses_lib_name="ncurses"
        else

Let me know.

You can verify if you linked against ncursesw or not by checking 'ldd cgdb'. Good Luck.

Thanks,
Bob Rossi


To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-dev/f968a74b-21b1-4026-bf74-5213054103c5%40googlegroups.com.

yair gadelov

unread,
Sep 28, 2019, 5:22:37 PM9/28/19
to cgdb-dev
I did it, but got another error:

checking version of installed readline library... configure: error: CGDB requires GNU readline 5.1 or greater to link.
  If you used --with-readline instead of using the system readline library,
  make sure to set the correct readline library on the linker search path
  via LD_LIBRARY_PATH or some other facility.
make: *** [Makefile:353: config.status] Error 1

I have installed readline 7 

do you have any idea ?


On Saturday, September 28, 2019 at 11:32:38 PM UTC+3, Bob Rossi wrote:
Huh,

This points to a gentoo/ncurses issue.


Try compiling against libncurses instead of libncursesw.
You could edit the configure script here from
        if test "$ac_cv_lib_ncursesw_initscr" = "yes"; then
        curses_lib_name="ncursesw"
        elif test "$ac_cv_lib_ncurses_initscr" = "yes"; then
        curses_lib_name="ncurses"
        else
to
        if test "$ac_cv_lib_ncurses_initscr" = "yes"; then
        curses_lib_name="ncurses"
        else

Let me know.

You can verify if you linked against ncursesw or not by checking 'ldd cgdb'. Good Luck.

Thanks,
Bob Rossi


Robert Rossi

unread,
Sep 28, 2019, 5:35:25 PM9/28/19
to cgdb...@googlegroups.com
Generally speaking, you have to install readline-dev to get the headers and includes.

To unsubscribe from this group and stop receiving emails from it, send an email to cgdb-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgdb-dev/d55393b1-1bf6-42c7-8f4c-ca5b2fbca472%40googlegroups.com.

yair gadelov

unread,
Sep 30, 2019, 5:37:54 PM9/30/19
to cgdb-dev
Thanks, it works great. I did nothing  special, just what you told me and I also had to force configure.ac to select readline version since from some reason the Autoconf didn't make up to run the command: RL_LIB_READLINE_VERSION 
and I had to write something like that: ac_cv_rl_version='6'  to fix it.

I work with cgdb cuple of years and find it very useful and efficient with compare to IDEs like eclipse and embedded IDEs like:  kail,iir  etc.
Yair
Reply all
Reply to author
Forward
0 new messages