[Bug tui/21482] New: gdb 8.0 tui doesn't build with native curses on Solaris

ro at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu May 11 14:16:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21482

            Bug ID: 21482
           Summary: gdb 8.0 tui doesn't build with native curses on
                    Solaris
           Product: gdb
           Version: 8.0
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: *-*-solaris2.*

When trying to build the gdb 8.0 branch with native curses on Solaris 10
(Solaris 11 and 12 include ncurses as well, and it's found by default), I ran
into a couple of issues:

* Initially, compilation failed like this:

In file included from
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/gdb_curses.h:42:
0,
                 from
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-data.h:2
6,
                 from
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c
:31:
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c: In function ‘CORE_A
DDR tui_disassemble(gdbarch*, tui_asm_line*, CORE_ADDR, int)’:
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c:71:19: error: ‘class
 string_file’ has no member named ‘wclear’; did you mean ‘clear’?
       gdb_dis_out.clear ();
                   ^
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-disasm.c:78:19: error: ‘class
 string_file’ has no member named ‘wclear’; did you mean ‘clear’?
       gdb_dis_out.clear ();
                   ^
make[2]: *** [Makefile:1927: tui-disasm.o] Error 1

  It turned out this happens because <curses.h> has

#define clear()         wclear(stdscr)

  this can be avoided by defining NOMACROS, however, like

  make CFLAGS+=-DNOMACROS CXXFLAGS+=-DNOMACROS

* While this gets around the wclear/clear issue above, I ran into another
  issue:

/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-winsource.c: In function
‘void tui_erase_source_content(tui_win_info*, int)’:
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-winsource.c:257:18: error:
invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
        no_src_str);
                  ^
In file included from
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/gdb_curses.h:42:0,
                 from
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-data.h:26,
                 from
/vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/tui/tui-winsource.c:33:
/vol/gcc-7/lib/gcc/sparc-sun-solaris2.10/7.1.0/include-fixed/curses.h:699:12:
note:   initializing argument 4 of ‘int mvwaddstr(WINDOW*, int, int, char*)’
 extern int mvwaddstr(WINDOW *, int, int, char *);
            ^~~~~~~~~
make[2]: *** [Makefile:1927: tui-winsource.o] Error 1

  Unlike ncurses, <curses.h> declares 

extern int mvwaddstr(WINDOW *, int, int, char *);

* In the end, I've just avoided the issue by configuring with --disable-tui.

  Rainer

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list