aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 1c9367d..6ccab54 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -42,6 +42,7 @@
#include "cli/cli-decode.h"
#include "cli/cli-setshow.h"
#include "target-descriptions.h"
+#include "gdb_bfd.h"
#include <ctype.h>
#include <sys/time.h>
@@ -9823,11 +9824,15 @@ remote_filename_p (const char *filename)
bfd *
remote_bfd_open (const char *remote_file, const char *target)
{
- return bfd_openr_iovec (remote_file, target,
- remote_bfd_iovec_open, NULL,
- remote_bfd_iovec_pread,
- remote_bfd_iovec_close,
- remote_bfd_iovec_stat);
+ bfd *abfd = bfd_openr_iovec (remote_file, target,
+ remote_bfd_iovec_open, NULL,
+ remote_bfd_iovec_pread,
+ remote_bfd_iovec_close,
+ remote_bfd_iovec_stat);
+
+ if (abfd != NULL)
+ gdb_bfd_stash_filename (abfd);
+ return abfd;
}
void