16#ifndef LIEF_MACHO_THREAD_COMMAND_H
17#define LIEF_MACHO_THREAD_COMMAND_H
57 std::unique_ptr<LoadCommand>
clone()
const override {
58 return std::make_unique<ThreadCommand>(*
this);
103 state_ = std::move(
state);
113 architecture_ = arch;
118 std::ostream&
print(std::ostream& os)
const override;
127 uint32_t flavor_ = 0;
130 std::vector<uint8_t> state_;
Class used to parse a single binary (i.e. non-FAT).
Definition BinaryParser.hpp:79
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:132
TYPE
Definition LoadCommand.hpp:47
@ THREAD
Definition LoadCommand.hpp:52
@ UNIXTHREAD
Definition LoadCommand.hpp:53
span< const uint8_t > state() const
The actual thread state as a vector of bytes. Depending on the architecture(), these data can be cast...
Definition ThreadCommand.hpp:88
ThreadCommand(const ThreadCommand ©)=default
void count(uint32_t count)
Definition ThreadCommand.hpp:109
void accept(Visitor &visitor) const override
friend class BinaryParser
Definition ThreadCommand.hpp:45
std::ostream & print(std::ostream &os) const override
static bool classof(const LoadCommand *cmd)
Definition ThreadCommand.hpp:120
ThreadCommand(uint32_t flavor, uint32_t count, Header::CPU_TYPE arch=Header::CPU_TYPE::ANY)
void state(std::vector< uint8_t > state)
Definition ThreadCommand.hpp:102
void flavor(uint32_t flavor)
Definition ThreadCommand.hpp:106
ThreadCommand(const details::thread_command &cmd, Header::CPU_TYPE arch=Header::CPU_TYPE::ANY)
void architecture(Header::CPU_TYPE arch)
Definition ThreadCommand.hpp:112
ThreadCommand & operator=(const ThreadCommand ©)=default
span< uint8_t > state()
Definition ThreadCommand.hpp:92
~ThreadCommand() override=default
Header::CPU_TYPE architecture() const
The CPU architecture that is targeted by this ThreadCommand.
Definition ThreadCommand.hpp:81
uint64_t pc() const
Return the initial Program Counter regardless of the underlying architecture. This value,...
uint32_t count() const
Size of the thread state data with 32-bits alignment.
Definition ThreadCommand.hpp:76
std::unique_ptr< LoadCommand > clone() const override
Definition ThreadCommand.hpp:57
uint32_t flavor() const
Integer that defines a special flavor for the thread.
Definition ThreadCommand.hpp:69
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45