From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16997 invoked by alias); 27 Aug 2002 00:37:17 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 16989 invoked from network); 27 Aug 2002 00:37:16 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 27 Aug 2002 00:37:16 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 1271410AAA; Mon, 26 Aug 2002 20:35:22 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15722.51529.896535.794594@localhost.redhat.com> Date: Mon, 26 Aug 2002 17:37:00 -0000 To: Daniel Jacobowitz Cc: Stephane Carrez , Tom Tromey , Gdb List Subject: Re: build failure in TUI In-Reply-To: <15722.51086.256427.159708@localhost.redhat.com> References: <87d6s5mie5.fsf@fleche.redhat.com> <20020826212242.GA18393@nevyn.them.org> <15722.40388.301053.22990@localhost.redhat.com> <3D6ABF11.1060109@nerim.fr> <20020826223248.GA26492@nevyn.them.org> <15722.51086.256427.159708@localhost.redhat.com> X-SW-Source: 2002-08/txt/msg00348.txt.bz2 Elena Zannoni writes: > Daniel Jacobowitz writes: > > On Tue, Aug 27, 2002 at 01:51:45AM +0200, Stephane Carrez wrote: > > > Hi! > > > > > > Elena Zannoni wrote: > > > > > > >[...] > > > > > Debian has this: > > > > > #define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & > > > > 0x80) == 0)) > > > > > > > > > > I'm not sure offhand if this is fixed in stock readline 4.3, or if it > > > > > is Debian local. > > > > > > > > > > > > >It's in 4.3. > > > > > > > >Elena > > > > > > > > > > > > > We can temporarily override it in tuiIO.c to use 4.3 definition and until > > > we have readline 4.3. > > > > > > > > > The TUI does not build with readline 4.3 (on the branch) because it uses > > > readline internal > > > > > > variables that have disappeared. I filed a gdb PR for that. But this must > > > not prevent > > > a possible use of readline 4.3 for gdb 5.3. > > > > They've been renamed, into _rl_. They're visible in at least the > > Debian readline packages, since I've built TUI with readline 4.3. I > > suspect there are accessors you're supposed to be using, though... The > > I see these documented in readline/CHANGES as having been made > internal only. I don't see any accessor functions. You can still use > it, but they shouldn't be exported. > > Elena > > OK, answering my own question: the TUI should be using this (untested, uncompiled): Index: tuiWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiWin.c,v retrieving revision 1.19 diff -u -r1.19 tuiWin.c --- tuiWin.c 1 Mar 2002 06:19:28 -0000 1.19 +++ tuiWin.c 27 Aug 2002 00:35:42 -0000 @@ -639,8 +639,9 @@ tuiResizeAll (void) { int heightDiff, widthDiff; - extern int screenheight, screenwidth; /* in readline */ + int screenheight, screenwidth; /* in readline */ + rl_get_screen_size (&screenheight, &screenwidth); widthDiff = screenwidth - termWidth (); heightDiff = screenheight - termHeight (); if (heightDiff || widthDiff) > > patch I'm using: > > > > Debian local - some variables were renamed in readline 4.2. > > > > diff -urNp gdb-5.2.cvs20010401/gdb/tui.orig/tuiWin.c gdb-5.2.cvs20010401/gdb/tui/tuiWin.c > > --- gdb-5.2.cvs20010401/gdb/tui.orig/tuiWin.c Sun Mar 31 22:09:42 2002 > > +++ gdb-5.2.cvs20010401/gdb/tui/tuiWin.c Sun Mar 31 23:01:27 2002 > > @@ -639,10 +639,10 @@ void > > tuiResizeAll (void) > > { > > int heightDiff, widthDiff; > > - extern int screenheight, screenwidth; /* in readline */ > > + extern int _rl_screenheight, _rl_screenwidth; /* in readline */ > > > > - widthDiff = screenwidth - termWidth (); > > - heightDiff = screenheight - termHeight (); > > + widthDiff = _rl_screenwidth - termWidth (); > > + heightDiff = _rl_screenheight - termHeight (); > > if (heightDiff || widthDiff) > > { > > TuiLayoutType curLayout = currentLayout (); > > @@ -656,8 +656,8 @@ tuiResizeAll (void) > > if (winWithFocus != cmdWin) > > keypad (cmdWin->generic.handle, FALSE); > > init_page_info (); > > - setTermHeightTo (screenheight); > > - setTermWidthTo (screenwidth); > > + setTermHeightTo (_rl_screenheight); > > + setTermWidthTo (_rl_screenwidth); > > if (curLayout == SRC_DISASSEM_COMMAND || > > curLayout == SRC_DATA_COMMAND || curLayout == DISASSEM_DATA_COMMAND) > > numWinsDisplayed++; > > @@ -684,8 +684,8 @@ tuiResizeAll (void) > > if (heightDiff == 0) > > newHeight = firstWin->generic.height; > > else if ((firstWin->generic.height + splitDiff) >= > > - (screenheight - MIN_CMD_WIN_HEIGHT - 1)) > > - newHeight = screenheight - MIN_CMD_WIN_HEIGHT - 1; > > + (_rl_screenheight - MIN_CMD_WIN_HEIGHT - 1)) > > + newHeight = _rl_screenheight - MIN_CMD_WIN_HEIGHT - 1; > > else if ((firstWin->generic.height + splitDiff) <= 0) > > newHeight = MIN_WIN_HEIGHT; > > else > > @@ -694,7 +694,7 @@ tuiResizeAll (void) > > _makeInvisibleAndSetNewHeight (firstWin, newHeight); > > cmdWin->generic.origin.y = locator->origin.y + 1; > > cmdWin->generic.width += widthDiff; > > - newHeight = screenheight - cmdWin->generic.origin.y; > > + newHeight = _rl_screenheight - cmdWin->generic.origin.y; > > _makeInvisibleAndSetNewHeight (cmdWin, newHeight); > > _makeVisibleWithNewHeight (firstWin); > > _makeVisibleWithNewHeight (cmdWin); > > @@ -722,8 +722,8 @@ tuiResizeAll (void) > > newHeight = firstWin->generic.height; > > else if ((firstWin->generic.height + > > secondWin->generic.height + (splitDiff * 2)) >= > > - (screenheight - MIN_CMD_WIN_HEIGHT - 1)) > > - newHeight = (screenheight - MIN_CMD_WIN_HEIGHT - 1) / 2; > > + (_rl_screenheight - MIN_CMD_WIN_HEIGHT - 1)) > > + newHeight = (_rl_screenheight - MIN_CMD_WIN_HEIGHT - 1) / 2; > > else if ((firstWin->generic.height + splitDiff) <= 0) > > newHeight = MIN_WIN_HEIGHT; > > else > > @@ -742,9 +742,9 @@ tuiResizeAll (void) > > newHeight = secondWin->generic.height; > > else if ((firstWin->generic.height + > > secondWin->generic.height + (splitDiff * 2)) >= > > - (screenheight - MIN_CMD_WIN_HEIGHT - 1)) > > + (_rl_screenheight - MIN_CMD_WIN_HEIGHT - 1)) > > { > > - newHeight = screenheight - MIN_CMD_WIN_HEIGHT - 1; > > + newHeight = _rl_screenheight - MIN_CMD_WIN_HEIGHT - 1; > > if (newHeight % 2) > > newHeight = (newHeight / 2) + 1; > > else > > > > -- > > Daniel Jacobowitz > > MontaVista Software Debian GNU/Linux Developer