Symptoms
The lldb-310 and later revisions couldn’t disassemble and trace thumb code block correctly without full debug symbols.
Analyse
It’s must be a defect brought by the lldb-310, because the lldb-300 could handle thumb code block correctly without full debug symbols. It’s done by utilising the Function Starts data embedded in modern MachO file.
Resolution
Modify the code of Target::SetExecutableModule in Source/Target/Target.cpp in LLDB source tree. Do not clear the m_section_load_history, because embedded symbol parse phase needs section list of the executable which maintained by m_section_load_history. An empty section list will leads to misinterpreting some data.
Like this:
void
Target::SetExecutableModule (ModuleSP& executable_sp, bool get_dependent_files)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TARGET));
//ClearModules(false);
ModulesDidUnload (m_images, false);
//m_section_load_history.Clear();
m_images.Clear();
m_scratch_ast_context_ap.reset();
m_scratch_ast_source_ap.reset();
m_ast_importer_ap.reset();
if (executable_sp.get())
{ ... }
}