Document that DemangleRustSymbolEncoding omits some details on purpose.

PiperOrigin-RevId: 888093923
Change-Id: If923d44a1c5c6f6668314499dedf7c52f08b9341
This commit is contained in:
Chris Mihelich
2026-03-23 07:54:26 -07:00
committed by Copybara-Service
parent 9cc7e8dbd5
commit 4c5d34c1e5

View File

@@ -32,6 +32,14 @@ namespace debugging_internal {
// DemangleRustSymbolEncoding is async-signal-safe and runs in bounded C++
// call-stack space. It is suitable for symbolizing stack traces in a signal
// handler.
//
// Note that this demangler purposefully omits some details: generic argument
// lists become `<>`, function types `fn...`, and long tuples `(t, u, v, ...)`.
// This simplification suits crash backtracing, where the signal handler must
// not `malloc`, and the human troubleshooter won't want the `file:line` blame
// drowned in generic arguments. Applications better served by a freely
// allocating detailed demangler might prefer to use Rust's own `rustc-demangle`
// crate.
bool DemangleRustSymbolEncoding(const char* mangled, char* out,
size_t out_size);