From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9435 invoked by alias); 1 Jun 2003 17:42:46 -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 9400 invoked from network); 1 Jun 2003 17:42:45 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 1 Jun 2003 17:42:45 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6DFEF2B2F; Sun, 1 Jun 2003 13:42:34 -0400 (EDT) Message-ID: <3EDA3B0A.10603@redhat.com> Date: Sun, 01 Jun 2003 17:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Warkentin Cc: "Gdb@Sources.Redhat.Com" Subject: Re: ui-out question References: <027201c326d3$b480a2f0$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00008.txt.bz2 > I'm seeing that much of the generated text in gdb is using ui-out routines > rather that printf_unfiltered, etc. Is this the 'state of the art' that > should be used at all times? That is, should I be converting my output > routines to use that? Code should use fprintf_*, or ui_out*. Which is used is a judgment call. If a routine is just pumping info out to the console than fprintf_* are fine. If the intent is to build up something for an mi operation then the ui_out* is best. > The question that arises from that is the whole 'from_tty' argument that > gets passed around everywhere. Would it make more sense, if we're using the > ui-out routines anyway, to just let them make the decision about whether or > not to display stuff? Or am I misreading the purpose of from_tty. If > false, does it mean, "Do NO output", or does it mean, "Be less verbose."? I _think_ from_tty is disabled when --batch (look for "batch" in main.c). It's effect is to modify (supress) the CLI output when in batch mode. > I'm thinking that the from_tty might be useful for functions that want to > silently call other functions regardless of the overall setting. Something > like ui_out_push_output_state(0), ui_out_pop_output_state() would work for > temporarily shutting down output in this case which I believe is somewhat > rare. It could. Do you have more details of the problem at hand. Andrew