hunyadi-dev commented on a change in pull request #809:
URL: https://github.com/apache/nifi-minifi-cpp/pull/809#discussion_r440102107
##########
File path: libminifi/src/utils/BackTrace.cpp
##########
@@ -89,19 +90,9 @@ void pull_trace(uint8_t frames_to_skip /* = 1 */) {
}
}
- /* Determine the symbol name */
- std::string demangled_symbol_name;
+ std::string symbol_name;
if (dl_info.dli_sname != nullptr) {
- symbol_name = dl_info.dli_sname;
-
- /* Try to demangle the symbol name */
- demangled_symbol_name = demangle_symbol(symbol_name);
- if (!demangled_symbol_name.empty()) {
- symbol_name = demangled_symbol_name.c_str();
- }
- } else {
- /* If we could not determine the symbol name, we will use the filename
instead */
- symbol_name = file_name;
+ symbol_name =
demangle_symbol(dl_info.dli_sname).value_or(std::string(file_name));
}
Review comment:
Updated as requested.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]