diff options
Diffstat (limited to 'gdb/build-id.c')
-rw-r--r-- | gdb/build-id.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/build-id.c b/gdb/build-id.c index 43a80dd..0ecd79f 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c @@ -1,6 +1,6 @@ /* build-id-related functions. - Copyright (C) 1991-2024 Free Software Foundation, Inc. + Copyright (C) 1991-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -29,6 +29,7 @@ #include "gdbsupport/scoped_fd.h" #include "debuginfod-support.h" #include "extension.h" +#include "inferior.h" /* See build-id.h. */ @@ -128,8 +129,9 @@ build_id_to_debug_bfd_1 (const std::string &original_link, if (supports_target_stat != TRIBOOL_FALSE) { struct stat sb; - int res = target_fileio_stat (nullptr, link_on_target, &sb, - &target_errno); + int res = target_fileio_lstat (current_inferior (), + link_on_target, &sb, + &target_errno); if (res != 0 && target_errno != FILEIO_ENOSYS) { @@ -157,7 +159,7 @@ build_id_to_debug_bfd_1 (const std::string &original_link, the path doesn't exist, but we just assume that anything other than EINVAL indicates the path doesn't exist. */ std::optional<std::string> link_target - = target_fileio_readlink (nullptr, link_on_target, + = target_fileio_readlink (current_inferior (), link_on_target, &target_errno); if (link_target.has_value () || target_errno == FILEIO_EINVAL) |