Merge branch '20-remove-preprocessor-check-for-win' into 'master'
Resolve "Remove preprocessor check for _WIN32" Closes #20 See merge request ros_tracing/ros2_tracing!42
This commit is contained in:
commit
be8f1ecced
2 changed files with 5 additions and 5 deletions
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "tracetools/tracetools.h"
|
#include "tracetools/tracetools.h"
|
||||||
|
|
||||||
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED)
|
||||||
# include "tracetools/tp_call.h"
|
# include "tracetools/tp_call.h"
|
||||||
# define CONDITIONAL_TP(...) \
|
# define CONDITIONAL_TP(...) \
|
||||||
tracepoint(__VA_ARGS__)
|
tracepoint(__VA_ARGS__)
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
bool ros_trace_compile_status()
|
bool ros_trace_compile_status()
|
||||||
{
|
{
|
||||||
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
const char * _demangle_symbol(const char * mangled)
|
const char * _demangle_symbol(const char * mangled)
|
||||||
{
|
{
|
||||||
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED)
|
||||||
char * demangled = nullptr;
|
char * demangled = nullptr;
|
||||||
int status;
|
int status;
|
||||||
demangled = abi::__cxa_demangle(mangled, NULL, 0, &status);
|
demangled = abi::__cxa_demangle(mangled, NULL, 0, &status);
|
||||||
|
@ -35,7 +35,7 @@ const char * _demangle_symbol(const char * mangled)
|
||||||
|
|
||||||
const char * _get_symbol_funcptr(void * funcptr)
|
const char * _get_symbol_funcptr(void * funcptr)
|
||||||
{
|
{
|
||||||
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED)
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
if (dladdr(funcptr, &info) == 0) {
|
if (dladdr(funcptr, &info) == 0) {
|
||||||
return SYMBOL_UNKNOWN;
|
return SYMBOL_UNKNOWN;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue