[Lldb-commits] [lldb] r172583 - in /lldb/trunk/tools/debugserver/source: DNB.cpp DNB.h MacOSX/MachProcess.cpp MacOSX/MachProcess.h RNBRemote.cpp RNBRemote.h

Han Ming Ong hanming at apple.com
Tue Jan 15 16:46:39 PST 2013


Author: hanming
Date: Tue Jan 15 18:46:39 2013
New Revision: 172583

URL: http://llvm.org/viewvc/llvm-project?rev=172583&view=rev
Log:
<rdar://problem/13019628>

Prevent profiling from working on older debugserver. Just a simple renaming since the caller is prepared to handle the ‘unimplemented’ answer.

Modified:
    lldb/trunk/tools/debugserver/source/DNB.cpp
    lldb/trunk/tools/debugserver/source/DNB.h
    lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp
    lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.h
    lldb/trunk/tools/debugserver/source/RNBRemote.cpp
    lldb/trunk/tools/debugserver/source/RNBRemote.h

Modified: lldb/trunk/tools/debugserver/source/DNB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNB.cpp?rev=172583&r1=172582&r2=172583&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNB.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNB.cpp Tue Jan 15 18:46:39 2013
@@ -1229,12 +1229,12 @@
 }
 
 nub_bool_t
-DNBProcessSetAsyncEnableProfiling (nub_process_t pid, nub_bool_t enable, uint64_t interval_usec)
+DNBProcessSetEnableAsyncProfiling (nub_process_t pid, nub_bool_t enable, uint64_t interval_usec)
 {
     MachProcessSP procSP;
     if (GetProcessSP (pid, procSP))
     {
-        procSP->SetAsyncEnableProfiling(enable, interval_usec);
+        procSP->SetEnableAsyncProfiling(enable, interval_usec);
         return true;
     }
     

Modified: lldb/trunk/tools/debugserver/source/DNB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNB.h?rev=172583&r1=172582&r2=172583&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNB.h (original)
+++ lldb/trunk/tools/debugserver/source/DNB.h Tue Jan 15 18:46:39 2013
@@ -64,7 +64,7 @@
 nub_bool_t      DNBProcessMemoryDeallocate  (nub_process_t pid, nub_addr_t addr) DNB_EXPORT;
 int             DNBProcessMemoryRegionInfo  (nub_process_t pid, nub_addr_t addr, DNBRegionInfo *region_info) DNB_EXPORT;
 std::string     DNBProcessGetProfileData (nub_process_t pid) DNB_EXPORT;
-nub_bool_t      DNBProcessSetAsyncEnableProfiling   (nub_process_t pid, nub_bool_t enable, uint64_t interval_usec) DNB_EXPORT;
+nub_bool_t      DNBProcessSetEnableAsyncProfiling   (nub_process_t pid, nub_bool_t enable, uint64_t interval_usec) DNB_EXPORT;
 
 //----------------------------------------------------------------------
 // Process status

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp?rev=172583&r1=172582&r2=172583&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp Tue Jan 15 18:46:39 2013
@@ -308,7 +308,7 @@
 }
 
 void
