From patchwork Wed Apr 20 17:33:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 11822 Received: (qmail 43062 invoked by alias); 20 Apr 2016 17:33:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 43043 invoked by uid 89); 20 Apr 2016 17:33:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=*s, Hx-languages-length:1957, HX-Received:10.66.164.39, painful X-HELO: mail-pa0-f50.google.com Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 20 Apr 2016 17:33:41 +0000 Received: by mail-pa0-f50.google.com with SMTP id fs9so19930671pac.2 for ; Wed, 20 Apr 2016 10:33:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=mpMi2aMbad+62UH7HuJzeqr7h+AafxSXeRd3TBoS234=; b=GQtCW6Paq4WqB8wkTSdJb7WRmmf6gwiK2xfplE9Ef9/wGm8ikX5R/6RyhdgpfUCZRf k+n0T/SmKvGDJOqKWzM8zlPxMz2Sff6V94hiuboJGJzJ4i1/Ourq0f5P30Kr/1JqljdX a4Mw3MiF/k9ucin5ndtbZ/vlMis08r4/kvzbzXKxM3k4o5CzcJZgLXF0OOhKqZtZfdbR iLpcLM3gm43LUjh9LhzYC8kmA2GW3sNSZYkWhdRG7lt1RIsCFcNKqq1rwGY935g1sYQ6 1OrBudJChXiLkDLtYKRq0PFlHwoPvczdzxWGoYNOc/HYwt+BW6jyEWA1+JOIpyLgLPY3 HEYw== X-Gm-Message-State: AOPr4FUkuwyR+3CJHQBRv4Tsbe3mfpMaa6sVLiI2syyIN0+Bg0cMV3b8OWtMRSW7/x6IuQ== X-Received: by 10.66.164.39 with SMTP id yn7mr13914342pab.107.1461173619945; Wed, 20 Apr 2016 10:33:39 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by smtp.gmail.com with ESMTPSA id bb5sm54641335pac.21.2016.04.20.10.33.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Apr 2016 10:33:39 -0700 (PDT) From: Doug Evans To: gdb-patches@sourceware.org Subject: Re: [PATCH] Improve maint print symbols,psymbols,msymbols References: Date: Wed, 20 Apr 2016 10:33:38 -0700 In-Reply-To: (Doug Evans's message of "Wed, 20 Apr 2016 10:30:13 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Doug Evans writes: > Hi. > > More old sandbox spring cleaning. > > At the time I needed this, I used it a lot. > I've since also added msymbol improvements if only for consistency sake. > It's helpful to have more control over what to print, > and to have the output appear on the screen > without having to go looking for it. Bleah. > > 2016-04-20 Doug Evans > > * NEWS: Document new syntax for "mt print symbols", "mt print psymbols" > and "mt print msymbols" commands. > * psymtab.c (DEV_TTY): Delete. > (dump_psymtab_addrmap): Don't dump if psymtabs_addrmap is NULL. > (maintenance_print_psymbols): Rewrite for new syntax: > mt print psymbols [-objfile objfile] [-pc address] [outfile] > mt print psymbols [-objfile objfile] [-source source] [outfile] > (_initialize_psymtab): Update help text. > * symmisc.c (maintenance_print_symbols): Rewrite for new syntax: > mt print symbols [-pc address] [outfile] > mt print symbols [-objfile objfile] [-source source] [outfile] > (maintenance_print_msymbols): Rewrite for new syntax: > mt print msymbols [-objfile objfile] [outfile] > Only print symbols for the current progspace. > (_initialize_symmisc): Update help text. > > doc/ > * gdb.texinfo (Symbols): Update docs for symbol printing maintenance > commands. > > testsuite/ > * gdb.base/maint.exp: Update tests for maint print symbols, psymbols > and msymbols. Missed this bit of cleanup that can now be done. I'll include it when checking in. --- symmisc.c= 2016-04-20 10:21:41.989332611 -0700 +++ symmisc.c 2016-04-20 10:31:41.049944151 -0700 @@ -40,10 +40,6 @@ #include "psymtab.h" -#ifndef DEV_TTY -#define DEV_TTY "/dev/tty" -#endif - /* Unfortunately for debugging, stderr is usually a macro. This is painful when calling functions that take FILE *'s from the debugger. So we make a variable which has the same value and which is accessible when