From c6d974113685509ccc64abab1a5cc96d6a1e13ad Mon Sep 17 00:00:00 2001 From: Mathias Lang Date: Wed, 6 Sep 2023 01:28:58 +0200 Subject: [PATCH] Fix and test TRACY_DEMANGLE for TracyClient The configuration wasn't tested and stopped compiling. This fixes it and adds a test to ensure it doesn't break again. --- .github/workflows/gcc.yml | 1 + public/client/TracyCallstack.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index a4aaa761..f5fd7b78 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -42,3 +42,4 @@ jobs: make -j`nproc` -C test TRACYFLAGS=-DTRACY_ON_DEMAND make -j`nproc` -C test clean make -j`nproc` -C test TRACYFLAGS="-DTRACY_DELAYED_INIT -DTRACY_MANUAL_LIFETIME" + make -C test -B ../public/TracyClient.o DEFINES='-DTRACY_DEMANGLE' diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp index a874446c..0de7c9d2 100644 --- a/public/client/TracyCallstack.cpp +++ b/public/client/TracyCallstack.cpp @@ -686,7 +686,9 @@ void InitCallstackCritical() void InitCallstack() { cb_bts = backtrace_create_state( nullptr, 0, nullptr, nullptr ); +#ifndef TRACY_DEMANGLE ___tracy_init_demangle_buffer(); +#endif #ifdef __linux InitKernelSymbols(); @@ -761,7 +763,9 @@ debuginfod_client* GetDebuginfodClient() void EndCallstack() { +#ifndef TRACY_DEMANGLE ___tracy_free_demangle_buffer(); +#endif #ifdef TRACY_DEBUGINFOD ClearDebugInfoVector( s_di_known ); debuginfod_end( s_debuginfod );