MCPcopy Create free account
hub / github.com/BVLC/caffe / GetCurrentOsStackTraceExceptTop

Function GetCurrentOsStackTraceExceptTop

src/gtest/gtest-all.cpp:5821–5826  ·  view source on GitHub ↗

Returns the current OS stack trace as a 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() will be

Source from the content-addressed store, hash-verified

5819// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
5820// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
5821String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
5822 int skip_count) {
5823 // We pass skip_count + 1 to skip this wrapper function in addition
5824 // to what the user really wants to skip.
5825 return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
5826}
5827
5828// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to
5829// suppress unreachable code warnings.

Callers

nothing calls this directly

Calls 2

GetUnitTestImplFunction · 0.85

Tested by

no test coverage detected