aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-08-09 12:04:46 +0000
committerPavel Labath <labath@google.com>2016-08-09 12:04:46 +0000
commit8c1b6bd7d2ac9c4a1a017405959185978204c5d5 (patch)
treeec8abb4d98f22b4248087064de8b6532305a7b7b /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
parent0e0e07f436f939b844ada9671f7ce38e62ecb69b (diff)
downloadllvm-8c1b6bd7d2ac9c4a1a017405959185978204c5d5.zip
llvm-8c1b6bd7d2ac9c4a1a017405959185978204c5d5.tar.gz
llvm-8c1b6bd7d2ac9c4a1a017405959185978204c5d5.tar.bz2
Reapply "Rewrite gdb-remote's SendContinuePacketAndWaitForResponse"
Resumbitting the commit after fixing the following problems: - broken unit tests on windows: incorrect gtest usage on my part (TEST vs. TEST_F) - the new code did not correctly handle the case where we went to interrupt the process, but it stopped due to a different reason - the interrupt request would remain queued and would interfere with the following "continue". I also added a unit test for this case. This reapplies r277156 and r277139. llvm-svn: 278118
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index b974db6..0f41a21 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -43,7 +43,7 @@ namespace process_gdb_remote {
class ThreadGDBRemote;
-class ProcessGDBRemote : public Process
+class ProcessGDBRemote : public Process, private GDBRemoteClientBase::ContinueDelegate
{
public:
ProcessGDBRemote(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
@@ -273,6 +273,9 @@ public:
StructuredData::ObjectSP
GetSharedCacheInfo () override;
+ std::string
+ HarmonizeThreadIdsForProfileData(StringExtractorGDBRemote &inputStringExtractor);
+
protected:
friend class ThreadGDBRemote;
friend class GDBRemoteCommunicationClient;
@@ -485,12 +488,25 @@ private:
//------------------------------------------------------------------
// For ProcessGDBRemote only
//------------------------------------------------------------------
+ std::string m_partial_profile_data;
+ std::map<uint64_t, uint32_t> m_thread_id_to_used_usec_map;
+
static bool
NewThreadNotifyBreakpointHit (void *baton,
StoppointCallbackContext *context,
lldb::user_id_t break_id,
lldb::user_id_t break_loc_id);
+ //------------------------------------------------------------------
+ // ContinueDelegate interface
+ //------------------------------------------------------------------
+ void
+ HandleAsyncStdout(llvm::StringRef out) override;
+ void
+ HandleAsyncMisc(llvm::StringRef data) override;
+ void
+ HandleStopReply() override;
+
DISALLOW_COPY_AND_ASSIGN (ProcessGDBRemote);
};