[Lldb-commits] [PATCH] D34776: Make i386-*-freebsd expression work on JIT path
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 29 02:41:39 PDT 2017
labath added inline comments.
================
Comment at: source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:92
clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
- lldb::addr_t args[] = {addr, length, prot_arg, flags_arg, fd, offset};
+ llvm::SmallVector<lldb::addr_t, 6> args({ addr, length, prot_arg,
+ flags_arg, fd, offset });
----------------
It would be great if we could avoid OS-specific code in this file. That's what we have tried to do with the `Platform::ConvertMmapFlagsToPlatform` call (line 82), but it looks like it may not have been the right abstraction.
How about we replace the `ConvertMmapFlagsToPlatform` function (it's only used in this place) with a more generic `GetMmapArguments` call (returning a vector of args)? It can still do the MAP_ANON dance as before, but in the freebsd case it will do this additional append.
What do you think?
Repository:
rL LLVM
https://reviews.llvm.org/D34776
More information about the lldb-commits
mailing list