summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstacktrace.cpp
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2014-10-27 17:10:08 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2014-10-27 17:10:08 +0200
commit366bcd0cbca43081fe58825fd463018e49b51740 (patch)
tree87ecb99f0a7d27ca4bd9effb94e0c9218379e84b /indra/llcommon/llstacktrace.cpp
parente3f62a54e6c3fe5423a1e766c4ee30388aa471bd (diff)
MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of vertices
less than allowed. Changes in all other files relate auxiliary methods for catching similar bugs in future.
Diffstat (limited to 'indra/llcommon/llstacktrace.cpp')
-rwxr-xr-xindra/llcommon/llstacktrace.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp
index e0e9056380..8d826cbc6e 100755
--- a/indra/llcommon/llstacktrace.cpp
+++ b/indra/llcommon/llstacktrace.cpp
@@ -125,6 +125,30 @@ bool ll_get_stack_trace(std::vector<std::string>& lines)
return false;
}
+void ll_get_stack_trace_internal(std::vector<std::string>& lines)
+{
+ const S32 MAX_STACK_DEPTH = 100;
+ const S32 STRING_NAME_LENGTH = 256;
+
+ HANDLE process = GetCurrentProcess();
+ SymInitialize( process, NULL, TRUE );
+
+ void *stack[MAX_STACK_DEPTH];
+
+ unsigned short frames = RtlCaptureStackBackTrace_fn( 0, MAX_STACK_DEPTH, stack, NULL );
+ SYMBOL_INFO *symbol = (SYMBOL_INFO*)calloc(sizeof(SYMBOL_INFO) + STRING_NAME_LENGTH * sizeof(char), 1);
+ symbol->MaxNameLen = STRING_NAME_LENGTH-1;
+ symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
+
+ for(unsigned int i = 0; i < frames; i++)
+ {
+ SymFromAddr(process, (DWORD64)(stack[i]), 0, symbol);
+ lines.push_back(symbol->Name);
+ }
+
+ free( symbol );
+}
+
#else
bool ll_get_stack_trace(std::vector<std::string>& lines)
@@ -132,5 +156,10 @@ bool ll_get_stack_trace(std::vector<std::string>& lines)
return false;
}
+void ll_get_stack_trace2(std::vector<std::string>& lines)
+{
+ return false;
+}
+
#endif