Skip to content

Commit

Permalink
Update proccontrol/h/PlatFeatures.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent b239af3 commit 3967bbd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
26 changes: 26 additions & 0 deletions docs/proccontrol/developer/PlatFeatures.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,17 @@ modified and events are handled on demand by calling the appropriate
.. cpp:function:: static std::string getDefaultToolName()
.. cpp:function:: static priority_t getDefaultToolPriority()
.. cpp:function:: std::string getToolName() const

Tool name cannot be changed after process creation.

Use the static methods to set the default values, then trigger your attach/create operation.

.. cpp:function:: priority_t getToolPriority() const

Tool priority cannot be changed after process creation.

Use the static methods to set the default values, then trigger your attach/create operation.


.. cpp:type:: sigset_t dyn_sigset_t

Expand Down Expand Up @@ -358,6 +367,8 @@ modified and events are handled on demand by calling the appropriate
.. cpp:function:: std::string getFilename() const
.. cpp:function:: stat64_ptr getStatResults() const

Filled in by :cpp:func:`RemoteIO::getFileStatData`.

.. cpp:type:: std::multimap<Process::const_ptr, FileInfo> FileSet


Expand All @@ -367,12 +378,27 @@ modified and events are handled on demand by calling the appropriate
.. cpp:function:: RemoteIO(Process::ptr proc)
.. cpp:function:: virtual ~RemoteIO()
.. cpp:function:: FileSet *getFileSet(std::string filename) const

Construct filesets based on filenames, without doing a getFileNames

.. caution:: User is responsible for deleting the returned object.

.. cpp:function:: FileSet *getFileSet(const std::set<std::string> &filenames) const

Construct filesets based on filenames, without doing a getFileNames

.. caution:: User is responsible for deleting the returned object.

.. cpp:function:: bool addToFileSet(std::string filename, FileSet *fs) const
.. cpp:function:: bool getFileNames(FileSet *result) const
.. cpp:function:: bool getFileStatData(FileSet *fset) const

Get data as per a stat system call, fill in the :cpp:class:`FileInfo` objects.

.. cpp:function:: bool readFileContents(const FileSet *fset)

These are whole file reads and produce :cpp:class:`EventAsyncFileRead` callbacks.


.. cpp:class:: RemoteIOSet

Expand Down
19 changes: 6 additions & 13 deletions proccontrol/h/PlatFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ class PC_EXPORT FollowFork
public:

typedef enum {
None, //Fork tracking not available on this platform.
ImmediateDetach, //Do not even attach to forked children.
DisableBreakpointsDetach, //Remove inherited breakpoints from children, then detach.
Follow //Default. Attach and full control of forked children.
None,
ImmediateDetach,
DisableBreakpointsDetach,
Follow
} follow_t;

static void setDefaultFollowFork(follow_t f);
Expand Down Expand Up @@ -290,10 +290,7 @@ class PC_EXPORT MultiToolControl
static void setDefaultToolPriority(priority_t p);
static std::string getDefaultToolName();
static priority_t getDefaultToolPriority();

//Tool name and priority cannot be changed after process creation.
//To set these values, use the static methods to set the default,
// values, then trigger your attach/create operation.

std::string getToolName() const;
priority_t getToolPriority() const;
};
Expand Down Expand Up @@ -364,7 +361,7 @@ class FileInfo {
~FileInfo();

std::string getFilename() const;
stat64_ptr getStatResults() const; //Filled in by getFileStatData
stat64_ptr getStatResults() const;
};

typedef std::multimap<Process::const_ptr, FileInfo> FileSet;
Expand All @@ -377,18 +374,14 @@ class PC_EXPORT RemoteIO
RemoteIO(Process::ptr proc);
virtual ~RemoteIO();

//Construct filesets based on filenames, without doing a getFileNames
// User is responsible for 'delete'ing the FileSet when done.
FileSet *getFileSet(std::string filename) const;
FileSet *getFileSet(const std::set<std::string> &filenames) const;
bool addToFileSet(std::string filename, FileSet *fs) const;

bool getFileNames(FileSet *result) const;

//Get data as per a stat system call, fill in the FileInfo objects
bool getFileStatData(FileSet *fset) const;

//These are whole file reads and produce EventAsyncFileRead callbacks
bool readFileContents(const FileSet *fset);
};

Expand Down

0 comments on commit 3967bbd

Please sign in to comment.