Without this commit, when log enable lldb expr is enabled, the
disassembly of JIT'ed code is never displayed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
See inlined comments.
source/Expression/IRExecutionUnit.cpp | ||
---|---|---|
128 ↗ | (On Diff #57418) | If "function.m_name" is a lldb_private::ConstString and so it "m_name", then please do this comparison as: if (function.m_name == m_name) Check with Sean to see if changing != to == is the correct thing. |
Comment Actions
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.