summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/Linux
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2017-08-16 12:55:02 +0000
committerEd Maste <emaste@freebsd.org>2017-08-16 12:55:02 +0000
commit37c40af7127469754891ebc8f78439c2720f71cd (patch)
tree6559531793b89baca913816945534b0534783c5c /lldb/source/Plugins/Platform/Linux
parent9c5d64b901cf3b056edf17c9960ae54338a4bd52 (diff)
downloadbcm5719-llvm-37c40af7127469754891ebc8f78439c2720f71cd.tar.gz
bcm5719-llvm-37c40af7127469754891ebc8f78439c2720f71cd.zip
Make i386-*-freebsd expression work on JIT path
* Enable i386 ABI creation for freebsd * Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap syscall * Unlike linux, the last argument of mmap is actually 64-bit(off_t). This requires us to push an additional word for the higher order bits. * Prior to this change, ktrace dump will show mmap failures due to invalid argument coming from the 6th mmap argument. Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D34776 llvm-svn: 311002
Diffstat (limited to 'lldb/source/Plugins/Platform/Linux')
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp10
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.h6
2 files changed, 11 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index 0bf00ea3079..e26cdcd32aa 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -390,8 +390,10 @@ void PlatformLinux::CalculateTrapHandlerSymbolNames() {
m_trap_handlers.push_back(ConstString("_sigtramp"));
}
-uint64_t PlatformLinux::ConvertMmapFlagsToPlatform(const ArchSpec &arch,
- unsigned flags) {
+MmapArgList PlatformLinux::GetMmapArgumentList(const ArchSpec &arch,
+ addr_t addr, addr_t length,
+ unsigned prot, unsigned flags,
+ addr_t fd, addr_t offset) {
uint64_t flags_platform = 0;
uint64_t map_anon = MAP_ANON;
@@ -406,6 +408,8 @@ uint64_t PlatformLinux::ConvertMmapFlagsToPlatform(const ArchSpec &arch,
flags_platform |= MAP_PRIVATE;
if (flags & eMmapFlagsAnon)
flags_platform |= map_anon;
- return flags_platform;
+
+ MmapArgList args({addr, length, prot, flags_platform, fd, offset});
+ return args;
}
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
index bc7b723427f..50d721f7c07 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
@@ -59,8 +59,10 @@ public:
void CalculateTrapHandlerSymbolNames() override;
- uint64_t ConvertMmapFlagsToPlatform(const ArchSpec &arch,
- unsigned flags) override;
+ MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
+ lldb::addr_t length, unsigned prot,
+ unsigned flags, lldb::addr_t fd,
+ lldb::addr_t offset) override;
private:
DISALLOW_COPY_AND_ASSIGN(PlatformLinux);
OpenPOWER on IntegriCloud