16#ifndef LIEF_MACHO_THREAD_COMMAND_H
17#define LIEF_MACHO_THREAD_COMMAND_H
56 std::unique_ptr<LoadCommand>
clone()
const override {
57 return std::unique_ptr<ThreadCommand>(
new ThreadCommand(*
this));
102 state_ = std::move(
state);
112 architecture_ = arch;
117 std::ostream&
print(std::ostream& os)
const override;
126 uint32_t flavor_ = 0;
129 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:130
TYPE
Definition LoadCommand.hpp:46
@ THREAD
Definition LoadCommand.hpp:51
@ UNIXTHREAD
Definition LoadCommand.hpp:52
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:87
ThreadCommand(const ThreadCommand ©)=default
void count(uint32_t count)
Definition ThreadCommand.hpp:108
void accept(Visitor &visitor) const override
friend class BinaryParser
Definition ThreadCommand.hpp:44
std::ostream & print(std::ostream &os) const override
static bool classof(const LoadCommand *cmd)
Definition ThreadCommand.hpp:119
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:101
void flavor(uint32_t flavor)
Definition ThreadCommand.hpp:105
ThreadCommand(const details::thread_command &cmd, Header::CPU_TYPE arch=Header::CPU_TYPE::ANY)
void architecture(Header::CPU_TYPE arch)
Definition ThreadCommand.hpp:111
ThreadCommand & operator=(const ThreadCommand ©)=default
span< uint8_t > state()
Definition ThreadCommand.hpp:91
~ThreadCommand() override=default
Header::CPU_TYPE architecture() const
The CPU architecture that is targeted by this ThreadCommand.
Definition ThreadCommand.hpp:80
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:75
std::unique_ptr< LoadCommand > clone() const override
Definition ThreadCommand.hpp:56
uint32_t flavor() const
Integer that defines a special flavor for the thread.
Definition ThreadCommand.hpp:68
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition endianness_support.hpp:60
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:41
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45