Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Maxim Bublis <satori@yandex-team.ru>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH 0/3] Fixed abortion using Python API for label symbol object.
Date: Tue, 25 Mar 2014 16:51:00 -0000	[thread overview]
Message-ID: <4369C88E-D0A5-4F4F-8937-5ABDBABD8BC9@yandex-team.ru> (raw)
In-Reply-To: <1393929360-31299-1-git-send-email-satori@yandex-team.ru>

Hi,

Is there any way to notify gdb.python maintainer to review this patch set?

—
Maxim Bublis
From gdb-patches-return-111400-listarch-gdb-patches=sources.redhat.com@sourceware.org Tue Mar 25 17:51:00 2014
Return-Path: <gdb-patches-return-111400-listarch-gdb-patches=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-patches@sources.redhat.com
Received: (qmail 28994 invoked by alias); 25 Mar 2014 17:50:59 -0000
Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-patches.sourceware.org>
List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-patches/>
List-Post: <mailto:gdb-patches@sourceware.org>
List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-patches-owner@sourceware.org
Delivered-To: mailing list gdb-patches@sourceware.org
Received: (qmail 28984 invoked by uid 89); 25 Mar 2014 17:50:58 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: rock.gnat.com
Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 25 Mar 2014 17:50:57 +0000
Received: from localhost (localhost.localdomain [127.0.0.1])	by filtered-rock.gnat.com (Postfix) with ESMTP id E1F331167C2;	Tue, 25 Mar 2014 13:50:55 -0400 (EDT)
Received: from rock.gnat.com ([127.0.0.1])	by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024)	with LMTP id 3099Cvgm6ZRa; Tue, 25 Mar 2014 13:50:55 -0400 (EDT)
Received: from joel.gnat.com (localhost.localdomain [127.0.0.1])	by rock.gnat.com (Postfix) with ESMTP id B8E2C11669A;	Tue, 25 Mar 2014 13:50:55 -0400 (EDT)
Received: by joel.gnat.com (Postfix, from userid 1000)	id 98D98E07DC; Tue, 25 Mar 2014 10:50:56 -0700 (PDT)
Date: Tue, 25 Mar 2014 17:50:00 -0000
From: Joel Brobecker <brobecker@adacore.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gp >> \"gdb-patches@sourceware.org ml\"" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Fix c++/16253 (tag/variable name collision)
Message-ID: <20140325175056.GO4282@adacore.com>
References: <532C810F.7010809@redhat.com> <20140324141527.GM4282@adacore.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20140324141527.GM4282@adacore.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-SW-Source: 2014-03/txt/msg00598.txt.bz2
Content-length: 2029

Hey Keith,

> > I must also give a shout out to Joel -- I've largely avoided hacking
> > with/at Ada. In fact, Ada *largely* remains unchanged. However, it
> > now must explicitly search STRUCT_DOMAIN in a few places itself (an
> > analogous change to the other symbol table API changes I've made).
> > Joel, if you could run this through your internal AdaCore test
> > harness, that would be most helpful.
>
> I had a chance to test your patch today, and unfortunately our testsuite
> detected some regressions. I think they might all be the same, so I
> picked the simplest testcase. I might be running short of time today
> to look deeper into this, but I can try scheduling some time for it
> tomorrow or Wed.
>
>     % gnatmake -g foo
>     % gdb foo
>     (gdb) ptype base

Insert missing "No definition of "base" in current context." as the
output of the "ptype base" command above...

I had a chance to investigate the source of the problem, and I think
I understand it, now. Basically, I think you fixed up the Ada symbol
lookups for local symbols, but did not adjust the non-local lookups.

In our case, our type "base" is defined in unit foo.adb as a static
(non-global) STRUCT_DOMAIN symbol. The symbol lookup is performed
via ada-lang.c::add_nonlocal_symbols which calls
objfile->sf->qf->map_matching_symbols (=map_matching_symbols_psymtab).
And the match now fails since it performs strict domain matching.

I think you actually ended up noticing the problem, since you had to
change ada-tasks to do a STRUCT_DOMAIN search instead of a VAR_DOMAIN
search. I think the ada-tasks change is correct regardless, since
these are all structure types anyways (need to double-check, but
pretty sure), but that was also a clue.

Now, the question becomes: Does Ada need to add some logic to call
objfile->sf->qf->map_matching_symbols a second time with STRUCT_DOMAIN,
or should objfile->sf->qf->map_matching_symbols do it? From the looks
of your patch, it looks like this should be done on the Ada side?

Thanks!
--
Joel


  parent reply	other threads:[~2014-03-25 16:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 10:36 Maxim Bublis
2014-03-04 10:37 ` [PATCH 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method Maxim Bublis
2014-03-04 16:53   ` Eli Zaretskii
2014-03-05 13:34     ` Maxim Bublis
2014-03-05 13:41   ` [PATCH v2 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL, added notion on possible exceptions thrown from symbol object value method Maxim Bublis
2014-03-05 17:12     ` Eli Zaretskii
2014-03-04 10:37 ` [PATCH 1/3] gdb/testsuite/gdb.python: Added testcase for .value() method Maxim Bublis
2014-03-05 13:41   ` [PATCH v2 1/3] gdb/testsuite/gdb.python: Added testcase for value method Maxim Bublis
     [not found]     ` <1394026864-4691-2-git-send-email-satori@yandex-team.ru>
2014-04-14  7:41       ` [PATCH v2 2/3] gdb/python: raise TypeError instead of abort on calling value method for label symbol object Phil Muldoon
2014-04-16 17:20         ` Maxim Bublis
2014-04-17 12:44           ` Maxim Bublis
2014-03-04 10:37 ` [PATCH 2/3] gdb/python: raise TypeError instead of abort() on calling .value() " Maxim Bublis
2014-03-04 17:57   ` Phil Muldoon
     [not found]     ` <07E7B14B-748D-4CF7-A8AD-623AF5D6E701@yandex-team.ru>
2014-03-06  8:37       ` Phil Muldoon
2014-03-25 16:51 ` Maxim Bublis [this message]
2014-03-25 19:51   ` [PATCH 0/3] Fixed abortion using Python API " Phil Muldoon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4369C88E-D0A5-4F4F-8937-5ABDBABD8BC9@yandex-team.ru \
    --to=satori@yandex-team.ru \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox