Commit 6276fb54 authored by Brendan Gregg's avatar Brendan Gregg Committed by Dan Xu

fix symbol translation #349

parent 94936573
...@@ -1497,7 +1497,7 @@ std::string BPFtrace::resolve_sym(uintptr_t addr, bool show_offset) ...@@ -1497,7 +1497,7 @@ std::string BPFtrace::resolve_sym(uintptr_t addr, bool show_offset)
if (!ksyms_) if (!ksyms_)
ksyms_ = bcc_symcache_new(-1, nullptr); ksyms_ = bcc_symcache_new(-1, nullptr);
if (bcc_symcache_resolve(ksyms_, addr, &sym)) if (bcc_symcache_resolve(ksyms_, addr, &sym) == 0)
{ {
symbol << sym.name; symbol << sym.name;
if (show_offset) if (show_offset)
...@@ -1630,7 +1630,7 @@ std::string BPFtrace::resolve_usym(uintptr_t addr, int pid, bool show_offset) ...@@ -1630,7 +1630,7 @@ std::string BPFtrace::resolve_usym(uintptr_t addr, int pid, bool show_offset)
psyms = pid_sym_[pid]; psyms = pid_sym_[pid];
} }
if (bcc_symcache_resolve(psyms, addr, &sym)) if (bcc_symcache_resolve(psyms, addr, &sym) == 0)
{ {
symbol << sym.name; symbol << sym.name;
if (show_offset) if (show_offset)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment