From 202ecd26da6abd5d1a90ddef26023fc1048859b7 Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Thu, 10 Jul 2014 04:39:13 +0000 Subject: Fixes for broken Debian build - g++ 4.7 support. These fix the broken debian lldb build, which is using g++ 4.7.2. TypeFormat changes: 1. stopped using the C++11 "dtor = default;" construct. The generated default destructor in the two derived classes wanted them to have a different throws() semantic that was causing 4.7 to fail to generate it. I switched these to empty destructors defined in the .cpp file. 2. Switched the m_types map from an ordered map to an unordered_map. g++ 4.7's c++ library supports the C++11 emplace() used by TypeFormat but the same c++ library's map impl does not. Since TypeFormat didn't look like it depended on ordering in the map, I just switched it to a std::unordered_map. NativeProcessLinux - g++ 4.7 chokes on lexing the "<::" in static_cast<::pid_t>(wpid). g++ 4.8+ and clang are fine with it. I just put a space in between the "<" and the "::" and that cleared it up. llvm-svn: 212681 --- lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 46810778ea0..e472d92a125 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -263,9 +263,9 @@ namespace errno = 0; if (req == PTRACE_GETREGSET || req == PTRACE_SETREGSET) - result = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid), *(unsigned int *)addr, data); + result = ptrace(static_cast<__ptrace_request>(req), static_cast< ::pid_t>(pid), *(unsigned int *)addr, data); else - result = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid), addr, data); + result = ptrace(static_cast<__ptrace_request>(req), static_cast< ::pid_t>(pid), addr, data); if (log) log->Printf("ptrace(%s, %" PRIu64 ", %p, %p, %zu)=%lX called from file %s line %d", @@ -299,9 +299,9 @@ namespace long result = 0; errno = 0; if (req == PTRACE_GETREGSET || req == PTRACE_SETREGSET) - result = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid), *(unsigned int *)addr, data); + result = ptrace(static_cast<__ptrace_request>(req), static_cast< ::pid_t>(pid), *(unsigned int *)addr, data); else - result = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid), addr, data); + result = ptrace(static_cast<__ptrace_request>(req), static_cast< ::pid_t>(pid), addr, data); return result; } #endif @@ -1530,7 +1530,7 @@ NativeProcessLinux::Launch(LaunchArgs *args) goto FINISH; } - assert(WIFSTOPPED(status) && (wpid == static_cast<::pid_t> (pid)) && + assert(WIFSTOPPED(status) && (wpid == static_cast< ::pid_t> (pid)) && "Could not sync with inferior process."); if (log) -- cgit v1.2.3