summaryrefslogtreecommitdiffstats
path: root/tools/build/feature/test-cxa-demangle.cpp
blob: a3e712f65c37dc3d8bb785ac45c54b9e640033b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <stdlib.h>
#include <cxxabi.h>

int main(void)
{
  size_t len = 256;
  char *output = (char*)malloc(len);
        int status;

        output = abi::__cxa_demangle("FieldName__9ClassNameFd", output, &len, &status);

        printf("demangled symbol: {%s}\n", output);

        return 0;
}