1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* APIs for getting a stack trace of an arbitrary thread */
9 #ifndef mozilla_StackWalkThread_h
10 #define mozilla_StackWalkThread_h
12 #include "mozilla/StackWalk.h"
17 * Like MozStackWalk, but walks the stack for another thread.
18 * Call aCallback for each stack frame on the current thread, from
19 * the caller of MozStackWalk to main (or above).
21 * @param aCallback Same as for MozStackWalk().
22 * @param aMaxFrames Same as for MozStackWalk().
23 * @param aClosure Same as for MozStackWalk().
24 * @param aThread The handle of the thread whose stack is to be walked.
25 * If 0, walks the current thread.
26 * @param aContext A CONTEXT, presumably obtained with GetThreadContext()
27 * after suspending the thread with SuspendThread(). If
28 * null, the CONTEXT will be re-obtained.
30 MFBT_API
void MozStackWalkThread(MozWalkStackCallback aCallback
,
31 uint32_t aMaxFrames
, void* aClosure
,
32 HANDLE aThread
, CONTEXT
* aContext
);