aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb_bfd.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-05-19 18:36:24 +0100
committerPedro Alves <palves@redhat.com>2020-05-19 18:36:51 +0100
commit4111f652f955028e8219fad2d60af1fd22aa29ee (patch)
treed50f5be0ada132550b4096402f2afbf560f17430 /gdb/gdb_bfd.c
parentad80db5b9f7c95105c78d3ab439678184d1b7177 (diff)
downloadfsf-binutils-gdb-4111f652f955028e8219fad2d60af1fd22aa29ee.zip
fsf-binutils-gdb-4111f652f955028e8219fad2d60af1fd22aa29ee.tar.gz
fsf-binutils-gdb-4111f652f955028e8219fad2d60af1fd22aa29ee.tar.bz2
Eliminate target_fileio_open_warn_if_slow
This basically makes target_fileio_open_1 extern, renamed to target_fileio_open, and eliminates the current target_fileio_open_warn_if_slow and target_fileio_open. A following parameter will want to change gdb_bfd_iovec_fileio_open, the only caller of target_fileio_open_warn_if_slow, to pass down "warn_if_slow" true/false from the caller, instead of hardcoding "warn_if_slow" true. gdb/ChangeLog: 2020-05-19 Pedro Alves <palves@redhat.com> * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust. * target.c (target_fileio_open_1): Rename to target_fileio_open and make extern. Use bool. (target_fileio_open, target_fileio_open_warn_if_slow): Delete. (target_fileio_read_alloc_1): Adjust. * target.h (target_fileio_open): Add 'warn_if_slow' parameter. (target_fileio_open_warn_if_slow): Delete declaration.
Diffstat (limited to 'gdb/gdb_bfd.c')
-rw-r--r--gdb/gdb_bfd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index 26262bf..61872a0 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -284,11 +284,10 @@ gdb_bfd_iovec_fileio_open (struct bfd *abfd, void *inferior)
gdb_assert (is_target_filename (filename));
- fd = target_fileio_open_warn_if_slow ((struct inferior *) inferior,
- filename
- + strlen (TARGET_SYSROOT_PREFIX),
- FILEIO_O_RDONLY, 0,
- &target_errno);
+ fd = target_fileio_open ((struct inferior *) inferior,
+ filename + strlen (TARGET_SYSROOT_PREFIX),
+ FILEIO_O_RDONLY, 0, true,
+ &target_errno);
if (fd == -1)
{
errno = fileio_errno_to_host (target_errno);