summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/StackWalker.cpp5
-rw-r--r--indra/llcommon/StackWalker.h3
-rw-r--r--indra/llcommon/llcallstack.cpp11
-rw-r--r--indra/llcommon/llcallstack.h3
4 files changed, 15 insertions, 7 deletions
diff --git a/indra/llcommon/StackWalker.cpp b/indra/llcommon/StackWalker.cpp
index 768595f5de..c0d3104099 100644
--- a/indra/llcommon/StackWalker.cpp
+++ b/indra/llcommon/StackWalker.cpp
@@ -6,6 +6,8 @@
*
* $LicenseInfo:firstyear=2016&license=bsd$
*
+ * Linden notes: Small modifications from the original source at https://stackwalker.codeplex.com/
+ *
* History:
* 2005-07-27 v1 - First public release on http://www.codeproject.com/
* http://www.codeproject.com/threads/StackWalker.asp
@@ -1012,8 +1014,9 @@ BOOL StackWalker::LoadModules()
static StackWalker::PReadProcessMemoryRoutine s_readMemoryFunction = NULL;
static LPVOID s_readMemoryFunction_UserData = NULL;
-BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadProcessMemoryRoutine readMemoryFunction, LPVOID pUserData)
+BOOL StackWalker::ShowCallstack(bool verbose, HANDLE hThread, const CONTEXT *context, PReadProcessMemoryRoutine readMemoryFunction, LPVOID pUserData)
{
+ m_verbose = verbose;
CONTEXT c;
CallstackEntry csEntry;
IMAGEHLP_SYMBOL64 *pSym = NULL;
diff --git a/indra/llcommon/StackWalker.h b/indra/llcommon/StackWalker.h
index b29cdbfc81..4ff6e736da 100644
--- a/indra/llcommon/StackWalker.h
+++ b/indra/llcommon/StackWalker.h
@@ -6,6 +6,8 @@
*
* $LicenseInfo:firstyear=2016&license=bsd$
*
+ * Linden notes: Small modifications from the original source at https://stackwalker.codeplex.com/
+ *
* LICENSE (http://www.opensource.org/licenses/bsd-license.php)
*
* Copyright (c) 2005-2009, Jochen Kalmbach
@@ -113,6 +115,7 @@ public:
BOOL LoadModules();
BOOL ShowCallstack(
+ bool verbose,
HANDLE hThread = GetCurrentThread(),
const CONTEXT *context = NULL,
PReadProcessMemoryRoutine readMemoryFunction = NULL,
diff --git a/indra/llcommon/llcallstack.cpp b/indra/llcommon/llcallstack.cpp
index 02cf4d0173..e4b3cfeab5 100644
--- a/indra/llcommon/llcallstack.cpp
+++ b/indra/llcommon/llcallstack.cpp
@@ -39,10 +39,10 @@ public:
~LLCallStackImpl()
{
}
- void getStack(std::vector<std::string>& stack, S32 skip_count=0)
+ void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
{
m_stack.clear();
- ShowCallstack();
+ ShowCallstack(verbose);
// Skip the first few lines because they're just bookkeeping for LLCallStack,
// plus any additional lines requested to skip.
S32 first_line = skip_count + 3;
@@ -74,15 +74,16 @@ public:
LLCallStackImpl *LLCallStack::s_impl = NULL;
-LLCallStack::LLCallStack(S32 skip_count):
- m_skipCount(skip_count)
+LLCallStack::LLCallStack(S32 skip_count, bool verbose):
+ m_skipCount(skip_count),
+ m_verbose(verbose)
{
if (!s_impl)
{
s_impl = new LLCallStackImpl;
}
LLTimer t;
- s_impl->getStack(m_strings, m_skipCount);
+ s_impl->getStack(m_strings, m_skipCount, m_verbose);
}
std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack)
diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h
index 598db3d404..44a572838e 100644
--- a/indra/llcommon/llcallstack.h
+++ b/indra/llcommon/llcallstack.h
@@ -29,8 +29,9 @@ class LLCallStackImpl;
class LLCallStack
{
public:
- LLCallStack(S32 skip_count=0);
+ LLCallStack(S32 skip_count=0, bool verbose=false);
std::vector<std::string> m_strings;
+ bool m_verbose;
private:
static LLCallStackImpl *s_impl;
S32 m_skipCount;