2#include <cosmos/formatting.hxx>
5#include <clues/format.hxx>
6#include <clues/items/io.hxx>
7#include <clues/Tracee.hxx>
9#include <clues/private/utils.hxx>
11namespace clues::item {
22 m_read_end = cosmos::FileNum{ends[0]};
23 m_write_end = cosmos::FileNum{ends[1]};
28 const auto ends_array = cosmos::sprintf(
"%d, %d",
29 cosmos::to_integral(m_read_end),
30 cosmos::to_integral(m_write_end));
31 return clues::format::pointer(asPtr(), ends_array);
33 return clues::format::pointer(asPtr());
38 BITFLAGS_FORMAT_START(m_flags);
40#define O_NOTIFICATION_PIPE O_EXCL
42 BITFLAGS_ADD(O_CLOEXEC);
43 BITFLAGS_ADD(O_DIRECT);
44 BITFLAGS_ADD(O_NONBLOCK);
55 BITFLAGS_ADD(O_NOTIFICATION_PIPE);
57 return BITFLAGS_STR();
OTHER valueAs() const
Helper to cast the strongly typed Word m_val to other strong enum types.
Base class for traced processes.
bool readStruct(const ForeignPtr addr, T &out) const
Reads a system call struct from the tracee's address space into out.
bool haveEnds() const
Returns whether valid read and write end file numbers are stored.
void updateData(const Tracee &proc) override
Called upon exit of the system call to update possible out parameters.
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.
std::string str() const override
Returns a human readable string representation of the item.