gdb/corelow.c: do not try to reopen a file if open failed once
authorLancelot SIX <lancelot.six@amd.com>
Wed, 31 May 2023 14:04:55 +0000 (15:04 +0100)
committerLancelot SIX <lancelot.six@amd.com>
Thu, 8 Jun 2023 13:18:09 +0000 (14:18 +0100)
commitea70f941f9b2ccb0bbcda62496426e060da946a7
tree0cc0f9af96f98096918c671e6ae35bc26cdd6792
parent0ad504dd4645153fc7c6e8e6a5979b0f79830341
gdb/corelow.c: do not try to reopen a file if open failed once

In the current implementation, core_target::build_file_mappings will try
to locate and open files which were mapped in the process for which the
core dump was produced.  If the file cannot be found or cannot be
opened, GDB will re-try to open it once for each time it was mapped in
the process's address space.

This patch makes it so GDB recognizes that it has already failed to open
a given file once and does not re-try the process for each mapping.

Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/corelow.c