[SERVER-45388] Add a C++ demangler utility class Created: 07/Jan/20  Updated: 06/Dec/22  Resolved: 13/Aug/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Billy Donahue Assignee: Backlog - Service Architecture
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 Description   

The __cxa_demangle function is hard to use efficiently.

It accepts in/out parameters which would allow reuse of a malloc'ed buffer between calls. The malloc/free of the buffer requires some special care so we never do this, and just punt, passing nullptr arguments. We are also ignoring the status output parameter.

On Windows we would need to "UnDecorate", I think.
https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-undecoratesymbolname

We should probably have a separate little C++ abstraction for it to encapsulate its complexity.


Generated at Thu Feb 08 05:08:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.