From patchwork Sat Nov 22 20:10:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 3852 Received: (qmail 17488 invoked by alias); 22 Nov 2014 20:11:52 -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 17477 invoked by uid 89); 22 Nov 2014 20:11:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f175.google.com Received: from mail-pd0-f175.google.com (HELO mail-pd0-f175.google.com) (209.85.192.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 22 Nov 2014 20:11:51 +0000 Received: by mail-pd0-f175.google.com with SMTP id y10so7457362pdj.20 for ; Sat, 22 Nov 2014 12:11:49 -0800 (PST) X-Received: by 10.68.211.193 with SMTP id ne1mr18653483pbc.49.1416687109410; Sat, 22 Nov 2014 12:11:49 -0800 (PST) Received: from sspiff.org (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id zn2sm8137276pbb.41.2014.11.22.12.11.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Nov 2014 12:11:48 -0800 (PST) Received: by sspiff.org (sSMTP sendmail emulation); Sat, 22 Nov 2014 12:10:56 -0800 From: Doug Evans To: gdb-patches@sourceware.org Subject: [COMMITTED PATCH] symtab.c: comment,whitespace improvements Date: Sat, 22 Nov 2014 12:10:56 -0800 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. This patch is just a few comment and whitespace improvements I found while reading the source. 2014-11-22 Doug Evans * symtab.c (lookup_symbol_in_objfile_from_linkage_name): Improve function comment. (search_symbols): Fix comments and whitespace. diff --git a/gdb/symtab.c b/gdb/symtab.c index 3adc7ce..345c20d 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1639,7 +1639,12 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index, /* Wrapper around lookup_symbol_in_objfile_symtabs for search_symbols. Look up LINKAGE_NAME in DOMAIN in the global and static blocks of OBJFILE - and all related objfiles. */ + and all associated separate debug objfiles. + + Normally we only look in OBJFILE, and not any separate debug objfiles + because the outer loop will cause them to be searched too. This case is + different. Here we're called from search_symbols where it will only + call us for the the objfile that contains a matching minsym. */ static struct symbol * lookup_symbol_in_objfile_from_linkage_name (struct objfile *objfile, @@ -3756,8 +3761,8 @@ search_symbols (const char *regexp, enum search_domain kind, e.g., c++ static const members. We only want to skip enums here. */ && !(SYMBOL_CLASS (sym) == LOC_CONST - && TYPE_CODE (SYMBOL_TYPE (sym)) - == TYPE_CODE_ENUM)) + && (TYPE_CODE (SYMBOL_TYPE (sym)) + == TYPE_CODE_ENUM))) || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) || (kind == TYPES_DOMAIN @@ -3789,7 +3794,7 @@ search_symbols (const char *regexp, enum search_domain kind, } /* If there are no eyes, avoid all contact. I mean, if there are - no debug symbols, then print directly from the msymbol_vector. */ + no debug symbols, then add matching minsyms. */ if (found_misc || (nfiles == 0 && kind != FUNCTIONS_DOMAIN)) {