libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
SystemCallItem.cxx
1// C++
2#include <ostream>
3
4// clues
5#include <clues/SystemCallItem.hxx>
6
7namespace clues {
8
9void SystemCallItem::fill(const Tracee &proc, const Word word) {
10 m_val = word;
11 processValue(proc);
12}
13
14std::string SystemCallItem::str() const {
15 // by default simply return the register value as a string
16 return std::to_string(cosmos::to_integral(m_val));
17}
18
19} // end ns
20
21std::ostream& operator<<(std::ostream &o, const clues::SystemCallItem &value) {
22 o << value.longName() << " = " << value.str();
23 return o;
24}
25
Base class for any kind of system call parameter or return value.
virtual std::string str() const
Returns a human readable string representation of the item.
virtual void processValue(const Tracee &)
Processes the value stored in m_val acc. to the actual item type.
std::string_view longName() const
Returns the friendly long name for this item, if available, else the short name.
Word m_val
The raw register value for the item.
void fill(const Tracee &proc, const Word word)
Fills the item from the given register data.
Base class for traced processes.
Definition Tracee.hxx:39
Word
An integer that is able to hold a word for the current architecture.
Definition types.hxx:38