summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2014-07-10 04:39:13 +0000
committerTodd Fiala <todd.fiala@gmail.com>2014-07-10 04:39:13 +0000
commit202ecd26da6abd5d1a90ddef26023fc1048859b7 (patch)
tree6a6d0f1d8e9208dbc8e1e5b48c6d4f2542c83759 /lldb/source
parent7d2ffb549285b814da284cfced222c827bffa90f (diff)
downloadbcm5719-llvm-202ecd26da6abd5d1a90ddef26023fc1048859b7.tar.gz
bcm5719-llvm-202ecd26da6abd5d1a90ddef26023fc1048859b7.zip
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
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/DataFormatters/TypeFormat.cpp11
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp10
2 files changed, 16 insertions, 5 deletions
diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp
index 1648a16dd1b..0c62daf87bb 100644
--- a/lldb/source/DataFormatters/TypeFormat.cpp
+++ b/lldb/source/DataFormatters/TypeFormat.cpp
@@ -38,6 +38,9 @@ m_my_revision(0)
{
}
+TypeFormatImpl::~TypeFormatImpl ()
+{
+}
TypeFormatImpl_Format::TypeFormatImpl_Format (lldb::Format f,
const TypeFormatImpl::Flags& flags) :
@@ -46,6 +49,10 @@ m_format (f)
{
}
+TypeFormatImpl_Format::~TypeFormatImpl_Format ()
+{
+}
+
bool
TypeFormatImpl_Format::FormatObject (ValueObject *valobj,
std::string& dest) const
@@ -162,6 +169,10 @@ m_types()
{
}
+TypeFormatImpl_EnumType::~TypeFormatImpl_EnumType ()
+{
+}
+
bool
TypeFormatImpl_EnumType::FormatObject (ValueObject *valobj,
std::string& dest) const
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)
OpenPOWER on IntegriCloud