Minor code format things
This commit is contained in:
parent
ca740b1474
commit
ace2324fda
@ -103,16 +103,16 @@ namespace detail {
|
||||
// SymInitialize( GetCurrentProcess(), NULL, TRUE ) has
|
||||
// already been called.
|
||||
//
|
||||
HANDLE duplicated_handle = nullptr;
|
||||
HANDLE duplicated_handle = nullptr;
|
||||
HANDLE proc = GetCurrentProcess();
|
||||
HANDLE thread = GetCurrentThread();
|
||||
if(get_cache_mode() == cache_mode::prioritize_speed) {
|
||||
duplicated_handle = get_syminit_manager().init(proc);
|
||||
duplicated_handle = get_syminit_manager().init(proc);
|
||||
} else {
|
||||
if (!DuplicateHandle(proc, proc, proc, &duplicated_handle , 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
if(!DuplicateHandle(proc, proc, proc, &duplicated_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
throw internal_error("DuplicateHandle failed{}", GetLastError());
|
||||
}
|
||||
if(!SymInitialize(duplicated_handle , NULL, TRUE)) {
|
||||
if(!SymInitialize(duplicated_handle, NULL, TRUE)) {
|
||||
throw internal_error("SymInitialize failed{}", GetLastError());
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ namespace detail {
|
||||
if(
|
||||
!StackWalk64(
|
||||
machine_type,
|
||||
duplicated_handle ,
|
||||
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(duplicated_handle )) {
|
||||
if(!SymCleanup(duplicated_handle)) {
|
||||
throw internal_error("SymCleanup failed");
|
||||
}
|
||||
if (!CloseHandle(duplicated_handle )) {
|
||||
if(!CloseHandle(duplicated_handle)) {
|
||||
throw internal_error("CloseHandle failed");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user