Rizin
unix-like reverse engineering framework and cli tools
msvc.c File Reference
#include "demangler.h"
#include <rz_libdemangle.h>

Go to the source code of this file.

Functions

char * libdemangle_handler_msvc (const char *str)
 

Function Documentation

◆ libdemangle_handler_msvc()

char* libdemangle_handler_msvc ( const char *  str)

Definition at line 6 of file msvc.c.

6  {
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
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

References create_demangler(), SDemangler::demangle, eDemanglerErrOK, free_demangler(), init_demangler(), NULL, out, and cmd_descs_generate::str.

Referenced by rz_demangler_msvc().