This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit] configure: search waddstr only when building with TUI


Hello,

This one has been annoying us for a long time before we finally
found the source of the problem.  It happens only on Tru64, and
the symptoms are a screwed terminal after GDB has started (missing
carriage returns).  The source of the problem is the following:

  * readline's configure determines that libtermcap is sufficient
    for its purposes, and thus includes termcap headers, etc.

  * GDB's configure has the following search:
     # For the TUI, we need enhanced curses functionality.
     [...]
     AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses])
    This search is done even when TUI is not requested, and so
    causes GDB to be compiled with libcurses.

On Tru64, unfortunately, the two libraries are not compatible.
I provide a little more details in the patch itself.

Ideally, we would want to adapt the build such that readline and
GDB end up using the same library.  But I haven't seen any other
system but Tru64 where this is a problem, and fixing this seems
a little tricky to coordinate.

I side-stepped the issue and declared gdb with TUI broken on Tru64,
and adjusted the configure to search for waddstr only when TUI was
requested (enable_tui either "yes" or "auto").  On Tru64, we error
out if TUI is requested, or disable it if "auto" was selected. The
nice consequence of this change is that this should get rid of
the dependency on libcurses on the platforms where its inclusion
was useless...

2008-10-02  Joel Brobecker  <brobecker@adacore.com>

        * configure.ac: On alpha-osf, error out if enable_tui is set to
        "yes", and set enable_tui to "no" if previously set to "auto".
        Check for waddstr only if TUI support was requested. Move the
        part of the configure script that updates various Makefile
        variables up, together with the check for waddstr.
        * configure: Regenerate.

The patch looks big, but I'm just moving things around inside an if
(except for the part were I error-out if TUI is requested on Tru64).
Tested on x86-linux, no regression. Tested on tru64 as well, but I
don't remember whether I ran the testsuite or not. I did verify
that GDB is now linked with libtermcap rater than libcurses.

Any objection? I'd like to commit this in about a week.

Thank you,
-- 
Joel

Attachment: tui-configure.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]