-MachProcess::SetAsyncEnableProfiling(bool enable, uint64_t interval_usec)
+MachProcess::SetEnableAsyncProfiling(bool enable, uint64_t interval_usec)
 {
     m_profile_enabled = enable;
     m_profile_interval_usec = interval_usec;

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.h?rev=172583&r1=172582&r2=172583&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.h Tue Jan 15 18:46:39 2013
@@ -148,7 +148,7 @@
     //----------------------------------------------------------------------
     // Profile functions
     //----------------------------------------------------------------------
-    void                    SetAsyncEnableProfiling (bool enable, uint64_t internal_usec);
+    void                    SetEnableAsyncProfiling (bool enable, uint64_t internal_usec);
     bool                    IsProfilingEnabled () { return m_profile_enabled; }
     uint64_t                ProfileInterval () { return m_profile_interval_usec; }
     bool                    StartProfileThread ();

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=172583&r1=172582&r2=172583&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Tue Jan 15 18:46:39 2013
@@ -195,7 +195,7 @@
     t.push_back (Packet (deallocate_memory,             &RNBRemote::HandlePacket_DeallocateMemory, NULL, "_m", "Deallocate memory in the inferior process."));
     t.push_back (Packet (memory_region_info,            &RNBRemote::HandlePacket_MemoryRegionInfo, NULL, "qMemoryRegionInfo", "Return size and attributes of a memory region that contains the given address"));
     t.push_back (Packet (get_profile_data,              &RNBRemote::HandlePacket_GetProfileData, NULL, "qGetProfileData", "Return profiling data of the current target."));
-    t.push_back (Packet (set_enable_profiling,          &RNBRemote::HandlePacket_SetAsyncEnableProfiling, NULL, "QSetAsyncEnableProfiling", "Enable or disable the profiling of current target."));
+    t.push_back (Packet (set_enable_profiling,          &RNBRemote::HandlePacket_SetEnableAsyncProfiling, NULL, "QSetEnableAsyncProfiling", "Enable or disable the profiling of current target."));
     t.push_back (Packet (watchpoint_support_info,       &RNBRemote::HandlePacket_WatchpointSupportInfo, NULL, "qWatchpointSupportInfo", "Return the number of supported hardware watchpoints"));
 
 }
@@ -3512,15 +3512,15 @@
 }
 
 
-// QSetAsyncEnableProfiling;enable:[0|1]:interval_usec:XXXXXX;
+// QSetEnableAsyncProfiling;enable:[0|1]:interval_usec:XXXXXX;
 rnb_err_t
-RNBRemote::HandlePacket_SetAsyncEnableProfiling (const char *p)
+RNBRemote::HandlePacket_SetEnableAsyncProfiling (const char *p)
 {
     nub_process_t pid = m_ctx.ProcessID();
     if (pid == INVALID_NUB_PROCESS)
         return SendPacket ("");
 
-    StringExtractor packet(p += sizeof ("QSetAsyncEnableProfiling:") - 1);
+    StringExtractor packet(p += sizeof ("QSetEnableAsyncProfiling:") - 1);
     bool enable = false;
     uint64_t interval_usec = 0;
     std::string name;
@@ -3541,7 +3541,7 @@
     {
         enable = 0;
     }
-    DNBProcessSetAsyncEnableProfiling(pid, enable, interval_usec);
+    DNBProcessSetEnableAsyncProfiling(pid, enable, interval_usec);
     return SendPacket ("OK");
 }
 

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.h?rev=172583&r1=172582&r2=172583&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.h (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.h Tue Jan 15 18:46:39 2013
@@ -114,7 +114,7 @@
         sync_thread_state,              // 'QSyncThreadState:'
         memory_region_info,             // 'qMemoryRegionInfo:'
         get_profile_data,               // 'qGetProfileData'
-        set_enable_profiling,           // 'QSetAsyncEnableProfiling'
+        set_enable_profiling,           // 'QSetEnableAsyncProfiling'
         watchpoint_support_info,        // 'qWatchpointSupportInfo:'
         allocate_memory,                // '_M'
         deallocate_memory,              // '_m'
@@ -215,7 +215,7 @@
     rnb_err_t HandlePacket_DeallocateMemory (const char *p);
     rnb_err_t HandlePacket_MemoryRegionInfo (const char *p);
     rnb_err_t HandlePacket_GetProfileData(const char *p);
-    rnb_err_t HandlePacket_SetAsyncEnableProfiling(const char *p);
+    rnb_err_t HandlePacket_SetEnableAsyncProfiling(const char *p);
     rnb_err_t HandlePacket_WatchpointSupportInfo (const char *p);
 
     rnb_err_t HandlePacket_stop_process (const char *p);





More information about the lldb-commits mailing list