Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pystack/_pystack/elf_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ getSectionInfo(const std::string& filename, const std::string& section_name, Sec
LOG(DEBUG) << "Trying to locate .PyRuntime data offset from program headers";
file_unique_ptr file(fopen(filename.c_str(), "r"), fclose);
if (!file || fileno(file.get()) == -1) {
LOG(ERROR) << "Cannot open ELF file " << filename;
LOG(ERROR) << "Cannot open ELF file " << filename << " (" << std::strerror(errno) << ")";
return false;
}
const int fd = fileno(file.get());
Expand Down Expand Up @@ -559,7 +559,7 @@ getBuildId(const std::string& filename)
LOG(DEBUG) << "Trying to locate .PyRuntime data offset from program headers";
file_unique_ptr file(fopen(filename.c_str(), "r"), fclose);
if (!file || fileno(file.get()) == -1) {
LOG(ERROR) << "Cannot open ELF file " << filename;
LOG(ERROR) << "Cannot open ELF file " << filename << " (" << std::strerror(errno) << ")";
return "";
}
const int fd = fileno(file.get());
Expand Down