MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / CurrentOsStackTraceExceptTop

Method CurrentOsStackTraceExceptTop

tests/gtest/gtest-all.cc:2306–2313  ·  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 CurrentOsStackTraceExceptTop(1), Foo() will be i

Source from the content-addressed store, hash-verified

2304// CurrentOsStackTraceExceptTop(1), Foo() will be included in the
2305// trace but Bar() and CurrentOsStackTraceExceptTop() won't.
2306std::string UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) {
2307 return os_stack_trace_getter()->CurrentStackTrace(
2308 static_cast<int>(GTEST_FLAG(stack_trace_depth)),
2309 skip_count + 1
2310 // Skips the user-specified number of frames plus this function
2311 // itself.
2312 ); // NOLINT
2313}
2314
2315// Returns the current time in milliseconds.
2316TimeInMillis GetTimeInMillis() {

Callers 2

operator=Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected