Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Eduard-Petru Jipa <ejipa@undo.io>
Cc: gdb-patches@sourceware.org,  stephan.rohr@intel.com
Subject: Re: [PATCH v3] gdb: don't abort shared library reload when one library fails to open
Date: Tue, 27 Oct 2026 08:25:08 -0600	[thread overview]
Message-ID: <87mrrzp6ez.fsf@tromey.com> (raw)
In-Reply-To: <20261008130642.54868-1-ejipa@undo.io> (Eduard-Petru Jipa's message of "Thu, 8 Oct 2026 14:06:42 +0100")

>>>>> Eduard-Petru Jipa <ejipa@undo.io> writes:

> From: Eduard Jipa <ejipa@undo.io>
> When the set of shared libraries is reloaded, for example after
> 'set sysroot' or 'set solib-search-path', reload_shared_libraries_1
> calls solib_ops::bfd_open for each library in turn.  This can throw an
> error, for example if the file found is not in executable format, or
> its architecture is not compatible with the target.

> Nothing in the loop catches that error, so a single bad library stops
> the whole reload.  Any libraries after it in the list are not reloaded,
> and the error propagates out of the command that triggered the reload.

> Catch the error, print it, and carry on with the rest of the
> libraries.  This matches what is already done for errors from
> solib_map_sections later in the same loop.  The library that failed
> to open is handled as if it had not been found.

> Add a test that builds a sysroot in which the first of two libraries
> is not a valid object file, and checks that, after 'set sysroot', the
> first library is no longer loaded and the second library is reloaded
> from the new sysroot.

This looks good to me.  Thank you for doing this.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

      reply	other threads:[~2026-10-27 14:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 11:18 [PATCH] " Eduard-Petru Jipa
2026-10-07 12:45 ` Rohr, Stephan
2026-10-07 13:36   ` [PATCH v2] " Eduard-Petru Jipa
2026-10-07 15:35     ` Rohr, Stephan
2026-10-08 13:06       ` [PATCH v3] " Eduard-Petru Jipa
2026-10-27 14:25         ` Tom Tromey [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=87mrrzp6ez.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=ejipa@undo.io \
    --cc=gdb-patches@sourceware.org \
    --cc=stephan.rohr@intel.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