public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 0/7] Fix race in DWARF reader
Date: Tue, 9 Apr 2024 11:16:51 -0700	[thread overview]
Message-ID: <f1435d71-98e1-4f0e-8914-90ed636e12c1@FreeBSD.org> (raw)
In-Reply-To: <871q7m8oid.fsf@tromey.com>

On 4/3/24 11:16 AM, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
> 
> Tom> The background DWARF reader turns out to have a few races.  This
> Tom> series fixes one that occurs when the indexer runs at the same time as
> Tom> DWARF relocation.
> 
> Tom> Most of the series is just cleanup / preparation.
> 
> Tom> The main patch affects MIPS16.  I can't test this -- I tried on a MIPS
> Tom> machine in the GCC compile farm, but unfortunately the relevant
> Tom> gdb.arch test says that the processor doesn't support MIPS16.  It's
> Tom> possible this code is simply dead; I do not know.
> 
> Elsewhere I mentioned that I had a different idea for this series.
> 
> It seems to me that most (or maybe even all) the calls to
> dwarf2_per_objfile::adjust aren't really needed.  Many of them only
> affect lookup tables, where the adjustment isn't needed.  This includes
> all calls made by the indexer.
> 
> Some of the calls (like the one in read_attribute_value) even seem to be
> wrong.
> 
> So, I wrote a short series to remove these.  Unfortunately, though, it's
> hard to know for sure if the result is correct, given that I don't know
> how to test MIPS16.
> 
> I could probably test some simple things ("break") by debugging gdb
> while examining (but not running) a MIPS16 program.  I'm not sure if
> that's really sufficient though.
> 
> I'd appreciate some insight if you have any.

I haven't seen anyone active with submitting MIPS patches in several years.
I no longer make use of MIPS myself (and we've removed it from FreeBSD
entirely, though I know it's still present in Linux distros).  Even when I
was working with MIPS I never tested microMIPS / MIPS16.

OTOH, I think MIPS16 is similar to Thumb on ARM, and it might even be
using a similar trick from reading your series (setting the LSB to enter
"compressed decoding mode" vs "regular decoding mode").  I think ARM uses
special mapping symbols to mark Thumb vs non-Thumb code though instead of
depending on the LSB?  That is, I wonder why Thumb doesn't trip over this
issue the way MIPS16 does?

-- 
John Baldwin


  reply	other threads:[~2024-04-09 18:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18  1:10 Tom Tromey
2024-02-18  1:10 ` [PATCH 1/7] Compare section index in lookup_minimal_symbol_by_pc_section Tom Tromey
2024-02-18  1:10 ` [PATCH 2/7] Remove unnecessary null check " Tom Tromey
2024-02-18  1:10 ` [PATCH 3/7] Hoist a call to frob_address Tom Tromey
2024-02-18  1:10 ` [PATCH 4/7] Add unrelocated overload of lookup_minimal_symbol_by_pc_section Tom Tromey
2024-02-18  1:10 ` [PATCH 5/7] Fix race in background DWARF indexer Tom Tromey
2024-02-18  1:10 ` [PATCH 6/7] Use bound_minimal_symbol more in lookup_minimal_symbol_by_pc_section Tom Tromey
2024-02-18  1:10 ` [PATCH 7/7] Fix address comparison " Tom Tromey
2024-04-03 15:16 ` [PATCH 0/7] Fix race in DWARF reader Tom Tromey
2024-04-09 18:16   ` John Baldwin [this message]
2024-04-09 22:11     ` Luis Machado
2024-04-10  0:02       ` Maciej W. Rozycki
2024-04-16 17:05         ` 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=f1435d71-98e1-4f0e-8914-90ed636e12c1@FreeBSD.org \
    --to=jhb@freebsd.org \
    --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).