Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d0aea91 authored by Christopher Ferris's avatar Christopher Ferris
Browse files

Use demangle for function names.

Bug: 62141808

Test: Ran unit tests, ran debuggerd -b on android processes.
Change-Id: I40f341bcb2b35dd0a020d245d6b6f2ed2df65481
parent 9b537f24
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ cc_library {
            static_libs: ["libasync_safe", "libcutils"],
        },
    },
    whole_static_libs: ["libdemangle"],
}

cc_library_shared {
+3 −2
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@
#include <backtrace/Backtrace.h>
#include <backtrace/BacktraceMap.h>

#include <demangle.h>

#include "BacktraceLog.h"
#include "thread_utils.h"
#include "UnwindCurrent.h"
@@ -62,8 +64,7 @@ std::string Backtrace::GetFunctionName(uintptr_t pc, uintptr_t* offset, const ba
  if (map->start == 0 || (map->flags & PROT_DEVICE_MAP)) {
    return "";
  }
  std::string func_name = GetFunctionNameRaw(pc, offset);
  return func_name;
  return demangle(GetFunctionNameRaw(pc, offset).c_str());
}

bool Backtrace::VerifyReadWordArgs(uintptr_t ptr, word_t* out_value) {