mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
Check status of __cxa_demangle
This commit is contained in:
parent
10fd8da7d5
commit
124ba8aec7
1 changed files with 9 additions and 2 deletions
|
|
@ -83,7 +83,14 @@ namespace vtil::format
|
|||
#ifdef __GNUG__
|
||||
int status;
|
||||
char* demangled_name = abi::__cxa_demangle( in.data(), nullptr, nullptr, &status );
|
||||
in = demangled_name;
|
||||
// If demangling succeeds, set the name.
|
||||
//
|
||||
if ( status == 0 )
|
||||
{
|
||||
in = demangled_name;
|
||||
}
|
||||
// Free unconditionally.
|
||||
//
|
||||
free( demangled_name );
|
||||
#endif
|
||||
|
||||
|
|
@ -352,4 +359,4 @@ namespace vtil
|
|||
using format::CustomStringConvertible;
|
||||
using format::StdStringConvertible;
|
||||
using format::StringConvertible;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue