@@ -396,11 +396,11 @@ class Process : public std::enable_shared_from_this<Process>,
396
396
return GetStaticBroadcasterClass ();
397
397
}
398
398
399
- // / A notification structure that can be used by clients to listen
400
- // / for changes in a process's lifetime.
401
- // /
402
- // / \see RegisterNotificationCallbacks (const Notifications&) @see
403
- // / UnregisterNotificationCallbacks (const Notifications&)
399
+ // / A notification structure that can be used by clients to listen
400
+ // / for changes in a process's lifetime.
401
+ // /
402
+ // / \see RegisterNotificationCallbacks (const Notifications&) @see
403
+ // / UnregisterNotificationCallbacks (const Notifications&)
404
404
typedef struct {
405
405
void *baton;
406
406
void (*initialize)(void *baton, Process *process);
@@ -771,7 +771,7 @@ class Process : public std::enable_shared_from_this<Process>,
771
771
// /
772
772
// / \return
773
773
// / The constant reference to the member m_image_tokens.
774
- const std::vector<lldb::addr_t >& GetImageTokens () { return m_image_tokens; }
774
+ const std::vector<lldb::addr_t > & GetImageTokens () { return m_image_tokens; }
775
775
776
776
// / Get the image information address for the current process.
777
777
// /
@@ -801,32 +801,32 @@ class Process : public std::enable_shared_from_this<Process>,
801
801
// / public clients.
802
802
virtual void WillPublicStop () {}
803
803
804
- // / Register for process and thread notifications.
805
- // /
806
- // / Clients can register notification callbacks by filling out a
807
- // / Process::Notifications structure and calling this function.
808
- // /
809
- // / \param[in] callbacks
810
- // / A structure that contains the notification baton and
811
- // / callback functions.
812
- // /
813
- // / \see Process::Notifications
804
+ // / Register for process and thread notifications.
805
+ // /
806
+ // / Clients can register notification callbacks by filling out a
807
+ // / Process::Notifications structure and calling this function.
808
+ // /
809
+ // / \param[in] callbacks
810
+ // / A structure that contains the notification baton and
811
+ // / callback functions.
812
+ // /
813
+ // / \see Process::Notifications
814
814
void RegisterNotificationCallbacks (const Process::Notifications &callbacks);
815
815
816
- // / Unregister for process and thread notifications.
817
- // /
818
- // / Clients can unregister notification callbacks by passing a copy of the
819
- // / original baton and callbacks in \a callbacks.
820
- // /
821
- // / \param[in] callbacks
822
- // / A structure that contains the notification baton and
823
- // / callback functions.
824
- // /
825
- // / \return
826
- // / Returns \b true if the notification callbacks were
827
- // / successfully removed from the process, \b false otherwise.
828
- // /
829
- // / \see Process::Notifications
816
+ // / Unregister for process and thread notifications.
817
+ // /
818
+ // / Clients can unregister notification callbacks by passing a copy of the
819
+ // / original baton and callbacks in \a callbacks.
820
+ // /
821
+ // / \param[in] callbacks
822
+ // / A structure that contains the notification baton and
823
+ // / callback functions.
824
+ // /
825
+ // / \return
826
+ // / Returns \b true if the notification callbacks were
827
+ // / successfully removed from the process, \b false otherwise.
828
+ // /
829
+ // / \see Process::Notifications
830
830
bool UnregisterNotificationCallbacks (const Process::Notifications &callbacks);
831
831
832
832
// ==================================================================
@@ -1592,14 +1592,13 @@ class Process : public std::enable_shared_from_this<Process>,
1592
1592
// Callback definition for read Memory in chunks
1593
1593
//
1594
1594
// Status, the status returned from ReadMemoryFromInferior
1595
- // DataBufferHeap, buffer with bytes potentially written to it
1595
+ // uint8_t*, pointer to the bytes read
1596
1596
// addr_t, the current_addr, start + bytes read so far.
1597
1597
// uint64_t bytes_to_read, the expected bytes read, this
1598
1598
// is important if it's a partial read
1599
1599
// uint64_t bytes_read_for_chunk, the actual count of bytes read for this
1600
1600
// chunk
1601
- typedef std::function<IterationAction(lldb_private::Status &,
1602
- lldb_private::DataBufferHeap &,
1601
+ typedef std::function<IterationAction(lldb_private::Status &, const void *,
1603
1602
lldb::addr_t , uint64_t , uint64_t )>
1604
1603
ReadMemoryChunkCallback;
1605
1604
@@ -1611,9 +1610,13 @@ class Process : public std::enable_shared_from_this<Process>,
1611
1610
// / A virtual load address that indicates where to start reading
1612
1611
// / memory from.
1613
1612
// /
1614
- // / \param[in] data
1615
- // / The data buffer heap to use to read the chunk. The chunk size
1616
- // / depends upon the byte size of the buffer.
1613
+ // / \param[out] buf
1614
+ // / A byte buffer that is at least \a chunk_size bytes long that
1615
+ // / will receive the memory bytes.
1616
+ // /
1617
+ // / \param[in] chunk_size
1618
+ // / The chunk size to use when reading, a local buffer will be created
1619
+ // / with a pointer passed to the callback
1617
1620
// /
1618
1621
// / \param[in] size
1619
1622
// / The number of bytes to read.
@@ -1628,8 +1631,9 @@ class Process : public std::enable_shared_from_this<Process>,
1628
1631
// / size, then this function will get called again with \a
1629
1632
// / vm_addr, \a buf, and \a size updated appropriately. Zero is
1630
1633
// / returned in the case of an error.
1631
- size_t ReadMemoryInChunks (lldb::addr_t vm_addr, DataBufferHeap &data,
1632
- size_t size, ReadMemoryChunkCallback callback);
1634
+ size_t ReadMemoryInChunks (lldb::addr_t vm_addr, void *buf,
1635
+ lldb::addr_t chunk_size, size_t size,
1636
+ ReadMemoryChunkCallback callback);
1633
1637
1634
1638
// / Read a NULL terminated C string from memory
1635
1639
// /
@@ -1944,8 +1948,7 @@ class Process : public std::enable_shared_from_this<Process>,
1944
1948
// /
1945
1949
// / \return
1946
1950
// / An error value.
1947
- virtual Status
1948
- GetMemoryRegions (lldb_private::MemoryRegionInfos ®ion_list);
1951
+ virtual Status GetMemoryRegions (lldb_private::MemoryRegionInfos ®ion_list);
1949
1952
1950
1953
// / Get the number of watchpoints supported by this target.
1951
1954
// /
@@ -2286,14 +2289,12 @@ class Process : public std::enable_shared_from_this<Process>,
2286
2289
// If we are waiting to stop that will return control to the user,
2287
2290
// then we also want to run SelectMostRelevantFrame, which is controlled
2288
2291
// by "select_most_relevant".
2289
- lldb::StateType
2290
- WaitForProcessToStop (const Timeout<std::micro> &timeout,
2291
- lldb::EventSP *event_sp_ptr = nullptr ,
2292
- bool wait_always = true ,
2293
- lldb::ListenerSP hijack_listener = lldb::ListenerSP(),
2294
- Stream *stream = nullptr , bool use_run_lock = true ,
2295
- SelectMostRelevant select_most_relevant =
2296
- DoNoSelectMostRelevantFrame);
2292
+ lldb::StateType WaitForProcessToStop (
2293
+ const Timeout<std::micro> &timeout, lldb::EventSP *event_sp_ptr = nullptr ,
2294
+ bool wait_always = true ,
2295
+ lldb::ListenerSP hijack_listener = lldb::ListenerSP(),
2296
+ Stream *stream = nullptr, bool use_run_lock = true,
2297
+ SelectMostRelevant select_most_relevant = DoNoSelectMostRelevantFrame);
2297
2298
2298
2299
uint32_t GetIOHandlerID () const { return m_iohandler_sync.GetValue (); }
2299
2300
@@ -2394,17 +2395,17 @@ class Process : public std::enable_shared_from_this<Process>,
2394
2395
2395
2396
void SetDynamicCheckers (DynamicCheckerFunctions *dynamic_checkers);
2396
2397
2397
- // / Prune ThreadPlanStacks for unreported threads.
2398
- // /
2399
- // / \param[in] tid
2400
- // / The tid whose Plan Stack we are seeking to prune.
2401
- // /
2402
- // / \return
2403
- // / \b true if the TID is found or \b false if not.
2404
- bool PruneThreadPlansForTID (lldb::tid_t tid);
2398
+ // / Prune ThreadPlanStacks for unreported threads.
2399
+ // /
2400
+ // / \param[in] tid
2401
+ // / The tid whose Plan Stack we are seeking to prune.
2402
+ // /
2403
+ // / \return
2404
+ // / \b true if the TID is found or \b false if not.
2405
+ bool PruneThreadPlansForTID (lldb::tid_t tid);
2405
2406
2406
- // / Prune ThreadPlanStacks for all unreported threads.
2407
- void PruneThreadPlans ();
2407
+ // / Prune ThreadPlanStacks for all unreported threads.
2408
+ void PruneThreadPlans ();
2408
2409
2409
2410
// / Find the thread plan stack associated with thread with \a tid.
2410
2411
// /
@@ -3093,7 +3094,7 @@ void PruneThreadPlans();
3093
3094
PreResumeCallbackAndBaton (PreResumeActionCallback in_callback,
3094
3095
void *in_baton)
3095
3096
: callback(in_callback), baton(in_baton) {}
3096
- bool operator == (const PreResumeCallbackAndBaton &rhs) {
3097
+ bool operator ==(const PreResumeCallbackAndBaton &rhs) {
3097
3098
return callback == rhs.callback && baton == rhs.baton ;
3098
3099
}
3099
3100
};
@@ -3114,26 +3115,26 @@ void PruneThreadPlans();
3114
3115
lldb::ListenerSP m_private_state_listener_sp; // This is the listener for the
3115
3116
// private state thread.
3116
3117
HostThread m_private_state_thread; // /< Thread ID for the thread that watches
3117
- // /internal state events
3118
+ // / internal state events
3118
3119
ProcessModID m_mod_id; // /< Tracks the state of the process over stops and
3119
- // /other alterations.
3120
+ // / other alterations.
3120
3121
uint32_t m_process_unique_id; // /< Each lldb_private::Process class that is
3121
- // /created gets a unique integer ID that
3122
- // /increments with each new instance
3122
+ // / created gets a unique integer ID that
3123
+ // / increments with each new instance
3123
3124
uint32_t m_thread_index_id; // /< Each thread is created with a 1 based index
3124
- // /that won't get re-used.
3125
+ // / that won't get re-used.
3125
3126
std::map<uint64_t , uint32_t > m_thread_id_to_index_id_map;
3126
3127
int m_exit_status; // /< The exit status of the process, or -1 if not set.
3127
3128
std::string m_exit_string; // /< A textual description of why a process exited.
3128
3129
std::mutex m_exit_status_mutex; // /< Mutex so m_exit_status m_exit_string can
3129
- // /be safely accessed from multiple threads
3130
+ // / be safely accessed from multiple threads
3130
3131
std::recursive_mutex m_thread_mutex;
3131
3132
ThreadList m_thread_list_real; // /< The threads for this process as are known
3132
- // /to the protocol we are debugging with
3133
+ // / to the protocol we are debugging with
3133
3134
ThreadList m_thread_list; // /< The threads for this process as the user will
3134
- // /see them. This is usually the same as
3135
+ // / see them. This is usually the same as
3135
3136
// /< m_thread_list_real, but might be different if there is an OS plug-in
3136
- // /creating memory threads
3137
+ // / creating memory threads
3137
3138
ThreadPlanStackMap m_thread_plans; // /< This is the list of thread plans for
3138
3139
// / threads in m_thread_list, as well as
3139
3140
// / threads we knew existed, but haven't
@@ -3142,16 +3143,16 @@ void PruneThreadPlans();
3142
3143
m_extended_thread_list; // /< Constituent for extended threads that may be
3143
3144
// / generated, cleared on natural stops
3144
3145
lldb::RunDirection m_base_direction; // /< ThreadPlanBase run direction
3145
- uint32_t m_extended_thread_stop_id; // /< The natural stop id when
3146
- // /extended_thread_list was last updated
3146
+ uint32_t m_extended_thread_stop_id; // /< The natural stop id when
3147
+ // / extended_thread_list was last updated
3147
3148
QueueList
3148
3149
m_queue_list; // /< The list of libdispatch queues at a given stop point
3149
3150
uint32_t m_queue_list_stop_id; // /< The natural stop id when queue list was
3150
- // /last fetched
3151
+ // / last fetched
3151
3152
StopPointSiteList<lldb_private::WatchpointResource>
3152
3153
m_watchpoint_resource_list; // /< Watchpoint resources currently in use.
3153
3154
std::vector<Notifications> m_notifications; // /< The list of notifications
3154
- // /that this process can deliver.
3155
+ // / that this process can deliver.
3155
3156
std::vector<lldb::addr_t > m_image_tokens;
3156
3157
StopPointSiteList<lldb_private::BreakpointSite>
3157
3158
m_breakpoint_site_list; // /< This is the list of breakpoint
0 commit comments