MCPcopy Create free account
hub / github.com/apache/singa / GetCurrentOsStackTraceExceptTop

Function GetCurrentOsStackTraceExceptTop

test/gtest/gtest-all.cc:6119–6124  ·  view source on GitHub ↗

Returns the current OS stack trace as an std::string. The maximum number of stack frames to be included is specified by the gtest_stack_trace_depth flag. The skip_count parameter specifies the number of top frames to be skipped, which doesn't count against the number of frames to be included. For example, if Foo() calls Bar(), which in turn calls GetCurrentOsStackTraceExceptTop(..., 1), Foo() w

Source from the content-addressed store, hash-verified

6117// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
6118// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
6119std::string GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
6120 int skip_count) {
6121 // We pass skip_count + 1 to skip this wrapper function in addition
6122 // to what the user really wants to skip.
6123 return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
6124}
6125
6126// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to
6127// suppress unreachable code warnings.

Callers

nothing calls this directly

Calls 2

GetUnitTestImplFunction · 0.85

Tested by

no test coverage detected