public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Tom Tromey <tom@tromey.com>
Cc: "Metzger, Markus T via Gdb-patches" <gdb-patches@sourceware.org>
Subject: RE: gdb parsing question
Date: Tue, 31 May 2022 09:33:01 +0000	[thread overview]
Message-ID: <DM8PR11MB57497C05B1AB926434A173D0DEDC9@DM8PR11MB5749.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87h75d8j75.fsf@tromey.com>

Thanks, Tom,

>> I'm debugging a fail in gdb.base/non-lazy-array-index.exp and I'm
>> wondering why, for parsing '$.f', gdb would lookup 'f' as global
>> symbol [1]?
>
>> I would have expected it to lookup the type of '$' and lookup 'f' in its members.
>
>I am not really sure, but the lexer in c-exp.y doesn't really know a
>whole lot.  It often has no idea of the context, so when classifying a
>name it may do some lookup.  That is, there may not be a real reason.
>
>Whether or not the result of this lookup is then used in the parser is a
>different question -- for example the field_name production seems to
>just use the underlying 'stoken', which is just the text.

The test checks that we're not doing any xfer when evaluating from the
history.  When adding linker namespaces, however, we need to read the
debug base as part of svr4_iterate_over_objfiles_in_search_order().  This
may require xfers.

GDB used to cache that but all places have been changed to re-read it
every time to handle relocating it as comments suggest.

I changed the test to check for auxv accesses and treat this as XFAIL.

regards,
markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


      reply	other threads:[~2022-05-31  9:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 14:01 Metzger, Markus T
2022-05-25 20:13 ` Tom Tromey
2022-05-31  9:33   ` Metzger, Markus T [this message]

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=DM8PR11MB57497C05B1AB926434A173D0DEDC9@DM8PR11MB5749.namprd11.prod.outlook.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).