Index: snapshot/win/process_reader_win.h |
diff --git a/snapshot/win/process_reader_win.h b/snapshot/win/process_reader_win.h |
index ff687885b5483ec2126d451481ca867928c4e4f1..19b65853771a8fb9baba5c75be2d50a2e2ff70fa 100644 |
--- a/snapshot/win/process_reader_win.h |
+++ b/snapshot/win/process_reader_win.h |
@@ -27,6 +27,20 @@ namespace crashpad { |
//! \brief Accesses information about another process, identified by a HANDLE. |
class ProcessReaderWin { |
public: |
+ //! \brief Contains information about a thread that belongs to a process. |
+ struct Thread { |
+ Thread(); |
+ ~Thread() {} |
+ |
+ uint64_t id; |
+ uint32_t suspend_count; |
+ uint32_t priority_class; |
+ uint32_t priority; |
+ WinVMAddress teb; |
Mark Mentovai
2015/05/08 16:54:20
Reorder this for better packing: put the uint32s a
scottmg
2015/05/08 18:24:02
Done.
|
+ WinVMAddress stack_region_address; |
+ WinVMSize stack_region_size; |
+ }; |
+ |
ProcessReaderWin(); |
~ProcessReaderWin(); |
@@ -66,13 +80,21 @@ class ProcessReaderWin { |
//! \return `true` on success, `false` on failure, with a warning logged. |
bool CPUTimes(timeval* user_time, timeval* system_time) const; |
+ //! \return The threads that are in the process. The first element (at index |
+ //! `0`) corresponds to the main thread. |
+ const std::vector<Thread>& Threads(); |
Mark Mentovai
2015/05/08 16:54:20
#include <vector>
scottmg
2015/05/08 18:24:02
Done.
|
+ |
//! \return The modules loaded in the process. The first element (at index |
//! `0`) corresponds to the main executable. |
const std::vector<ProcessInfo::Module>& Modules(); |
private: |
+ //! Initializes the threads_ vector on behalf of Initialize(). |
Mark Mentovai
2015/05/08 16:54:20
This should be // or //! \brief. (But note that al
scottmg
2015/05/08 18:24:02
Done. Then removed.
|
+ void InitializeThreads(); |
+ |
HANDLE process_; |
ProcessInfo process_info_; |
+ std::vector<Thread> threads_; |
std::vector<ProcessInfo::Module> modules_; |
InitializationStateDcheck initialized_; |