mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 08:39:44 +08:00
win: Avoid variable shadowing warning for thread_id
on VS2015
R=mark@chromium.org Change-Id: I0bf09c96715161827bdad70bb375ad8193456d28 Reviewed-on: https://chromium-review.googlesource.com/342634 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
ab01df1ffe
commit
b22cca6c3b
@ -169,7 +169,7 @@ template <class ExceptionRecordType,
|
|||||||
bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
||||||
ProcessReaderWin* process_reader,
|
ProcessReaderWin* process_reader,
|
||||||
WinVMAddress exception_pointers_address,
|
WinVMAddress exception_pointers_address,
|
||||||
DWORD thread_id,
|
DWORD exception_thread_id,
|
||||||
void (*native_to_cpu_context)(const ContextType& context_record,
|
void (*native_to_cpu_context)(const ContextType& context_record,
|
||||||
CPUContext* context,
|
CPUContext* context,
|
||||||
CPUContextUnion* context_union)) {
|
CPUContextUnion* context_union)) {
|
||||||
@ -198,7 +198,7 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
|||||||
first_record.ExceptionCode == CrashpadClient::kTriggeredExceptionCode &&
|
first_record.ExceptionCode == CrashpadClient::kTriggeredExceptionCode &&
|
||||||
first_record.NumberParameters == 2;
|
first_record.NumberParameters == 2;
|
||||||
if (triggered_by_client)
|
if (triggered_by_client)
|
||||||
process_reader->DecrementThreadSuspendCounts(thread_id);
|
process_reader->DecrementThreadSuspendCounts(exception_thread_id);
|
||||||
|
|
||||||
if (triggered_by_client && first_record.ExceptionInformation[0] != 0) {
|
if (triggered_by_client && first_record.ExceptionInformation[0] != 0) {
|
||||||
// This special exception code indicates that the target was crashed by
|
// This special exception code indicates that the target was crashed by
|
||||||
@ -206,12 +206,12 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
|||||||
// this case the parameters are a thread id and an exception code which we
|
// this case the parameters are a thread id and an exception code which we
|
||||||
// use to fabricate a new exception record.
|
// use to fabricate a new exception record.
|
||||||
using ArgumentType = decltype(first_record.ExceptionInformation[0]);
|
using ArgumentType = decltype(first_record.ExceptionInformation[0]);
|
||||||
const ArgumentType thread_id = first_record.ExceptionInformation[0];
|
const ArgumentType blame_thread_id = first_record.ExceptionInformation[0];
|
||||||
exception_code_ = static_cast<DWORD>(first_record.ExceptionInformation[1]);
|
exception_code_ = static_cast<DWORD>(first_record.ExceptionInformation[1]);
|
||||||
exception_flags_ = EXCEPTION_NONCONTINUABLE;
|
exception_flags_ = EXCEPTION_NONCONTINUABLE;
|
||||||
for (const auto& thread : process_reader->Threads()) {
|
for (const auto& thread : process_reader->Threads()) {
|
||||||
if (thread.id == thread_id) {
|
if (thread.id == blame_thread_id) {
|
||||||
thread_id_ = thread_id;
|
thread_id_ = blame_thread_id;
|
||||||
native_to_cpu_context(
|
native_to_cpu_context(
|
||||||
*reinterpret_cast<const ContextType*>(&thread.context),
|
*reinterpret_cast<const ContextType*>(&thread.context),
|
||||||
&context_,
|
&context_,
|
||||||
@ -222,7 +222,7 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (exception_address_ == 0) {
|
if (exception_address_ == 0) {
|
||||||
LOG(WARNING) << "thread " << thread_id << " not found";
|
LOG(WARNING) << "thread " << blame_thread_id << " not found";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -84,7 +84,7 @@ class ExceptionSnapshotWin final : public ExceptionSnapshot {
|
|||||||
bool InitializeFromExceptionPointers(
|
bool InitializeFromExceptionPointers(
|
||||||
ProcessReaderWin* process_reader,
|
ProcessReaderWin* process_reader,
|
||||||
WinVMAddress exception_pointers_address,
|
WinVMAddress exception_pointers_address,
|
||||||
DWORD thread_id,
|
DWORD exception_thread_id,
|
||||||
void (*native_to_cpu_context)(const ContextType& context_record,
|
void (*native_to_cpu_context)(const ContextType& context_record,
|
||||||
CPUContext* context,
|
CPUContext* context,
|
||||||
CPUContextUnion* context_union));
|
CPUContextUnion* context_union));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user