aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/dbghelp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbghelp.cpp')
-rw-r--r--src/dbghelp.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dbghelp.cpp b/src/dbghelp.cpp
index 399271e..0105682 100644
--- a/src/dbghelp.cpp
+++ b/src/dbghelp.cpp
@@ -23,10 +23,10 @@ void set_dbghelp_options() {
SymSetOptions(SymGetOptions() | SYMOPT_DEBUG | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME);
}
-void initialize(HANDLE id) {
+void initialize(HANDLE id, bool invade_current_process) {
set_dbghelp_options();
- if (!SymInitialize(id, NULL, FALSE))
+ if (!SymInitialize(id, NULL, invade_current_process ? TRUE : FALSE))
throw error::windows(GetLastError());
}
@@ -87,8 +87,8 @@ void enum_symbols(HANDLE id,
} // namespace
-DbgHelp::DbgHelp() {
- initialize(id);
+DbgHelp::DbgHelp(bool invade_current_process) {
+ initialize(id, invade_current_process);
}
DbgHelp::~DbgHelp() {
@@ -132,6 +132,10 @@ void DbgHelp::enum_modules(const OnModule& callback) const {
throw error::windows(GetLastError());
}
+ModuleInfo DbgHelp::resolve_module(Address offline) const {
+ return get_module_info(id, offline);
+}
+
void DbgHelp::enum_symbols(const ModuleInfo& module,
const std::string& mask,
const OnSymbol& callback) const {