Rizin
unix-like reverse engineering framework and cli tools
msvc.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2015-2018 inisider <inisider@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 #include "demangler.h"
4 #include <rz_libdemangle.h>
5 
6 char *libdemangle_handler_msvc(const char *str) {
7  char *out = NULL;
8  SDemangler *mangler = 0;
9 
10  create_demangler(&mangler);
11  if (!mangler) {
12  return NULL;
13  }
14  if (init_demangler(mangler, (char *)str) == eDemanglerErrOK) {
15  mangler->demangle(mangler, &out /*demangled_name*/);
16  }
17  free_demangler(mangler);
18  return out;
19 }
const lzma_allocator const uint8_t size_t uint8_t * out
Definition: block.h:528
#define NULL
Definition: cris-opc.c:27
@ eDemanglerErrOK
if all is OK
char * libdemangle_handler_msvc(const char *str)
Definition: msvc.c:6
Demangler object.
demangle_func demangle
function that will use for demangling
void free_demangler(SDemangler *demangler)
Deallocate demangler object.
Definition: demangler.c:96
EDemanglerErr init_demangler(SDemangler *demangler, char *sym)
Initialize object of demangler.
Definition: demangler.c:56
EDemanglerErr create_demangler(SDemangler **demangler)
Create object of demangler.
Definition: demangler.c:38