summaryrefslogtreecommitdiff
path: root/devel/llvm60/files/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'devel/llvm60/files/lldb')
-rw-r--r--devel/llvm60/files/lldb/patch-head-r332849.diff38
-rw-r--r--devel/llvm60/files/lldb/patch-head-r332965.diff22
2 files changed, 60 insertions, 0 deletions
diff --git a/devel/llvm60/files/lldb/patch-head-r332849.diff b/devel/llvm60/files/lldb/patch-head-r332849.diff
new file mode 100644
index 000000000000..ced3a7a80319
--- /dev/null
+++ b/devel/llvm60/files/lldb/patch-head-r332849.diff
@@ -0,0 +1,38 @@
+r332849 | emaste | 2018-04-21 02:34:46 +0200 (Sat, 21 Apr 2018) | 20 lines
+
+lldb: propagate error to user if memory read fails
+
+Previously, an attempt to read an unreadable access reported zeros:
+
+(lldb) memory read -format hex -size 8 0
+0x00000000: 0x0000000000000000 0x0000000000000000
+0x00000010: 0x0000000000000000 0x0000000000000000
+...
+
+Now, if DoReadMemory encounters error then return 0 (bytes read) so we
+report the error to the user:
+
+(lldb) memory read -format hex -size 8 0
+error: Bad address
+
+LLVM PR: 37190
+
+MFC after: 1 week
+Sponsored by: The FreeBSD Foundation
+
+Index: tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+===================================================================
+--- tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (revision 332848)
++++ tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (revision 332849)
+@@ -163,8 +163,10 @@ static size_t DoReadMemory(lldb::pid_t pid, lldb::
+ pi_desc.piod_addr = buf;
+ pi_desc.piod_len = size;
+
+- if (PTRACE(PT_IO, pid, (caddr_t)&pi_desc, 0) < 0)
++ if (PTRACE(PT_IO, pid, (caddr_t)&pi_desc, 0) < 0) {
+ error.SetErrorToErrno();
++ return 0;
++ }
+ return pi_desc.piod_len;
+ }
+
diff --git a/devel/llvm60/files/lldb/patch-head-r332965.diff b/devel/llvm60/files/lldb/patch-head-r332965.diff
new file mode 100644
index 000000000000..67e33f30e33a
--- /dev/null
+++ b/devel/llvm60/files/lldb/patch-head-r332965.diff
@@ -0,0 +1,22 @@
+r332965 | emaste | 2018-04-24 21:26:58 +0200 (Tue, 24 Apr 2018) | 8 lines
+
+lldb: remove assertion that target_arch is FreeBSD
+
+The target is not necessarily a FreeBSD binary - for example, it may be
+a Linux binary running under the linuxulator. Basic ptrace (live)
+debugging already worked in this case, except for the assertion.
+
+Sponsored by: Turing Robotic Industries Inc.
+
+Index: tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
+===================================================================
+--- tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp (revision 332964)
++++ tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp (revision 332965)
+@@ -169,7 +169,6 @@ lldb::RegisterContextSP FreeBSDThread::GetRegister
+ RegisterInfoInterface *reg_interface = NULL;
+ const ArchSpec &target_arch = GetProcess()->GetTarget().GetArchitecture();
+
+- assert(target_arch.GetTriple().getOS() == llvm::Triple::FreeBSD);
+ switch (target_arch.GetMachine()) {
+ case llvm::Triple::aarch64:
+ reg_interface = new RegisterInfoPOSIX_arm64(target_arch);