Skip to content

Commit

Permalink
Update proccontrol/h/ProcessSet.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 8df3bff commit b239af3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
11 changes: 11 additions & 0 deletions docs/proccontrol/public/ProcessSet.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,26 @@ ProcessSet.h
.. cpp:member:: std::vector<std::string> envp
.. cpp:member:: std::map<int, int> fds
.. cpp:member:: ProcControlAPI::err_t error_ret

Set on return

.. cpp:member:: Process::ptr proc

Set on return


.. cpp:struct:: ProcessSet::AttachInfo

.. cpp:member:: Dyninst::PID pid
.. cpp:member:: std::string executable
.. cpp:member:: ProcControlAPI::err_t error_ret

Set on return

.. cpp:member:: Process::ptr proc

Set on return


.. cpp:class:: AddressSet

Expand Down
29 changes: 4 additions & 25 deletions proccontrol/h/ProcessSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ class PC_EXPORT ProcessSet : public boost::enable_shared_from_this<ProcessSet>
std::vector<std::string> argv;
std::vector<std::string> envp;
std::map<int, int> fds;
ProcControlAPI::err_t error_ret; //Set on return
Process::ptr proc; //Set on return
ProcControlAPI::err_t error_ret;
Process::ptr proc;
};
static ProcessSet::ptr createProcessSet(std::vector<CreateInfo> &cinfo);

struct AttachInfo {
Dyninst::PID pid;
std::string executable;
ProcControlAPI::err_t error_ret; //Set on return
Process::ptr proc; //Set on return
ProcControlAPI::err_t error_ret;
Process::ptr proc;
};
static ProcessSet::ptr attachProcessSet(std::vector<AttachInfo> &ainfo);

Expand Down Expand Up @@ -237,15 +237,9 @@ class PC_EXPORT ProcessSet : public boost::enable_shared_from_this<ProcessSet>
size_t erase(Process::const_ptr);
void clear();

/**
* Error management.
**/
ProcessSet::ptr getErrorSubset() const;
void getErrorSubsets(std::map<ProcControlAPI::err_t, ProcessSet::ptr> &err_sets) const;

/**
* Test state of processes
**/
bool anyTerminated() const;
bool anyExited() const;
bool anyCrashed() const;
Expand Down Expand Up @@ -275,9 +269,6 @@ class PC_EXPORT ProcessSet : public boost::enable_shared_from_this<ProcessSet>
bool temporaryDetach() const;
bool reAttach() const;

/**
* Memory management
**/
AddressSet::ptr mallocMemory(size_t size) const;
bool mallocMemory(size_t size, AddressSet::ptr location) const;
bool freeMemory(AddressSet::ptr addrs) const;
Expand All @@ -304,9 +295,6 @@ class PC_EXPORT ProcessSet : public boost::enable_shared_from_this<ProcessSet>
bool writeMemory(AddressSet::ptr addr, const void *buffer, size_t size) const;
bool writeMemory(std::multimap<Process::const_ptr, write_t> &addrs) const;

/**
* Breakpoints
**/
bool addBreakpoint(AddressSet::ptr addrs, Breakpoint::ptr bp) const;
bool rmBreakpoint(AddressSet::ptr addrs, Breakpoint::ptr bp) const;

Expand Down Expand Up @@ -399,18 +387,9 @@ class PC_EXPORT ThreadSet : public boost::enable_shared_from_this<ThreadSet> {
size_t erase(Thread::const_ptr t);
void clear();

/**
* Error management.
*
* Return the subset of threads that had any error on the last operation, or
* group them into subsets based on unique error codes.
**/
ThreadSet::ptr getErrorSubset() const;
void getErrorSubsets(std::map<ProcControlAPI::err_t, ThreadSet::ptr> &err_sets) const;

/**
* Query thread states
**/
bool allStopped() const;
bool allRunning() const;
bool allTerminated() const;
Expand Down

0 comments on commit b239af3

Please sign in to comment.