From patchwork Mon Oct 27 05:01:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 3399 Received: (qmail 8840 invoked by alias); 27 Oct 2014 05:02:45 -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 8823 invoked by uid 89); 27 Oct 2014 05:02:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f45.google.com Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Oct 2014 05:02:42 +0000 Received: by mail-pa0-f45.google.com with SMTP id lf10so2276583pab.32 for ; Sun, 26 Oct 2014 22:02:41 -0700 (PDT) X-Received: by 10.68.68.225 with SMTP id z1mr21627703pbt.107.1414386161077; Sun, 26 Oct 2014 22:02:41 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id qc8sm9623104pdb.70.2014.10.26.22.02.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Oct 2014 22:02:40 -0700 (PDT) From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH 8/9] Rename lookup_symbol_global to lookup_global_symbol. Date: Sun, 26 Oct 2014 22:01:53 -0700 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. This patch renames lookup_symbol_global to lookup_global_symbol. The latter reads better to me, and is consistent with lookup_static_symbol. 2014-10-26 Doug Evans * symtab.c (lookup_global_symbol): Renamed from lookup_symbol_global. All callers updated. * symtab.h (lookup_global_symbol): Update decl. (lookup_static_symbol): Move decl to better location. diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index 898fb5a..4366666 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -632,7 +632,7 @@ lookup_symbol_file (const char *name, } else { - sym = lookup_symbol_global (name, block, domain); + sym = lookup_global_symbol (name, block, domain); } if (sym != NULL) @@ -692,7 +692,7 @@ lookup_symbol_file (const char *name, /* Lookup a class named KLASS. If none is found, there is nothing more that can be done. */ - klass_sym = lookup_symbol_global (klass, block, domain); + klass_sym = lookup_global_symbol (klass, block, domain); if (klass_sym == NULL) { do_cleanups (cleanup); diff --git a/gdb/d-exp.y b/gdb/d-exp.y index 91d5309..ad1729c 100644 --- a/gdb/d-exp.y +++ b/gdb/d-exp.y @@ -1182,7 +1182,7 @@ push_module_name (struct parser_state *ps, struct type *module, sym = lookup_symbol_in_static_block (copy, expression_context_block, VAR_DOMAIN); if (sym != NULL) - sym = lookup_symbol_global (copy, expression_context_block, + sym = lookup_global_symbol (copy, expression_context_block, VAR_DOMAIN); if (sym != NULL) diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c index cb7abf3..352451b 100644 --- a/gdb/guile/scm-symbol.c +++ b/gdb/guile/scm-symbol.c @@ -607,7 +607,7 @@ gdbscm_lookup_global_symbol (SCM name_scm, SCM rest) TRY_CATCH (except, RETURN_MASK_ALL) { - symbol = lookup_symbol_global (name, NULL, domain); + symbol = lookup_global_symbol (name, NULL, domain); } do_cleanups (cleanups); GDBSCM_HANDLE_GDB_EXCEPTION (except); diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c index 5d71c50..716f93d8 100644 --- a/gdb/python/py-symbol.c +++ b/gdb/python/py-symbol.c @@ -433,7 +433,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw) TRY_CATCH (except, RETURN_MASK_ALL) { - symbol = lookup_symbol_global (name, NULL, domain); + symbol = lookup_global_symbol (name, NULL, domain); } GDB_PY_HANDLE_EXCEPTION (except); diff --git a/gdb/symtab.c b/gdb/symtab.c index 54bbb67..8f66741 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1750,7 +1750,7 @@ basic_lookup_symbol_nonlocal (const char *name, if (sym != NULL) return sym; - return lookup_symbol_global (name, block, domain); + return lookup_global_symbol (name, block, domain); } /* See symtab.h. */ @@ -1830,7 +1830,7 @@ lookup_static_symbol (const char *name, const domain_enum domain) /* See symtab.h. */ struct symbol * -lookup_symbol_global (const char *name, +lookup_global_symbol (const char *name, const struct block *block, const domain_enum domain) { diff --git a/gdb/symtab.h b/gdb/symtab.h index 5564dbe..c967c62 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1096,11 +1096,18 @@ extern struct symbol *lookup_symbol_in_static_block (const char *name, const struct block *block, const domain_enum domain); +/* Search all static file-level symbols for NAME from DOMAIN. + Upon success sets BLOCK_FOUND and fixes up the symbol's section + if necessary. */ + +extern struct symbol *lookup_static_symbol (const char *name, + const domain_enum domain); + /* Lookup a symbol in all files' global blocks. Upon success sets BLOCK_FOUND and fixes up the symbol's section if necessary. */ -extern struct symbol *lookup_symbol_global (const char *name, +extern struct symbol *lookup_global_symbol (const char *name, const struct block *block, const domain_enum domain); @@ -1118,13 +1125,6 @@ extern struct symbol *lookup_symbol_in_block (const char *name, extern struct symbol *lookup_language_this (const struct language_defn *lang, const struct block *block); -/* Search all static file-level symbols for NAME from DOMAIN. - Upon success sets BLOCK_FOUND and fixes up the symbol's section - if necessary. */ - -extern struct symbol *lookup_static_symbol (const char *name, - const domain_enum domain); - /* Lookup a [struct, union, enum] by name, within a specified block. */ extern struct type *lookup_struct (const char *, const struct block *);