[Lldb-commits] [PATCH] D27088: [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPS
nitesh.jain created this revision. nitesh.jain added reviewers: clayborg, labath, zturner. nitesh.jain added subscribers: jaydeep, bhushan, slthakur, lldb-commits. In case of MIPS, the floating point register size is based on FR bit of status register(SR) (https://reviews.llvm.org/rL277343). In this patch, we update reg_info["bitsize"] based on SR.FR bit. https://reviews.llvm.org/D27088 Files: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py Index: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py === --- packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -12,6 +12,7 @@ from __future__ import print_function +import struct import unittest2 import gdbremote_testcase @@ -565,6 +566,26 @@ # Verify the response length. p_response = context.get("p_response") self.assertIsNotNone(p_response) +triple = lldb.DBG.GetSelectedPlatform().GetTriple() + +if re.match("^mips",triple): +if reg_info["name"] == "sr": +split_triple = triple.split("--",1) +if split_triple[0] == "mips64el" or split_triple == "mipsel": +# In case of little endian +# first decode the HEX ASCII bytes and then reverse it +# to get actual value of SR register +p_response = "".join(reversed([p_response[i:i+2] for i in range(0, + len(p_response),2)])) +# Check for SR.FR bit +# if SR.FR(26) == 0 && reg_info["format"] == "float" +# then reg_info["bitsize"] = 32 +sr_value = int(p_response,16) +flag = 1 +flag = (sr_value >> 26) & flag + +if reg_info["format"] == "float" and (flag != 1): +reg_info["bitsize"] = 32 self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8) # Increment loop Index: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py === --- packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -12,6 +12,7 @@ from __future__ import print_function +import struct import unittest2 import gdbremote_testcase @@ -565,6 +566,26 @@ # Verify the response length. p_response = context.get("p_response") self.assertIsNotNone(p_response) +triple = lldb.DBG.GetSelectedPlatform().GetTriple() + +if re.match("^mips",triple): +if reg_info["name"] == "sr": +split_triple = triple.split("--",1) +if split_triple[0] == "mips64el" or split_triple == "mipsel": +# In case of little endian +# first decode the HEX ASCII bytes and then reverse it +# to get actual value of SR register +p_response = "".join(reversed([p_response[i:i+2] for i in range(0, + len(p_response),2)])) +# Check for SR.FR bit +# if SR.FR(26) == 0 && reg_info["format"] == "float" +# then reg_info["bitsize"] = 32 +sr_value = int(p_response,16) +flag = 1 +flag = (sr_value >> 26) & flag + +if reg_info["format"] == "float" and (flag != 1): +reg_info["bitsize"] = 32 self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8) # Increment loop ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287862 - Remove \x13 (^S) character that was likely added by mistake.
Author: akuegel Date: Thu Nov 24 04:01:34 2016 New Revision: 287862 URL: http://llvm.org/viewvc/llvm-project?rev=287862&view=rev Log: Remove \x13 (^S) character that was likely added by mistake. r287386 added a \x13 character inside a string literal. Most likely this was by mistake, so remove it. Differential Revision: https://reviews.llvm.org/D26973 Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=287862&r1=287861&r2=287862&view=diff == --- lldb/trunk/source/Commands/CommandObjectThread.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectThread.cpp Thu Nov 24 04:01:34 2016 @@ -979,7 +979,7 @@ public: "current or specified thread. Stops when returning from " "the current function as a safety measure. " "The target line number(s) are given as arguments, and if more than one" -" is provided, stepping will stop when the first one is hit.", +" is provided, stepping will stop when the first one is hit.", nullptr, eCommandRequiresThread | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched | eCommandProcessMustBePaused), ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D27085: [LLDB][MIPS] Fix TestMultipleHits for MIPS
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Thank you. https://reviews.llvm.org/D27085 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D27088: [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPS
labath requested changes to this revision. labath added a comment. This revision now requires changes to proceed. Looks fine in principle, but please encapsulate this better. Comment at: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py:569 self.assertIsNotNone(p_response) +triple = lldb.DBG.GetSelectedPlatform().GetTriple() + Let's encapsulate the `if(mips)` dance in a separate function (`getExpectedBitsize(reg_info, reg_infos)`, for example) and not bloat the general function with it. https://reviews.llvm.org/D27088 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26676: Patch for lldb bug 26322 “core load hangs”
labath added a comment. It fails on the linux buildbot, but not when I run it locally. I am going to investigate the issue. https://reviews.llvm.org/D26676 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26676: Patch for lldb bug 26322 “core load hangs”
labath added a comment. Oh, you fixed it. Thank you. :) https://reviews.llvm.org/D26676 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26676: Patch for lldb bug 26322 “core load hangs”
hhellyer added a comment. @labath - Yes sorry about that. To be safe I did the "honest" thing of using arc to pull down the patch from phabriactor and then arc commit to land it to make sure I committed exactly what was reviewed. Somewhere in that it lost the contents of the core files and just created empty files for them. :-( https://reviews.llvm.org/D26676 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287864 - Introduce chrono to more gdb-remote functions
Author: labath Date: Thu Nov 24 04:54:49 2016 New Revision: 287864 URL: http://llvm.org/viewvc/llvm-project?rev=287864&view=rev Log: Introduce chrono to more gdb-remote functions Summary: This replaces the usage of raw integers with duration classes in the gdb-remote packet management functions. The values are still converted back to integers once they go into the generic Communication class -- that I am leaving to a separate change. The changes are mostly straight-forward (*), the only tricky part was representation of infinite timeouts. Currently, we use UINT32_MAX to denote infinite timeout. This is not well suited for duration classes, as they tend to do arithmetic on the values, and the identity of the MAX value can easily get lost (e.g. microseconds(seconds(UINT32_MAX)).count() != UINT32_MAX). We cannot use zero to represent infinity (as Listener classes do) because we already use it to do non-blocking polling reads. For this reason, I chose to have an explicit value for infinity. The way I achieved that is via llvm::Optional, and I think it reads quite natural. Passing llvm::None as "timeout" means "no timeout", while passing zero means "poll". The only tricky part is this breaks implicit conversions (seconds are implicitly convertible to microseconds, but Optional cannot be easily converted into Optional). For this reason I added a special class Timeout, inheriting from Optional, and enabling the necessary conversions one would normally expect. (*) The other tricky part was GDBRemoteCommunication::PopPacketFromQueue, which was needlessly complicated. I've simplified it, but that one is only used in non-stop mode, and so is untested. Reviewers: clayborg, zturner, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26971 Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp?rev=287864&r1=287863&r2=287864&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp Thu Nov 24 04:54:49 2016 @@ -20,8 +20,9 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::process_gdb_remote; +using namespace std::chrono; -static const std::chrono::seconds kInterruptTimeout(5); +static const seconds kInterruptTimeout(5); / // GDBRemoteClientBase // @@ -51,18 +52,13 @@ StateType GDBRemoteClientBase::SendConti OnRunPacketSent(true); for (;;) { -PacketResult read_result = ReadPacket( -response, - std::chrono::duration_cast(kInterruptTimeout) -.count(), -false); +PacketResult read_result = ReadPacket(response, kInterruptTimeout, false); switch (read_result) { case PacketResult::ErrorReplyTimeout: { std::lock_guard lock(m_mutex); if (m_async_count == 0) continue; - if (std::chrono::steady_clock::now() >= - m_interrupt_time + kInterruptTimeout) + if (steady_clock::now() >= m_interrupt_time + kInterruptTimeout) return eStateInvalid; } case PacketResult::Success: @@ -188,11 +184,7 @@ GDBRemoteClientBase::SendPacketAndWaitFo const size_t max_response_retries = 3; for (size_t i = 0; i < max_response_retries; ++i) { -packet_result = ReadPacket( -response, std::chrono::duration_cast( - GetPacketTimeout()) - .count(), -true); +packet_result = ReadPacket(response, GetPacketTimeout(), true); // Make sure we received a response if (packet_result != PacketResult::Success) return packet_result; @@ -232,7 +224,7 @@ bool GDBRemoteClientBase::SendvContPacke OnRunPacketSent(true); // wait for the response to the vCont - if (ReadPacket(response, UINT32_MAX, false) == PacketResult::Success) { + if (ReadPacket(response, llvm::None, false) == PacketResult::Success) { if (response.IsOKResponse()) return true; } @@ -254,8 +246,7 @@ bool GDBRemoteClientBase::ShouldStop(con // additional packet to make sure the packet sequence does not get // skewed. StringExtractorGDBRemote e
[Lldb-commits] [PATCH] D26971: Introduce chrono to more gdb-remote functions
This revision was automatically updated to reflect the committed changes. Closed by commit rL287864: Introduce chrono to more gdb-remote functions (authored by labath). Changed prior to commit: https://reviews.llvm.org/D26971?vs=79050&id=79203#toc Repository: rL LLVM https://reviews.llvm.org/D26971 Files: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp === --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -926,8 +926,8 @@ bool done = false; Error error; while (true) { -const PacketResult result = -GetPacketAndSendResponse(0, error, interrupt, done); +const PacketResult result = GetPacketAndSendResponse( +std::chrono::microseconds(0), error, interrupt, done); if (result == PacketResult::ErrorReplyTimeout) break; // No more packets in the queue Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h === --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -53,6 +53,29 @@ class ProcessGDBRemote; +template +class Timeout : public llvm::Optional> { +private: + template using Dur = std::chrono::duration; + template + using EnableIf = std::enable_if< + std::is_convertible, + std::chrono::duration>::value>; + + using Base = llvm::Optional>; + +public: + Timeout(llvm::NoneType none) : Base(none) {} + Timeout(const Timeout &other) = default; + + template ::type> + Timeout(const Timeout &other) + : Base(other ? Base(Dur(*other)) : llvm::None) {} + + template ::type> + Timeout(const Dur &other) : Base(Dur(other)) {} +}; + class GDBRemoteCommunication : public Communication { public: enum { @@ -226,16 +249,15 @@ PacketResult SendPacketNoLock(llvm::StringRef payload); PacketResult ReadPacket(StringExtractorGDBRemote &response, - uint32_t timeout_usec, bool sync_on_timeout); + Timeout timeout, bool sync_on_timeout); // Pop a packet from the queue in a thread safe manner PacketResult PopPacketFromQueue(StringExtractorGDBRemote &response, - uint32_t timeout_usec); + Timeout timeout); - PacketResult - WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote &response, - uint32_t timeout_usec, - bool sync_on_timeout); + PacketResult WaitForPacketNoLock(StringExtractorGDBRemote &response, + Timeout timeout, + bool sync_on_timeout); bool CompressionIsEnabled() { return m_compression_type != CompressionType::None; Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp === --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp @@ -20,8 +20,9 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::process_gdb_remote; +using namespace std::chrono; -static const std::chrono::seconds kInterruptTimeout(5); +static const seconds kInterruptTimeout(5); / // GDBRemoteClientBase // @@ -51,18 +52,13 @@ OnRunPacketSent(true); for (;;) { -PacketResult read_result = ReadPacket( -response, -std::chrono::duration_cast(kInterruptTimeout) -.count(), -false); +PacketResult read_result = ReadPacket(response, kInterruptTimeout, false); switch (read_result) { case PacketResult::ErrorReplyTimeout: { std::lock_guard lock(m_mutex); if (m_async_count == 0) continue; - if (std::chrono::steady_clock::now() >= - m_interrupt_time + kInterruptTimeout) + if (steady_clock::now() >= m_interrupt_time + kInterruptTimeout) return eStateInvalid; } case PacketResult::Success: @@ -188,11 +184,7 @@ const si
[Lldb-commits] [lldb] r287867 - Attempt to fix freebsd build after r287864
Author: labath Date: Thu Nov 24 05:22:43 2016 New Revision: 287867 URL: http://llvm.org/viewvc/llvm-project?rev=287867&view=rev Log: Attempt to fix freebsd build after r287864 the chrono library there uses long long as the underlying chrono type, but defines int64_t as long (or the other way around, I am not sure). In any case, this caused the implicit conversion to not trigger. This should address that. Also fix up the relevant unit test. Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.h Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h?rev=287867&r1=287866&r2=287867&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h Thu Nov 24 05:22:43 2016 @@ -57,9 +57,9 @@ template class Timeout : public llvm::Optional> { private: template using Dur = std::chrono::duration; - template + template using EnableIf = std::enable_if< - std::is_convertible, + std::is_convertible, std::chrono::duration>::value>; using Base = llvm::Optional>; @@ -68,12 +68,15 @@ public: Timeout(llvm::NoneType none) : Base(none) {} Timeout(const Timeout &other) = default; - template ::type> + template ::type> Timeout(const Timeout &other) : Base(other ? Base(Dur(*other)) : llvm::None) {} - template ::type> - Timeout(const Dur &other) : Base(Dur(other)) {} + template ::type> + Timeout(const std::chrono::duration &other) + : Base(Dur(other)) {} }; class GDBRemoteCommunication : public Communication { Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.h?rev=287867&r1=287866&r2=287867&view=diff == --- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.h (original) +++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.h Thu Nov 24 05:22:43 2016 @@ -36,10 +36,9 @@ struct MockServer : public GDBRemoteComm } PacketResult GetPacket(StringExtractorGDBRemote &response) { -const unsigned timeout_usec = 100; // 1s const bool sync_on_timeout = false; -return WaitForPacketWithTimeoutMicroSecondsNoLock(response, timeout_usec, - sync_on_timeout); +return WaitForPacketNoLock(response, std::chrono::seconds(1), + sync_on_timeout); } using GDBRemoteCommunicationServer::SendOKResponse; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287879 - Use chrono in AdbClient
Author: labath Date: Thu Nov 24 08:03:57 2016 New Revision: 287879 URL: http://llvm.org/viewvc/llvm-project?rev=287879&view=rev Log: Use chrono in AdbClient This refactors the class implementations to use chrono. I'll follow this up with a refactor of the class interface. Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Plugins/Platform/Android/AdbClient.h Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=287879&r1=287878&r2=287879&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Thu Nov 24 08:03:57 2016 @@ -41,10 +41,11 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::platform_android; +using namespace std::chrono; namespace { -const std::chrono::seconds kReadTimeout(8); +const seconds kReadTimeout(8); const char *kOKAY = "OKAY"; const char *kFAIL = "FAIL"; const char *kDATA = "DATA"; @@ -64,7 +65,6 @@ const char *kSocketNamespaceAbstract = " const char *kSocketNamespaceFileSystem = "localfilesystem"; Error ReadAllBytes(Connection &conn, void *buffer, size_t size) { - using namespace std::chrono; Error error; ConnectionStatus status; @@ -263,23 +263,22 @@ Error AdbClient::ReadMessage(std::vector } Error AdbClient::ReadMessageStream(std::vector &message, - uint32_t timeout_ms) { - auto start = std::chrono::steady_clock::now(); + milliseconds timeout) { + auto start = steady_clock::now(); message.clear(); Error error; lldb::ConnectionStatus status = lldb::eConnectionStatusSuccess; char buffer[1024]; while (error.Success() && status == lldb::eConnectionStatusSuccess) { -auto end = std::chrono::steady_clock::now(); -uint32_t elapsed_time = -std::chrono::duration_cast(end - start) -.count(); -if (elapsed_time >= timeout_ms) +auto end = steady_clock::now(); +auto elapsed = end - start; +if (elapsed >= timeout) return Error("Timed out"); -size_t n = m_conn->Read(buffer, sizeof(buffer), -1000 * (timeout_ms - elapsed_time), status, &error); +size_t n = m_conn->Read( +buffer, sizeof(buffer), +duration_cast(timeout - elapsed).count(), status, &error); if (n > 0) message.insert(message.end(), &buffer[0], &buffer[n]); } @@ -350,7 +349,7 @@ Error AdbClient::ReadAllBytes(void *buff return ::ReadAllBytes(*m_conn, buffer, size); } -Error AdbClient::internalShell(const char *command, uint32_t timeout_ms, +Error AdbClient::internalShell(const char *command, milliseconds timeout, std::vector &output_buf) { output_buf.clear(); @@ -368,7 +367,7 @@ Error AdbClient::internalShell(const cha if (error.Fail()) return error; - error = ReadMessageStream(output_buf, timeout_ms); + error = ReadMessageStream(output_buf, timeout); if (error.Fail()) return error; @@ -387,7 +386,7 @@ Error AdbClient::internalShell(const cha Error AdbClient::Shell(const char *command, uint32_t timeout_ms, std::string *output) { std::vector output_buffer; - auto error = internalShell(command, timeout_ms, output_buffer); + auto error = internalShell(command, milliseconds(timeout_ms), output_buffer); if (error.Fail()) return error; @@ -399,7 +398,7 @@ Error AdbClient::Shell(const char *comma Error AdbClient::ShellToFile(const char *command, uint32_t timeout_ms, const FileSpec &output_file_spec) { std::vector output_buffer; - auto error = internalShell(command, timeout_ms, output_buffer); + auto error = internalShell(command, milliseconds(timeout_ms), output_buffer); if (error.Fail()) return error; @@ -477,9 +476,7 @@ Error AdbClient::SyncService::internalPu return Error("Failed to send file chunk: %s", error.AsCString()); } error = SendSyncRequest( - kDONE, std::chrono::duration_cast( - FileSystem::GetModificationTime(local_file).time_since_epoch()) - .count(), + kDONE, llvm::sys::toTimeT(FileSystem::GetModificationTime(local_file)), nullptr); if (error.Fail()) return error; Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.h?rev=287879&r1=287878&r2=287879&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.h (original) +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.h Thu Nov 24 08:03:57 2016 @@ -10,21 +10,14 @@ #ifndef liblld
[Lldb-commits] [lldb] r287880 - Use more chrono in AdbClient
Author: labath Date: Thu Nov 24 08:11:47 2016 New Revision: 287880 URL: http://llvm.org/viewvc/llvm-project?rev=287880&view=rev Log: Use more chrono in AdbClient This refactors AdbClient interface in terms of std::chrono. Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Plugins/Platform/Android/AdbClient.h lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=287880&r1=287879&r2=287880&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Thu Nov 24 08:11:47 2016 @@ -383,10 +383,10 @@ Error AdbClient::internalShell(const cha return Error(); } -Error AdbClient::Shell(const char *command, uint32_t timeout_ms, +Error AdbClient::Shell(const char *command, milliseconds timeout, std::string *output) { std::vector output_buffer; - auto error = internalShell(command, milliseconds(timeout_ms), output_buffer); + auto error = internalShell(command, timeout, output_buffer); if (error.Fail()) return error; @@ -395,10 +395,10 @@ Error AdbClient::Shell(const char *comma return error; } -Error AdbClient::ShellToFile(const char *command, uint32_t timeout_ms, +Error AdbClient::ShellToFile(const char *command, milliseconds timeout, const FileSpec &output_file_spec) { std::vector output_buffer; - auto error = internalShell(command, milliseconds(timeout_ms), output_buffer); + auto error = internalShell(command, timeout, output_buffer); if (error.Fail()) return error; Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.h?rev=287880&r1=287879&r2=287880&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.h (original) +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.h Thu Nov 24 08:11:47 2016 @@ -94,9 +94,10 @@ public: Error DeletePortForwarding(const uint16_t local_port); - Error Shell(const char *command, uint32_t timeout_ms, std::string *output); + Error Shell(const char *command, std::chrono::milliseconds timeout, + std::string *output); - Error ShellToFile(const char *command, uint32_t timeout_ms, + Error ShellToFile(const char *command, std::chrono::milliseconds timeout, const FileSpec &output_file_spec); std::unique_ptr GetSyncService(Error &error); Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp?rev=287880&r1=287879&r2=287880&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Thu Nov 24 08:11:47 2016 @@ -28,6 +28,7 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::platform_android; +using namespace std::chrono; static uint32_t g_initialize_count = 0; static const unsigned int g_android_default_cache_size = @@ -230,7 +231,7 @@ Error PlatformAndroid::GetFile(const Fil char cmd[PATH_MAX]; snprintf(cmd, sizeof(cmd), "cat '%s'", source_file); - return adb.ShellToFile(cmd, 6 /* ms */, destination); + return adb.ShellToFile(cmd, minutes(1), destination); } Error PlatformAndroid::PutFile(const FileSpec &source, @@ -288,7 +289,7 @@ uint32_t PlatformAndroid::GetSdkVersion( std::string version_string; AdbClient adb(m_device_id); Error error = - adb.Shell("getprop ro.build.version.sdk", 5000 /* ms */, &version_string); + adb.Shell("getprop ro.build.version.sdk", seconds(5), &version_string); version_string = llvm::StringRef(version_string).trim().str(); if (error.Fail() || version_string.empty()) { @@ -327,7 +328,7 @@ Error PlatformAndroid::DownloadSymbolFil AdbClient adb(m_device_id); std::string tmpdir; Error error = adb.Shell("mktemp --directory --tmpdir /data/local/tmp", - 5000 /* ms */, &tmpdir); + seconds(5), &tmpdir); if (error.Fail() || tmpdir.empty()) return Error("Failed to generate temporary directory on the device (%s)", error.AsCString()); @@ -338,7 +339,7 @@ Error PlatformAndroid::DownloadSymbolFil tmpdir_remover(&tmpdir, [this, &adb](std::string *s) { StreamString command; command.Printf("rm -rf %s", s->c_str()); -Error error = adb.Shell(command.GetData(), 5000 /* ms */, nullptr)
[Lldb-commits] [lldb] r287881 - Enable WatchpointPythonCommandTestCase-test_continue_in_watchpoint_command
Author: labath Date: Thu Nov 24 08:41:36 2016 New Revision: 287881 URL: http://llvm.org/viewvc/llvm-project?rev=287881&view=rev Log: Enable WatchpointPythonCommandTestCase-test_continue_in_watchpoint_command This test passes consistently on linux, so I am removing the overall XFAIL. If it fails on your configuration, please put a targeted xfail instead (i'll add them my self if I get any breakage emails). Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py?rev=287881&r1=287880&r2=287881&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Thu Nov 24 08:41:36 2016 @@ -107,8 +107,6 @@ class WatchpointPythonCommandTestCase(Te @skipIfFreeBSD # timing out on buildbot @expectedFailureAll( -bugnumber="llvm.org/pr28055: continue in watchpoint commands disables the watchpoint, ") -@expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") # Watchpoints not supported ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287883 - Enable TestRegisterVariables for some configurations
Author: labath Date: Thu Nov 24 08:54:53 2016 New Revision: 287883 URL: http://llvm.org/viewvc/llvm-project?rev=287883&view=rev Log: Enable TestRegisterVariables for some configurations It consistently passes for linux-clang-i386, and linux-gcc-x86_64. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py?rev=287883&r1=287882&r2=287883&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py Thu Nov 24 08:54:53 2016 @@ -99,11 +99,8 @@ class RegisterVariableTestCase(TestBase) mydir = TestBase.compute_mydir(__file__) @expectedFailureAll(compiler="clang", compiler_version=['<', '3.5']) -@expectedFailureAll(compiler="clang", archs=["i386"]) -@expectedFailureAll( -compiler="gcc", compiler_version=[ -'>=', '4.8.2'], archs=[ -"i386", "x86_64"]) +@expectedFailureAll(compiler="gcc", compiler_version=[ +'>=', '4.8.2'], archs=["i386"]) def test_and_run_command(self): """Test expressions on register values.""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287884 - Enable TestBitfields on linux with clang
Author: labath Date: Thu Nov 24 09:03:31 2016 New Revision: 287884 URL: http://llvm.org/viewvc/llvm-project?rev=287884&view=rev Log: Enable TestBitfields on linux with clang The test has been passing for a while now. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=287884&r1=287883&r2=287884&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Thu Nov 24 09:03:31 2016 @@ -120,13 +120,6 @@ class BitfieldsTestCase(TestBase): # BitFields exhibit crashes in record layout on Windows # (http://llvm.org/pr21800) @skipIfWindows -@expectedFailureAll( -"llvm.org/pr27510", -oslist=["linux"], -compiler="clang", -compiler_version=[ -">=", -"3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287885 - Enable TestMultithreaded-sb_api_listener_event_process_state on linux/gcc
Author: labath Date: Thu Nov 24 09:10:15 2016 New Revision: 287885 URL: http://llvm.org/viewvc/llvm-project?rev=287885&view=rev Log: Enable TestMultithreaded-sb_api_listener_event_process_state on linux/gcc Passing consistently now. Modified: lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py Modified: lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py?rev=287885&r1=287884&r2=287885&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py Thu Nov 24 09:10:15 2016 @@ -52,14 +52,6 @@ class SBBreakpointCallbackCase(TestBase) # clang-cl does not support throw or catch (llvm.org/pr24538) @skipIfWindows @expectedFlakeyFreeBSD -@expectedFailureAll( -"llvm.org/pr23139", -oslist=["linux"], -compiler="gcc", -compiler_version=[ -">=", -"4.9"], -archs=["x86_64"]) def test_sb_api_listener_event_process_state(self): """ Test that a registered SBListener receives events when a process changes state. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287887 - Enable MiExecTestCase-test_lldbmi_exec_next_instruction
Author: labath Date: Thu Nov 24 09:16:07 2016 New Revision: 287887 URL: http://llvm.org/viewvc/llvm-project?rev=287887&view=rev Log: Enable MiExecTestCase-test_lldbmi_exec_next_instruction Test passes consistently, at least on linux. Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py?rev=287887&r1=287886&r2=287887&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py Thu Nov 24 09:16:07 2016 @@ -215,9 +215,6 @@ class MiExecTestCase(lldbmi_testcase.MiT @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races -@expectedFailureAll( -archs=["i[3-6]86"], -bugnumber="xfail to get buildbot green, failing config: i386 binary running on ubuntu 14.04 x86_64") def test_lldbmi_exec_next_instruction(self): """Test that 'lldb-mi --interpreter' works for instruction stepping.""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287893 - Fix TestMiExec.test_lldbmi_exec_next_instruction
Author: labath Date: Thu Nov 24 09:54:15 2016 New Revision: 287893 URL: http://llvm.org/viewvc/llvm-project?rev=287893&view=rev Log: Fix TestMiExec.test_lldbmi_exec_next_instruction The line numbers come out slightly differently when the test is run with gcc-4.9 as a compiler. The test probably should not depend on that, but that is a different story. Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py?rev=287893&r1=287892&r2=287893&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py Thu Nov 24 09:54:15 2016 @@ -252,7 +252,7 @@ class MiExecTestCase(lldbmi_testcase.MiT self.expect("\^running") # Depending on compiler, it can stop at different line self.expect( - "\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"(29|30)\"") + "\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"(28|29|30)\"") # Test that both --thread and --frame are optional self.runCmd("-exec-next-instruction") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287896 - Add a couple of tests for the Listener class
Author: labath Date: Thu Nov 24 11:10:10 2016 New Revision: 287896 URL: http://llvm.org/viewvc/llvm-project?rev=287896&view=rev Log: Add a couple of tests for the Listener class I'm considering doing some refactor there, so I am adding these to guard the current behavior. Added: lldb/trunk/unittests/Core/ListenerTest.cpp Modified: lldb/trunk/unittests/Core/CMakeLists.txt Modified: lldb/trunk/unittests/Core/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/CMakeLists.txt?rev=287896&r1=287895&r2=287896&view=diff == --- lldb/trunk/unittests/Core/CMakeLists.txt (original) +++ lldb/trunk/unittests/Core/CMakeLists.txt Thu Nov 24 11:10:10 2016 @@ -2,6 +2,7 @@ add_lldb_unittest(LLDBCoreTests ArchSpecTest.cpp BroadcasterTest.cpp DataExtractorTest.cpp + ListenerTest.cpp ScalarTest.cpp StructuredDataTest.cpp TimerTest.cpp Added: lldb/trunk/unittests/Core/ListenerTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/ListenerTest.cpp?rev=287896&view=auto == --- lldb/trunk/unittests/Core/ListenerTest.cpp (added) +++ lldb/trunk/unittests/Core/ListenerTest.cpp Thu Nov 24 11:10:10 2016 @@ -0,0 +1,114 @@ +//===-- ListenerTest.cpp *- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "gtest/gtest.h" + +#include "lldb/Core/Broadcaster.h" +#include "lldb/Core/Listener.h" +#include +#include + +using namespace lldb; +using namespace lldb_private; + +TEST(ListenerTest, GetNextEvent) { + EventSP event_sp; + Broadcaster broadcaster(nullptr, "test-broadcaster"); + + // Create a listener, sign it up, make sure it recieves an event. + ListenerSP listener_sp = Listener::MakeListener("test-listener"); + const uint32_t event_mask = 1; + ASSERT_EQ(event_mask, +listener_sp->StartListeningForEvents(&broadcaster, event_mask)); + + // Without any events sent, these should return false. + EXPECT_FALSE(listener_sp->GetNextEvent(event_sp)); + EXPECT_FALSE(listener_sp->GetNextEventForBroadcaster(nullptr, event_sp)); + EXPECT_FALSE(listener_sp->GetNextEventForBroadcaster(&broadcaster, event_sp)); + EXPECT_FALSE(listener_sp->GetNextEventForBroadcasterWithType( + &broadcaster, event_mask, event_sp)); + + // Now send events and make sure they get it. + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_TRUE(listener_sp->GetNextEvent(event_sp)); + + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_TRUE(listener_sp->GetNextEventForBroadcaster(nullptr, event_sp)); + + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_TRUE(listener_sp->GetNextEventForBroadcaster(&broadcaster, event_sp)); + + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_FALSE(listener_sp->GetNextEventForBroadcasterWithType( + &broadcaster, event_mask * 2, event_sp)); + EXPECT_TRUE(listener_sp->GetNextEventForBroadcasterWithType( + &broadcaster, event_mask, event_sp)); +} + +TEST(ListenerTest, WaitForEvent) { + EventSP event_sp; + Broadcaster broadcaster(nullptr, "test-broadcaster"); + + // Create a listener, sign it up, make sure it recieves an event. + ListenerSP listener_sp = Listener::MakeListener("test-listener"); + const uint32_t event_mask = 1; + ASSERT_EQ(event_mask, +listener_sp->StartListeningForEvents(&broadcaster, event_mask)); + + // Without any events sent, these should make a short wait and return false. + std::chrono::microseconds timeout(10); + EXPECT_FALSE(listener_sp->WaitForEvent(timeout, event_sp)); + EXPECT_FALSE( + listener_sp->WaitForEventForBroadcaster(timeout, nullptr, event_sp)); + EXPECT_FALSE( + listener_sp->WaitForEventForBroadcaster(timeout, &broadcaster, event_sp)); + EXPECT_FALSE(listener_sp->WaitForEventForBroadcasterWithType( + timeout, &broadcaster, event_mask, event_sp)); + + // Now send events and make sure they get it. + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_TRUE(listener_sp->WaitForEvent(timeout, event_sp)); + + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_TRUE( + listener_sp->WaitForEventForBroadcaster(timeout, nullptr, event_sp)); + + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_TRUE( + listener_sp->WaitForEventForBroadcaster(timeout, &broadcaster, event_sp)); + + broadcaster.BroadcastEvent(event_mask, nullptr); + EXPECT_FALSE(listener_sp->WaitForEventForBroadcasterWithType( + timeout, &broadcaster, event_mask * 2, event_sp)); + EXPECT_TRUE(listener_sp->WaitForEventForBroadcasterWithType( + timeout, &broadcaster, event_mask, event_sp)
[Lldb-commits] [PATCH] D25947: Merge Linux and FreeBSD arm64 register contexts
emaste added a comment. The tests are not in great shape on FreeBSD/arm64 today, but look roughly equivalent with and without this patch. At https://reviews.llvm.org/rL287887: === Test Result Summary === Test Methods: 1148 Reruns: 16 Success: 302 Expected Failure: 35 Failure: 80 Error:26 Exceptional Exit: 98 Unexpected Success:1 Skip:600 Timeout: 6 Expected Timeout: 0 With the patch applied: === Test Result Summary === Test Methods: 1147 Reruns: 16 Success: 299 Expected Failure: 35 Failure: 80 Error:26 Exceptional Exit:100 Unexpected Success:1 Skip:600 Timeout: 6 Expected Timeout: 0 https://reviews.llvm.org/D25947 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25947: Merge Linux and FreeBSD arm64 register contexts
emaste added a comment. In https://reviews.llvm.org/D25947#597160, @labath wrote: > Ed, if I may suggest, while you are playing with the arm machine, could you > grab us a core file or two? It'd be great to be able to do a basic sanity > check on these things without physical access. I used make-core.sh to create https://people.freebsd.org/~emaste/lldb/freebsd-arm64-core.txz https://reviews.llvm.org/D25947 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D27124: [LLDB][MIPS] Fix TestWatchpointIter failure
nitesh.jain created this revision. nitesh.jain added reviewers: clayborg, jingham, labath. nitesh.jain added subscribers: jaydeep, bhushan, slthakur, lldb-commits. In case of MIPS, the watchpoint exception occur before associated instruction is executed. When watchpoint hit , we first enable the Ephemeral mode and then disable the associated watchpoint. After single stepping, the associated watchpoint is enable and Ephemeral mode is turn off. Thus preserving watchpoint index. https://reviews.llvm.org/D27124 Files: source/Target/StopInfo.cpp Index: source/Target/StopInfo.cpp === --- source/Target/StopInfo.cpp +++ source/Target/StopInfo.cpp @@ -692,7 +692,9 @@ if (process_sp->GetWatchpointSupportInfo(num, wp_triggers_after) .Success()) { if (!wp_triggers_after) { -process_sp->DisableWatchpoint(wp_sp.get(), false); +Watchpoint *wp = wp_sp.get(); +wp->TurnOnEphemeralMode(); +process_sp->DisableWatchpoint(wp, false); StopInfoSP stored_stop_info_sp = thread_sp->GetStopInfo(); assert(stored_stop_info_sp.get() == this); @@ -710,7 +712,8 @@ process_sp->GetThreadList().SetSelectedThreadByID( thread_sp->GetID()); thread_sp->SetStopInfo(stored_stop_info_sp); -process_sp->EnableWatchpoint(wp_sp.get(), false); +process_sp->EnableWatchpoint(wp, false); +wp->TurnOffEphemeralMode(); } } } Index: source/Target/StopInfo.cpp === --- source/Target/StopInfo.cpp +++ source/Target/StopInfo.cpp @@ -692,7 +692,9 @@ if (process_sp->GetWatchpointSupportInfo(num, wp_triggers_after) .Success()) { if (!wp_triggers_after) { -process_sp->DisableWatchpoint(wp_sp.get(), false); +Watchpoint *wp = wp_sp.get(); +wp->TurnOnEphemeralMode(); +process_sp->DisableWatchpoint(wp, false); StopInfoSP stored_stop_info_sp = thread_sp->GetStopInfo(); assert(stored_stop_info_sp.get() == this); @@ -710,7 +712,8 @@ process_sp->GetThreadList().SetSelectedThreadByID( thread_sp->GetID()); thread_sp->SetStopInfo(stored_stop_info_sp); -process_sp->EnableWatchpoint(wp_sp.get(), false); +process_sp->EnableWatchpoint(wp, false); +wp->TurnOffEphemeralMode(); } } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits