| Index: runtime/vm/profiler.cc
|
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
|
| index 840f438359bb62e7f0aca86a650467282959d987..7aa898217397e52f994212fbfc1426e339d06cf8 100644
|
| --- a/runtime/vm/profiler.cc
|
| +++ b/runtime/vm/profiler.cc
|
| @@ -1076,6 +1076,20 @@ void Profiler::DumpStackTrace(void* context) {
|
| uword fp = SignalHandler::GetFramePointer(mcontext);
|
| uword sp = SignalHandler::GetCStackPointer(mcontext);
|
| DumpStackTrace(sp, fp, pc, true /* for_crash */);
|
| +#elif defined(HOST_OS_WINDOWS)
|
| + CONTEXT* ctx = reinterpret_cast<CONTEXT*>(context);
|
| +#if defined(HOST_ARCH_IA32)
|
| + uword pc = static_cast<uword>(ctx->Eip);
|
| + uword fp = static_cast<uword>(ctx->Ebp);
|
| + uword sp = static_cast<uword>(ctx->Esp);
|
| +#elif defined(HOST_ARCH_X64)
|
| + uword pc = static_cast<uword>(ctx->Rip);
|
| + uword fp = static_cast<uword>(ctx->Rbp);
|
| + uword sp = static_cast<uword>(ctx->Rsp);
|
| +#else
|
| +#error Unsupported architecture.
|
| +#endif
|
| + DumpStackTrace(sp, fp, pc, true /* for_crash */);
|
| #else
|
| // TODO(fschneider): Add support for more platforms.
|
| // Do nothing on unsupported platforms.
|
|
|