public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH v2 2/8] Handle copy relocations
Date: Thu, 19 Sep 2019 17:45:00 -0000	[thread overview]
Message-ID: <87zhj0qiy1.fsf@tromey.com> (raw)
In-Reply-To: <20190822084129.GK6076@embecosm.com> (Andrew Burgess's message of	"Thu, 22 Aug 2019 09:41:29 +0100")

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> So then I thought, surely we can do better, maybe add a single object
Andrew> iterator and have lookup_minimal_symbol_text not walk through all
Andrew> object files.... but then I spotted this condition:

Andrew>     if (objf == NULL || objf == objfile
Andrew>         || objf == objfile->separate_debug_objfile_backlink)
Andrew>       {
Andrew>           /* Process object file.  */
Andrew>       }

Andrew> So, in this case we have to scan all objfiles in case we have split
Andrew> debug information.  Wouldn't this apply to your new function too?

TBH I was not sure.  Can we really have a minimal symbol that appears in
the separate debug info but not in the main objfile?  I guess maybe it's
possible if one strips the main objfile.

I'll change my patch.

Andrew> I guess I'm thinking that we could merge the core of
Andrew> lookup_minimal_symbol_text and lookup_minimal_symbol_linkage (or
Andrew> _data), and just pass in a comparison function to check for either
Andrew> text or data symbols.

Sounds good, I'll try that.  There is already a separate debug iterator,
so maybe that can be used as well.

>> I guess I don't care all that much (as evidenced by the original choice
>> of name ;) so if you still like that better, I'll make the change.

Andrew> Meh! I guess my only request would be can the comment at least explain
Andrew> that it's similar to *_text but for data as currently neither the
Andrew> function name nor the comment mention data at all.

I'll fix that up too.

Tom

  reply	other threads:[~2019-09-19 17:45 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 3/8] Back out earlier Ada exception change 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 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 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 [this message]
2019-09-19 18:28           ` Tom Tromey
2019-09-19 18:40             ` Andrew Burgess
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: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
2019-08-28 12:34         ` 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

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=87zhj0qiy1.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).