From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18688 invoked by alias); 22 Oct 2003 23:35:33 -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 18681 invoked from network); 22 Oct 2003 23:35:32 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sources.redhat.com with SMTP; 22 Oct 2003 23:35:32 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out3.apple.com (8.12.10/8.12.9) with ESMTP id h9MNZVTi007375 for ; Wed, 22 Oct 2003 16:35:32 -0700 (PDT) Received: from scv3.apple.com (scv3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Wed, 22 Oct 2003 16:34:59 -0700 Received: from [17.201.22.245] (inghji6.apple.com [17.201.22.245]) by scv3.apple.com (8.12.9/8.12.9) with ESMTP id h9MNZ30m018531 for ; Wed, 22 Oct 2003 16:35:03 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v606) In-Reply-To: <1066860856.12586.ezmlm@sources.redhat.com> References: <1066860856.12586.ezmlm@sources.redhat.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <77974AB1-04E8-11D8-A22C-000A958F4C44@apple.com> Content-Transfer-Encoding: 7bit From: Jim Ingham Subject: Re: Why does symfile.c use printf_filtered? Date: Wed, 22 Oct 2003 23:35:00 -0000 To: gdb@sources.redhat.com X-SW-Source: 2003-10/txt/msg00255.txt.bz2 On Oct 22, 2003, at 3:14 PM, gdb-digest-help@sources.redhat.com wrote: > "J. Johnston" writes: > >> Does anybody know why symfile.c uses printf_filtered()? >> >> This causes a couple of problems, most notably when you load a module >> with a lot of shared library references. The messages for "Reading >> symbols from"... inside symfile.c are printed filtered so eventually >> we end up causing a page break. I do not think this information is >> worthy of requiring user intervention. >> >> Would anybody have an objection to me changing to use >> printf_unfiltered() in symfile.c? > > No, that'd be fine. > > I have to wonder, though --- if one doesn't care whether the messages > are scrolling off the screen or not, should one print them at all? > What would folks think of just ditching the fprintf altogether, and > making sure there's some general message that says it's reading > symbols? > > I suppose those messages are nice in that they provide a context for > any error messages that might come afterwards, but I think it'd be > better just to improve the error messages to mention the filename > involved, rather than spew stuff all the time on the off chance > something will go wrong. These messages only show up when you set verbose on, so they don't appear in the normal case. Then I think you just get one dot per shared library. On a big application stack (like the Mac OS X framework stacks, for instance) there are lots of libraries to be read in. Having the dots serves as a progress meter, so you know gdb is not just hung... If you are working on the frameworks, you usually have the system copy in the regular install location, and then the copy you are working on. Instead of installing your working copy (which can mess up your whole machine) most folks use the environment variable (LD_LIBRARY_PATH, or on Mac OS X DYLD_FRAMEWORK_PATH) to point at the version they want to use. I have noticed that the folks who do this around here often keep the verbose setting on to make sure that they are indeed using the versions of the libraries that they intended. I bet this is not all that uncommon. So I think these messages are useful. Jim -- Jim Ingham jingham@apple.com Developer Tools Apple Computer