14#include <cosmos/utils.hxx>
15#include <cosmos/fs/types.hxx>
31using TraceePtr = std::shared_ptr<Tracee>;
35using ProcessDataPtr = std::shared_ptr<ProcessData>;
38enum class Word : elf_greg_t {
53 RESTART_RESTARTBLOCK = 516,
107 explicit FDInfo(
const Type _type,
const cosmos::FileNum _fd) :
112 return type != Type::INVALID;
117 Type type = Type::INVALID;
118 cosmos::FileNum
fd = cosmos::FileNum::INVALID;
120 std::optional<cosmos::OpenMode> mode;
121 std::optional<cosmos::OpenFlags> flags;
This type contains data that is shared between tracees of the same thread group.
Base class for traced processes.
KernelErrno
Errno values that can appear in tracing context.
cosmos::NamedBool< struct attach_threads_t, true > AttachThreads
A strong boolean type denoting whether to automatically all other threads of a process.
@ X32
X86_64 with 32-bit pointers.
std::map< cosmos::FileNum, FDInfo > FDInfoMap
A mapping of file descriptor numbers to their file system paths or other human readable description o...
Base
Integer number display base for formatting purposes.
cosmos::NamedBool< struct follow_children_t, true > FollowChildren
A strong boolean type denoting whether to automatically attach to newly created child processes.
ForeignPtr
Strongly typed opaque pointer to tracee memory.
Word
An integer that is able to hold a word for the current architecture.
Contextual information about a file descriptor in a Tracee.
cosmos::FileNum fd
the actual file descriptor number.
Type
Different types of file descriptors.
@ BPF_PROG
refers to a BPF program validated and loaded
@ SIGNAL_FD
created by signalfd()
@ INOTIFY
created by inotify_init()
@ TIMER_FD
created by timerfd()
@ PID_FD
created by pidfd_open(), clone(), ...
@ SOCKET
created by socket()
@ EVENT_FD
created by eventfd()
@ FS_PATH
a path opened on the file system (this can still be a device special file, named pipe,...
@ EPOLL
an epoll() file descriptor
@ BPF_MAP
refers to a BPF type map
std::string path
path to the file, if applicable
std::optional< cosmos::Inode > inode
inode of the file, only filled by utils::get_fd_infos().