Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Tom Tromey <tromey@adacore.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 4/8] Search global block from basic_lookup_symbol_nonlocal
Date: Tue, 27 Aug 2019 18:17:00 -0000	[thread overview]
Message-ID: <CAPTJ0XF2shJX6PJOMd9se3rVWn1ZMr0Vcwi0KPSGH6e-idWiNg@mail.gmail.com> (raw)
In-Reply-To: <20190827095357.GO6076@embecosm.com>

On Tue, Aug 27, 2019 at 4:54 AM Andrew Burgess
<andrew.burgess@embecosm.com> wrote:
> @@ -2662,6 +2646,22 @@ lookup_global_symbol (const char *name,
>    if (objfile != NULL)
>      result = solib_global_lookup (objfile, name, domain);
>
> +  /* If a block was passed in, we want to search the corresponding
> +     global block first.  This yields "more expected" behavior, and is
> +     needed to support 'FILENAME'::VARIABLE lookups.  */
> +  const struct block *global_block = block_global_block (block);
> +  if (global_block != nullptr)
> +    {
> +      result.symbol = lookup_symbol_in_block (name,
> +                                             symbol_name_match_type::FULL,
> +                                             global_block, domain);
> +      if (result.symbol != nullptr)
> +       {
> +         result.block = global_block;
> +         return result;
> +       }
> +    }
> +
>    /* If that didn't work go a global search (of global blocks, heh).  */
>    if (result.symbol == NULL)
>      {

I like this change but shouldn't this call happen before solib_global_lookup?

(That said, I would like to remove that function...
https://patches-gcc.linaro.org/patch/21673/)

Christian


  reply	other threads:[~2019-08-27 18:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 17:04 [PATCH v2 0/8] Handle copy relocations and add $_ada_exception Tom Tromey
2019-08-01 17:04 ` [PATCH v2 8/8] Make print-file-var.exp test attribute visibility hidden, dlopen, and main symbol Tom Tromey
2019-08-20 13:41   ` Andrew Burgess
2019-08-21 14:35     ` Andrew Burgess
2019-08-01 17:04 ` [PATCH v2 1/8] Change SYMBOL_VALUE_ADDRESS to be an rvalue Tom Tromey
2019-08-01 17:04 ` [PATCH v2 7/8] Add $_ada_exception convenience variable Tom Tromey
2019-08-01 17:56   ` Eli Zaretskii
2019-09-20 19:16     ` Tom Tromey
2019-08-27  9:47   ` Andrew Burgess
2019-09-20 19:15     ` Tom Tromey
2019-08-01 17:04 ` [PATCH v2 6/8] Make current_source_* per-program-space Tom Tromey
2019-08-20 15:57   ` Andrew Burgess
2019-08-21 19:05     ` Tom Tromey
2019-08-01 17:04 ` [PATCH v2 3/8] Back out earlier Ada exception change Tom Tromey
2019-08-01 17:04 ` [PATCH v2 2/8] Handle copy relocations Tom Tromey
2019-08-21 15:35   ` Andrew Burgess
2019-08-21 19:11     ` Tom Tromey
2019-08-22  8:41       ` Andrew Burgess
2019-09-19 17:45         ` Tom Tromey
2019-09-19 18:28           ` Tom Tromey
2019-09-19 18:40             ` Andrew Burgess
2019-08-01 17:12 ` [PATCH v2 5/8] Don't call decode_line_with_current_source from select_source_symtab Tom Tromey
2019-08-01 17:12 ` [PATCH v2 4/8] Search global block from basic_lookup_symbol_nonlocal Tom Tromey
2019-08-21 10:32   ` Andrew Burgess
2019-08-27  9:54     ` Andrew Burgess
2019-08-27 18:17       ` Christian Biesinger via gdb-patches [this message]
2019-08-28 12:34         ` Andrew Burgess

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=CAPTJ0XF2shJX6PJOMd9se3rVWn1ZMr0Vcwi0KPSGH6e-idWiNg@mail.gmail.com \
    --to=gdb-patches@sourceware.org \
    --cc=andrew.burgess@embecosm.com \
    --cc=cbiesinger@google.com \
    --cc=tromey@adacore.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