From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98551 invoked by alias); 13 Aug 2015 03:56:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 98538 invoked by uid 89); 13 Aug 2015 03:56:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 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-pd0-f173.google.com Received: from mail-pd0-f173.google.com (HELO mail-pd0-f173.google.com) (209.85.192.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 13 Aug 2015 03:56:02 +0000 Received: by pdrh1 with SMTP id h1so14451154pdr.0 for ; Wed, 12 Aug 2015 20:56:01 -0700 (PDT) X-Received: by 10.70.135.67 with SMTP id pq3mr74302389pdb.8.1439438161190; Wed, 12 Aug 2015 20:56:01 -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 z16sm714559pbt.3.2015.08.12.20.56.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2015 20:56:00 -0700 (PDT) From: Doug Evans To: Pierre-Marie de Rodat Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [Ada] Add support for subprogram renamings References: <1437854144-31928-1-git-send-email-derodat@adacore.com> <55C225E1.6020109@adacore.com> Date: Thu, 13 Aug 2015 03:56:00 -0000 In-Reply-To: <55C225E1.6020109@adacore.com> (Pierre-Marie de Rodat's message of "Wed, 5 Aug 2015 17:04:01 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00336.txt.bz2 Pierre-Marie de Rodat writes: > Hi Doug, > > Thanks again for reviewing my patches! > > ... > Quoting myself on IRC: >> xdje: hello! in >> https://sourceware.org/ml/gdb-patches/2015-07/msg00768.html you >> suggested to move namespace bits in a new file >> >> I think that makes sense too, but lang-support.* does not >> >> I mean=E2=80=A6 symtab, block, etc. all are about source debugging=E2=80= =A6 and thus >> languages support >> >> so I=E2=80=99m tempted to create instead namespace.* or else to move thi= s to >> block.* >> >> what do you think? > > So I created namespace.[ch]. Please tell me if that's fine, otherwise > I can switch to the names you suggested. Fine by me. >... > > gdb/ChangeLog: > > * ada-lang.c: Include namespace.h > (aux_add_nonlocal_symbols): Fix a function name in comment. > (ada_add_block_renamings): New. > (add_nonlocal_symbols): Add global renamings handling. > (ada_lookup_symbol_list_worker): Move the symbol lookup part > to... > (ada_add_all_symbols): ... this new function. > (ada_add_block_symbols): Try to match the input name against the > "using directives list", perform a recursive symbol lookup on > the matched declarations. > * block.h (struct block): Move the_namespace to top-level as > namespace_info. Remove the language_specific field. > (BLOCK_NAMESPACE): Update access to the namespace_info field. > * buildsym.h (using_directives): Rename into... > (local_using_directives): ... this. > (global_using_directives): New. > (struct context_stack): Rename the using_directives field into > local_using_directives. > * buildsym.c (finish_block_internal): Deal with the proper > using directives repository (local or global). > (prepare_for_building): Reset local_using_directives. Assert > that there is no pending global using directive. > (reset_symtab_globals): Reset global_using_directives and > local_using_directives. > (end_symtab_get_static_block): Don't ignore symtabs that have > only using directives. > (push_context): Update references to local_using_directives. > (buildsym_init): Do not reset using_directives. > * cp-support.c: Include namespace.h. > * cp-support.h (struct using_direct): Move to namespace.h. > (cp_add_using_directives): Move to namespace.h. > * cp-namespace.c: Include namespace.h > (cp_add_using_directive): Move to namespace.c, rename it to > add_using_directive, add a "using_directives" argument and use > it as the pending using directives repository. All callers > updated. > * dwarf2read.c (using_directives): New. > (read_import_statement): Call using_directives. > (read_func_scope): Update references to local_using_directives. > (read_lexical_block_scope): Likewise. > (read_namespace): Update the heading comment, call > using_directives. > * namespace.h: New file. > * namespace.c: New file. > * Makefile.in (SFILES): Add namespace.c. > (COMMON_OBS): Add namespace.o > > gdb/testsuite/ChangeLog: > > * gdb.ada/fun_renaming.exp: New testcase. > * gdb.ada/fun_renaming/fun_renaming.adb: New file. > * gdb.ada/fun_renaming/pack.adb: New file. > * gdb.ada/fun_renaming/pack.ads: New file. LGTM