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
| 7118 | // GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in |
| 7119 | // the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. |
| 7120 | std::string GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/, |
| 7121 | int skip_count) { |
| 7122 | // We pass skip_count + 1 to skip this wrapper function in addition |
| 7123 | // to what the user really wants to skip. |
| 7124 | return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1); |
| 7125 | } |
| 7126 | |
| 7127 | // Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to |
| 7128 | // suppress unreachable code warnings. |
nothing calls this directly
no test coverage detected