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
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits