From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18945 invoked by alias); 23 Apr 2003 17:37:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18922 invoked from network); 23 Apr 2003 17:37:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 23 Apr 2003 17:37:16 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h3NHbGD10471 for ; Wed, 23 Apr 2003 13:37:16 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3NHbFW31500; Wed, 23 Apr 2003 13:37:15 -0400 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h3NHbEM21160; Wed, 23 Apr 2003 10:37:14 -0700 Message-ID: <3EA6CF4A.F8B8496B@redhat.com> Date: Wed, 23 Apr 2003 19:22:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Elena Zannoni CC: gdb-patches@sources.redhat.com Subject: Re: Recent breakage -- disassemble References: <3E9AFE95.422A473D@redhat.com> <16036.16334.736772.787753@localhost.redhat.com> <16037.21202.794724.410087@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00440.txt.bz2 Elena Zannoni wrote: > > Elena Zannoni writes: > > Michael Snyder writes: > > > Some time between February 18 and March 24, someone checked in a change > > > which broke pagination in the disassemble command. Although "list" will > > > still print out a screen's worth of lines and then pause, "disassemble" > > > will not. > > > > > > Sorry I can't pin it down closer than that -- my cvs client is giving me grief. > > > > > > Michael > > > > Hmmm, this could be due to the new disassembler. The old one was using > > printf_filtered while the new one uses ui_out functions. But the > > change happened in November 2002. Do a cvs log of printcmd.c. If you > > back out those changes, does the problem go away? > > > > elena > > Ok, the problem is not that filtered prints were not used, but that > there is code in fputs_maybe_filtered to bypass the filtered print, if > this condition is true: > > /* Don't do any filtering if it is disabled. */ > if ((stream != gdb_stdout) || !pagination_enabled > || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) > { > fputs_unfiltered (linebuffer, stream); > return; > } > > In this case, stream is different from gdb_stdout. > > Can you try this patch? Thanks, Elena, your patch makes it work again. Michael > > Index: utils.c > =================================================================== > RCS file: /cvs/uberbaum/gdb/utils.c,v > retrieving revision 1.99 > diff -u -p -r1.99 utils.c > --- utils.c 2 Apr 2003 03:02:46 -0000 1.99 > +++ utils.c 22 Apr 2003 14:28:00 -0000 > @@ -1887,7 +1887,7 @@ fputs_maybe_filtered (const char *linebu > return; > > /* Don't do any filtering if it is disabled. */ > - if ((stream != gdb_stdout) || !pagination_enabled > + if (!ui_file_isatty (stream) || !pagination_enabled > || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) > { > fputs_unfiltered (linebuffer, stream);