Index: source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp =================================================================== --- source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp +++ source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp @@ -206,7 +206,7 @@ ABISysV_i386::CreateInstance(const ArchSpec &arch) { static ABISP g_abi_sp; if ((arch.GetTriple().getArch() == llvm::Triple::x86) && - arch.GetTriple().isOSLinux()) { + (arch.GetTriple().isOSLinux() || arch.GetTriple().isOSFreeBSD())) { if (!g_abi_sp) g_abi_sp.reset(new ABISysV_i386); return g_abi_sp; Index: source/Plugins/Process/Utility/InferiorCallPOSIX.cpp =================================================================== --- source/Plugins/Process/Utility/InferiorCallPOSIX.cpp +++ source/Plugins/Process/Utility/InferiorCallPOSIX.cpp @@ -89,7 +89,11 @@ process->GetTarget().GetScratchClangASTContext(); CompilerType clang_void_ptr_type = clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType(); - lldb::addr_t args[] = {addr, length, prot_arg, flags_arg, fd, offset}; + llvm::SmallVector args({ addr, length, prot_arg, + flags_arg, fd, offset }); + if (arch.GetTriple().getOS() == llvm::Triple::FreeBSD + && arch.GetTriple().getArch() == llvm::Triple::x86) + args.push_back(0); lldb::ThreadPlanSP call_plan_sp( new ThreadPlanCallFunction(*thread, mmap_range.GetBaseAddress(), clang_void_ptr_type, args, options));