aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/dbghelp.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-16 01:21:58 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-16 01:21:58 +0300
commitde5c928779d69e22221d08c21ce3b5455157004e (patch)
tree50ac3106f4fd91c5c900540596bed8b1c5db807d /src/dbghelp.cpp
parentuse error reporting from winapi-common (diff)
downloadwinapi-debug-de5c928779d69e22221d08c21ce3b5455157004e.tar.gz
winapi-debug-de5c928779d69e22221d08c21ce3b5455157004e.zip
export pdb::file to winapi-common's File
Diffstat (limited to 'src/dbghelp.cpp')
-rw-r--r--src/dbghelp.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dbghelp.cpp b/src/dbghelp.cpp
index fb94835..d42c900 100644
--- a/src/dbghelp.cpp
+++ b/src/dbghelp.cpp
@@ -6,6 +6,7 @@
#include <pdb/all.hpp>
#include <winapi/error.hpp>
+#include <winapi/file.hpp>
#include <winapi/utf8.hpp>
#include <dbghelp.h>
@@ -127,7 +128,7 @@ ModuleInfo DbgHelp::load_pdb(const std::string& path) const {
DWORD size = 0;
{
- const auto raw_size = file::get_size(path);
+ const auto raw_size = winapi::File::open_read_attributes(path).get_size();
if (raw_size > std::numeric_limits<decltype(size)>::max())
throw std::range_error{"PDB file is too large"};
size = static_cast<decltype(size)>(raw_size);