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]

Re: [readline-mingw] backspace key and TUI size


> Date: Thu, 23 Feb 2006 13:21:45 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> This gets show width and show height to work on Windows consoles, and
> probably helps the TUI.  However, it does not fix paging.  I'm not
> planning to fix it, either - I wasted all morning on it.  Here's the
> story in case someone else goes down the same rathole someday.

FWIW, paging does work in the DJGPP port, so you may wish to take a
look at how it does that.

> First, GDB disables paging because tgetnum ("li") fails, so it assumes
> we're in a non-console environment.

You will see that the DJGPP port ifdef's around that code in utils.c.

> Next, readline sets cols to 79 instead of 80 because we don't have
> both automatic margins ("am") and ignored newlines beyond the automatic
> margins ("xn").  This causes utils.c to start printing the prompt
> at the last column of the previous line instead of the first column
> of the next line.

This part I don't understand: it doesn't happen with DJGPP, AFAICS,
but I don't see any ifdefs in the code to explain the difference.  Can
you post a short test case that exhibits this problem, and show the
code that causes utils.c to print the prompt at the wrong place?

> I think it'll happen on any terminal without "xn", given the current
> logic in gdb and readline, whether or not the terminal has "am".
> But I don't know any other platform using such a terminal at the
> moment

I think DJGPP is one such other platform.


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