[Lldb-commits] [PATCH] D20312: Fix function name lookup in IRExecutionEngine.cpp.

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Thu May 19 13:37:14 PDT 2016

sas added a comment.

Ah yes, good idea not to use `AsCString()` here.

I think changing the `!=` to `==` is the right thing to do here because the bug was introduced in r263995:

  @@ -122,7 +125,7 @@ IRExecutionUnit::DisassembleFunction (Stream &stream,
       for (JittedFunction &function : m_jitted_functions)
  -        if (strstr(function.m_name.c_str(), m_name.AsCString()))
  +        if (function.m_name.AsCString() != m_name.AsCString())
               func_local_addr = function.m_local_addr;
               func_remote_addr = function.m_remote_addr;

The previous code was using `strstr` to check if the function names matched, but has been changed to `!=`; probably a typo assuming we were doing `strcmp` instead of `strstr`.

I'll wait for @Spyffe to confirm.


More information about the lldb-commits mailing list