summaryrefslogtreecommitdiff
path: root/indra/llcommon/StackWalker.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-05-15 12:18:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-05-15 12:18:31 -0400
commit7ccf02515ad3f9e3bf795d651fe4b3c0d773f353 (patch)
treec4adc897c07f652e617e91fbf41c12b823acc808 /indra/llcommon/StackWalker.h
parent1abf5f18d6afc7ae9e1b1562b92e5c1ce33b722f (diff)
parente7eced3c87310b15ac20cc3cd470d67686104a14 (diff)
Merge commit 'e7eced3' into lua-timers for whitespace fixes.
Diffstat (limited to 'indra/llcommon/StackWalker.h')
-rw-r--r--indra/llcommon/StackWalker.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/indra/llcommon/StackWalker.h b/indra/llcommon/StackWalker.h
index 4634765d0b..91cd55bbaf 100644
--- a/indra/llcommon/StackWalker.h
+++ b/indra/llcommon/StackWalker.h
@@ -1,5 +1,5 @@
/**********************************************************************
- *
+ *
* StackWalker.h
*
*
@@ -13,33 +13,33 @@
* Copyright (c) 2005-2009, Jochen Kalmbach
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of Jochen Kalmbach nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of Jochen Kalmbach nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* **********************************************************************/
#if LL_WINDOWS
-// #pragma once is supported starting with _MCS_VER 1000,
+// #pragma once is supported starting with _MCS_VER 1000,
// so we need not to check the version (because we only support _MSC_VER >= 1100)!
#pragma once
@@ -61,34 +61,34 @@ class StackWalker
public:
typedef enum StackWalkOptions
{
- // No addition info will be retrived
+ // No addition info will be retrived
// (only the address is available)
RetrieveNone = 0,
-
+
// Try to get the symbol-name
RetrieveSymbol = 1,
-
+
// Try to get the line for this symbol
RetrieveLine = 2,
-
+
// Try to retrieve the module-infos
RetrieveModuleInfo = 4,
-
+
// Also retrieve the version for the DLL/EXE
RetrieveFileVersion = 8,
-
+
// Contains all the abouve
RetrieveVerbose = 0xF,
-
+
// Generate a "good" symbol-search-path
SymBuildPath = 0x10,
-
+
// Also use the public Microsoft-Symbol-Server
SymUseSymSrv = 0x20,
-
+
// Contains all the abouve "Sym"-options
SymAll = 0x30,
-
+
// Contains all options (default)
OptionsAll = 0x3F
} StackWalkOptions;
@@ -96,8 +96,8 @@ public:
StackWalker(
bool verbose = true,
int options = OptionsAll, // 'int' is by design, to combine the enum-flags
- LPCSTR szSymPath = NULL,
- DWORD dwProcessId = GetCurrentProcessId(),
+ LPCSTR szSymPath = NULL,
+ DWORD dwProcessId = GetCurrentProcessId(),
HANDLE hProcess = GetCurrentProcess()
);
StackWalker(DWORD dwProcessId, HANDLE hProcess);
@@ -116,18 +116,18 @@ public:
BOOL ShowCallstack(
bool verbose,
- HANDLE hThread = GetCurrentThread(),
- const CONTEXT *context = NULL,
+ HANDLE hThread = GetCurrentThread(),
+ const CONTEXT *context = NULL,
PReadProcessMemoryRoutine readMemoryFunction = NULL,
LPVOID pUserData = NULL // optional to identify some data in the 'readMemoryFunction'-callback
);
#if _MSC_VER >= 1300
-// due to some reasons, the "STACKWALK_MAX_NAMELEN" must be declared as "public"
+// due to some reasons, the "STACKWALK_MAX_NAMELEN" must be declared as "public"
// in older compilers in order to use it... starting with VC7 we can declare it as "protected"
protected:
#endif
- enum { STACKWALK_MAX_NAMELEN = 4096 }; // max name length for found symbols
+ enum { STACKWALK_MAX_NAMELEN = 4096 }; // max name length for found symbols
protected:
// Entry for each Callstack-Entry
@@ -173,10 +173,10 @@ protected:
// The "ugly" assembler-implementation is needed for systems before XP
-// If you have a new PSDK and you only compile for XP and later, then you can use
+// If you have a new PSDK and you only compile for XP and later, then you can use
// the "RtlCaptureContext"
-// Currently there is no define which determines the PSDK-Version...
-// So we just use the compiler-version (and assumes that the PSDK is
+// Currently there is no define which determines the PSDK-Version...
+// So we just use the compiler-version (and assumes that the PSDK is
// the one which was installed by the VS-IDE)
// INFO: If you want, you can use the RtlCaptureContext if you only target XP and later...
@@ -185,7 +185,7 @@ protected:
#if defined(_M_IX86)
#ifdef CURRENT_THREAD_VIA_EXCEPTION
-// TODO: The following is not a "good" implementation,
+// TODO: The following is not a "good" implementation,
// because the callstack is only valid in the "__except" block...
#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \
do { \