This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug tui/21482] gdb 8.0 tui doesn't build with native curses on Solaris
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 19 May 2017 12:19:03 +0000
- Subject: [Bug tui/21482] gdb 8.0 tui doesn't build with native curses on Solaris
- Auto-submitted: auto-generated
- References: <bug-21482-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21482
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <ro@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7a6e7fcc77997bf7679cce4f1cfebcd57ba8af70
commit 7a6e7fcc77997bf7679cce4f1cfebcd57ba8af70
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Fri May 19 14:16:55 2017 +0200
Fix tui compilation with Solaris libcurses: non-const last arg to mvwaddstr
(PR tui/21482)
On both mainline and the 8.0 branch, gdb compilation fails on Solaris 10
with the native libcurses in gdb/tui for several instances of the same
problem:
/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 *);
i.e. the last arg is char *, not const char *.
The patch fixes this by casting the last arg to mvwaddstr to char *,
as was recently done on mainline in a newterm() call (the only
difference between 8.0 and mainline gdb/tui).
* tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
arg to char *.
* tui/tui-wingeneral.c (box_win): Likewise.
* tui/tui-winsource.c (tui_erase_source_content): Likewise.
(tui_show_source_line): Likewise.
(tui_show_exec_info_content): Likewise.
--
You are receiving this mail because:
You are on the CC list for the bug.