osrf / osrf_testing_tools_cpp

Common testing tools for C++ which are used for testing in various OSRF projects.
Apache License 2.0
33 stars 29 forks source link

add get_backtrace method #79

Open knorth55 opened 1 year ago

knorth55 commented 1 year ago

Thank you for this great testing tools. memory_tools is quite good to investigate dynamic memory allocation in RT thread.

In this PR, I add get_backtrace method to get backtrace in std::osstringstream format. This method is useful when you want to use the stream with ROS logger like. (I'm using ROS1 now)

ROS_ERROR_STREAM("Backtrace:\n" << service.get_backtrace().str());