Fix naming
This commit is contained in:
parent
e75d5b7629
commit
efc63cb49f
@ -36,16 +36,16 @@ namespace detail {
|
||||
return itr->second;
|
||||
|
||||
}
|
||||
HANDLE duplicatedHandle = nullptr;
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicatedHandle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
HANDLE duplicated_handle = nullptr;
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicated_handle , 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
throw internal_error("DuplicateHandle failed");
|
||||
}
|
||||
|
||||
if(!SymInitialize(duplicatedHandle, NULL, TRUE)) {
|
||||
if(!SymInitialize(duplicated_handle , NULL, TRUE)) {
|
||||
throw internal_error("SymInitialize failed {}", GetLastError());
|
||||
}
|
||||
cache[proc] = duplicatedHandle;
|
||||
return duplicatedHandle;
|
||||
cache[proc] = duplicated_handle ;
|
||||
return duplicated_handle ;
|
||||
}
|
||||
|
||||
// Thread-safety: Must only be called from symbols_with_dbghelp while the dbghelp_lock lock is held
|
||||
|
||||
@ -427,21 +427,21 @@ namespace dbghelp {
|
||||
// TODO: When does this need to be called? Can it be moved to the symbolizer?
|
||||
SymSetOptions(SYMOPT_ALLOW_ABSOLUTE_SYMBOLS);
|
||||
|
||||
HANDLE duplicatedHandle = nullptr;
|
||||
HANDLE duplicated_handle = nullptr;
|
||||
HANDLE proc = GetCurrentProcess();
|
||||
if(get_cache_mode() == cache_mode::prioritize_speed) {
|
||||
duplicatedHandle = get_syminit_manager().init(proc);
|
||||
duplicated_handle = get_syminit_manager().init(proc);
|
||||
} else {
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicatedHandle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicated_handle , 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
throw internal_error("DuplicateHandle failed");
|
||||
}
|
||||
if(!SymInitialize(duplicatedHandle, NULL, TRUE)) {
|
||||
if(!SymInitialize(duplicated_handle , NULL, TRUE)) {
|
||||
throw internal_error("SymInitialize failed");
|
||||
}
|
||||
}
|
||||
for(const auto frame : frames) {
|
||||
try {
|
||||
trace.push_back(resolve_frame(duplicatedHandle, frame));
|
||||
trace.push_back(resolve_frame(duplicated_handle , frame));
|
||||
} catch(...) { // NOSONAR
|
||||
if(!detail::should_absorb_trace_exceptions()) {
|
||||
throw;
|
||||
@ -452,10 +452,10 @@ namespace dbghelp {
|
||||
}
|
||||
}
|
||||
if(get_cache_mode() != cache_mode::prioritize_speed) {
|
||||
if(!SymCleanup(duplicatedHandle)) {
|
||||
if(!SymCleanup(duplicated_handle )) {
|
||||
throw internal_error("SymCleanup failed");
|
||||
}
|
||||
if (!CloseHandle(duplicatedHandle)) {
|
||||
if (!CloseHandle(duplicated_handle )) {
|
||||
throw internal_error("CloseHandle failed");
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,16 +103,16 @@ namespace detail {
|
||||
// SymInitialize( GetCurrentProcess(), NULL, TRUE ) has
|
||||
// already been called.
|
||||
//
|
||||
HANDLE duplicatedHandle = nullptr;
|
||||
HANDLE duplicated_handle = nullptr;
|
||||
HANDLE proc = GetCurrentProcess();
|
||||
HANDLE thread = GetCurrentThread();
|
||||
if(get_cache_mode() == cache_mode::prioritize_speed) {
|
||||
duplicatedHandle = get_syminit_manager().init(proc);
|
||||
duplicated_handle = get_syminit_manager().init(proc);
|
||||
} else {
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicatedHandle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicated_handle , 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
throw internal_error("DuplicateHandle failed");
|
||||
}
|
||||
if(!SymInitialize(duplicatedHandle, NULL, TRUE)) {
|
||||
if(!SymInitialize(duplicated_handle , NULL, TRUE)) {
|
||||
throw internal_error("SymInitialize failed");
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ namespace detail {
|
||||
if(
|
||||
!StackWalk64(
|
||||
machine_type,
|
||||
duplicatedHandle,
|
||||
duplicated_handle ,
|
||||
thread,
|
||||
&frame,
|
||||
machine_type == IMAGE_FILE_MACHINE_I386 ? NULL : &context,
|
||||
@ -149,10 +149,10 @@ namespace detail {
|
||||
}
|
||||
}
|
||||
if(get_cache_mode() != cache_mode::prioritize_speed) {
|
||||
if(!SymCleanup(duplicatedHandle)) {
|
||||
if(!SymCleanup(duplicated_handle )) {
|
||||
throw internal_error("SymCleanup failed");
|
||||
}
|
||||
if (!CloseHandle(duplicatedHandle)) {
|
||||
if (!CloseHandle(duplicated_handle )) {
|
||||
throw internal_error("CloseHandle failed");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user