4#include <clues/items/items.hxx>
5#include <clues/SystemCallItem.hxx>
10class CLUES_API StringData :
14 const std::string_view short_name =
"string",
15 const std::string_view long_name = {},
20 std::string
str()
const override;
23 const std::optional<std::string>&
data()
const {
40 void fetch(
const Tracee &);
44 std::optional<std::string> m_str;
51class CLUES_API StringArrayData :
52 public PointerInValue {
55 explicit StringArrayData(
56 const std::string_view short_name =
"string-array",
57 const std::string_view long_name = {}) :
58 PointerInValue{short_name, long_name} {
61 std::string
str()
const override;
70 void processValue(
const Tracee &proc)
override;
72 template <
typename PTR>
73 void fetchPointers(
const Tracee &proc);
77 std::vector<std::string> m_strs;
SystemCallItem(const ItemType type, const std::string_view short_name={}, const std::string_view long_name={})
Constructs a new SystemCallItem.
Base class for traced processes.
const auto & data() const
Returns the unmodified string array data as a std::vector.
std::string str() const override
Returns a human readable string representation of the item.
void processValue(const Tracee &proc) override
Processes the value stored in m_val acc. to the actual item type.
const std::optional< std::string > & data() const
Returns the unmodified string data.
std::string str() const override
Returns a human readable string representation of the item.
void updateData(const Tracee &proc) override
Called upon exit of the system call to update possible out parameters.
ItemType
Basic type of a SystemCallItem.
@ PARAM_IN
An input parameter to the system call.