There is a issue (llvm assertion) in evaluating expressions for MIPS on Linux.
(lldb) p fooptr(a,b)
lldb: /home/battarde/git/llvm/lib/MC/ELFObjectWriter.cpp:791: void {anonymous}::ELFObjectWriter::computeSymbolTable(llvm::MCAssembler&, const llvm::MCAsmLayout&, const SectionIndexMapTy&, const RevGroupMapTy&, {anonymous}::ELFObjectWriter::SectionOffsetsTy&): Assertion `Local || !Symbol.isTemporary()' failed.
This issue is caused due to the dynamic checker function’s name (hard-coded in LLDB in lldb\source\Expression\IRDynamicChecks.cpp) that start with “$” i.e “$__lldb_valid_pointer_check”.
The symbol "$" has a special meaning for MIPS i.e it is marker for temporary symbols for MIPS.
The discussion on lldb mailing list regarding this issue is at : http://lists.llvm.org/pipermail/lldb-dev/2015-October/008692.html
This patch fixes this issue by using "_$" prefix instead of "$" in dymanic checker function’s name.
-Bhushan