41 uint32_t size = entity.
GetSize();
77 const bool zero_memory =
false;
79 const uint64_t malloc_size =
82 auto address_or_error = map.
Malloc(
83 malloc_size, 8, lldb::ePermissionsReadable | lldb::ePermissionsWritable,
85 if (!address_or_error) {
87 "couldn't allocate a memory area to store %s: %s",
89 toString(address_or_error.takeError()).c_str());
95 log,
"Allocated 0x%" PRIx64
"bytes for %s (0x%" PRIx64
") successfully",
112 map.
Leak(mem, leak_error);
138 "couldn't write {0} to the target: {1}",
152 live_valobj_sp.reset();
154 if (!deallocate_error.
Success()) {
156 "couldn't deallocate memory for %s: %s",
169 "EntityPersistentVariable::Materialize [address = {0:x}, m_name = "
170 "{1}, m_flags = {2:x}]",
198 "couldn't write the location of {0} to memory: {1}",
203 "no materialization happened for persistent variable {0}",
217 "EntityPersistentVariable::Dematerialize [address = {0:x}, m_name "
218 "= {1}, m_flags = {2}]",
219 (uint64_t)process_address +
m_offset,
247 "couldn't read the address of program-allocated variable %s: %s",
262 location <= frame_top) {
277 if (!live_valobj_sp) {
279 "couldn't find the memory area used to store %s",
284 lldb::addr_t mem = live_valobj_sp->GetValue().GetScalar().ULongLong();
286 if (live_valobj_sp->GetValue().GetValueAddressType() !=
289 "the address of the memory area for %s is in an incorrect format",
298 LLDB_LOGF(log,
"Dematerializing %s from 0x%" PRIx64
" (size = %llu)",
301 (
unsigned long long)llvm::expectedToOptional(
319 "couldn't read the contents of %s from memory: %s",
329 "no dematerialization happened for persistent variable {0}",
352 dump_stream.
Format(
"{0:x}: EntityPersistentVariable ({1})\n", load_addr,
363 dump_stream.
PutCString(
" <could not be read>\n");
380 dump_stream.
PutCString(
" <could not be read>\n");
394 dump_stream.
PutCString(
" <could not be read>\n");
418 *iter = std::make_unique<EntityPersistentVariable>(persistent_variable_sp,
421 (*iter)->SetOffset(ret);
446 "EntityVariable::Materialize [address = 0x%" PRIx64
447 ", m_variable_sp = %s]",
448 (uint64_t)load_addr,
GetName().GetCString());
459 "couldn't get a value object for variable {0}",
GetName());
463 Status valobj_error = valobj_sp->GetError().Clone();
465 if (valobj_error.
Fail()) {
467 "couldn't get the value of variable {0}: {1}",
GetName(),
475 valobj_sp->GetData(valobj_extractor, extract_error);
477 if (!extract_error.
Success()) {
479 "couldn't read contents of reference variable {0}: {1}",
GetName(),
492 "couldn't write the contents of reference variable {} to memory: "
499 valobj_sp->GetAddressOf(
false).address;
506 "couldn't write the address of variable {0} to memory: {1}",
510 }
else if (valobj_sp->HasNoStorage()) {
518 "couldn't write the address of variable {0} to memory: {1}",
525 valobj_sp->GetData(data, extract_error);
526 if (!extract_error.
Success()) {
528 "couldn't get the value of {0}: {1}",
GetName(),
535 "trying to create a temporary region for {0} but one exists",
541 llvm::expectedToOptional(
GetByteSize(scope)).value_or(0)) {
544 "the variable '{0}' has no location, "
545 "it may have been optimized out",
549 "size of variable {0} ({1}) is larger than the ValueObject's "
552 llvm::expectedToOptional(
GetByteSize(scope)).value_or(0),
559 if (!opt_bit_align) {
561 "can't get the type alignment for {0}",
GetName());
565 size_t byte_align = (*opt_bit_align + 7) / 8;
567 const bool zero_memory =
false;
568 if (
auto address_or_error = map.
Malloc(
570 lldb::ePermissionsReadable | lldb::ePermissionsWritable,
575 "couldn't allocate a temporary region for {0}: {1}",
GetName(),
576 toString(address_or_error.takeError()));
592 "couldn't write to the temporary region for {0}: {1}",
GetName(),
597 Status pointer_write_error;
600 pointer_write_error);
602 if (!pointer_write_error.
Success()) {
604 "couldn't write the address of the temporary region for {0}: {1}",
619 "EntityVariable::Dematerialize [address = {0:x}, m_variable_sp = {1}]",
620 (uint64_t)load_addr,
GetName());
632 "couldn't get a value object for variable {0}",
GetName());
642 llvm::expectedToOptional(valobj_sp->GetByteSize()).value_or(0),
645 if (!extract_error.
Success()) {
647 "couldn't get the data for variable {0}",
GetName());
651 bool actually_write =
true;
657 actually_write =
false;
663 if (actually_write) {
664 valobj_sp->SetData(data, set_error);
668 "couldn't write the new contents of {0} back into the variable",
680 "couldn't free the temporary region for {0}: {1}",
GetName(),
696 dump_stream.
Printf(
"0x%" PRIx64
": EntityVariable\n", load_addr);
710 dump_stream.
PutCString(
" <could not be read>\n");
727 dump_stream.
PutCString(
"Points to process memory:\n");
729 dump_stream.
PutCString(
"Temporary allocation:\n");
733 dump_stream.
PutCString(
" <could not be be found>\n");
741 dump_stream.
PutCString(
" <could not be read>\n");
786 virtual llvm::Expected<uint64_t>
797 virtual std::optional<size_t>
817 m_variable_sp->GetType()->GetForwardCompilerType().IsReferenceType();
827 llvm::Expected<uint64_t>
836 std::optional<size_t>
838 return m_variable_sp->GetType()->GetLayoutCompilerType().GetTypeBitAlign(
870 llvm::Expected<uint64_t>
873 return m_valobj_sp->GetCompilerType().GetByteSize(scope);
875 return llvm::createStringError(
"no value object");
885 std::optional<size_t>
888 return m_valobj_sp->GetCompilerType().GetTypeBitAlign(scope);
901 *iter = std::make_unique<EntityVariable>(variable_sp);
903 (*iter)->SetOffset(ret);
910 assert(valobj_provider);
912 *iter = std::make_unique<EntityValueObject>(name, std::move(valobj_provider));
914 (*iter)->SetOffset(ret);
936 "Trying to create a temporary region for the result "
947 auto byte_size_or_err =
m_type.GetByteSize(exe_scope);
948 if (!byte_size_or_err) {
952 auto byte_size = *byte_size_or_err;
954 std::optional<size_t> opt_bit_align =
m_type.GetTypeBitAlign(exe_scope);
955 if (!opt_bit_align) {
957 "can't get the alignment of type \"{0}\"",
m_type.GetTypeName());
961 size_t byte_align = (*opt_bit_align + 7) / 8;
963 const bool zero_memory =
true;
964 if (
auto address_or_error = map.
Malloc(
965 byte_size, byte_align,
966 lldb::ePermissionsReadable | lldb::ePermissionsWritable,
971 "couldn't allocate a temporary region for the result: %s",
972 toString(address_or_error.takeError()).c_str());
978 Status pointer_write_error;
981 pointer_write_error);
983 if (!pointer_write_error.
Success()) {
985 "couldn't write the address of the "
986 "temporary region for the result: %s",
1003 "Couldn't dematerialize a result variable: invalid "
1004 "execution context scope");
1016 "Couldn't dematerialize a result variable: couldn't "
1017 "read its address");
1025 "Couldn't dematerialize a result variable: no target");
1029 auto type_system_or_err =
1030 target_sp->GetScratchTypeSystemForLanguage(
m_type.GetMinimumLanguage());
1032 if (
auto error = type_system_or_err.takeError()) {
1034 "Couldn't dematerialize a result variable: "
1035 "couldn't get the corresponding type "
1037 llvm::toString(std::move(
error)).c_str());
1040 auto ts = *type_system_or_err;
1043 "Couldn't dematerialize a result variable: "
1044 "couldn't corresponding type system is "
1049 ts->GetPersistentExpressionState();
1051 if (!persistent_state) {
1053 "Couldn't dematerialize a result variable: "
1054 "corresponding type system doesn't handle persistent "
1068 "couldn't dematerialize a result variable: failed to make persistent "
1082 !(address >= frame_bottom && address < frame_top);
1090 ret->ValueUpdated();
1092 const size_t pvar_byte_size =
1093 llvm::expectedToOptional(ret->GetByteSize()).value_or(0);
1094 uint8_t *pvar_data = ret->GetValueBytes();
1096 map.
ReadMemory(pvar_data, address, pvar_byte_size, read_error);
1100 "Couldn't dematerialize a result variable: couldn't read its memory");
1122 Log *log)
override {
1127 dump_stream.
Printf(
"0x%" PRIx64
": EntityResultVariable\n", load_addr);
1141 dump_stream.
PutCString(
" <could not be read>\n");
1158 dump_stream.
PutCString(
"Points to process memory:\n");
1160 dump_stream.
PutCString(
"Temporary allocation:\n");
1164 dump_stream.
PutCString(
" <could not be be found>\n");
1172 dump_stream.
PutCString(
" <could not be read>\n");
1209 bool is_program_reference,
1210 bool keep_in_memory,
1214 *iter = std::make_unique<EntityResultVariable>(type, is_program_reference,
1215 keep_in_memory, delegate);
1217 (*iter)->SetOffset(ret);
1235 LLDB_LOG(log,
"EntitySymbol::Materialize [address = {0:x}, m_symbol = {1}]",
1236 (uint64_t)load_addr,
m_symbol.GetName());
1251 "couldn't resolve symbol {0} because there is no target",
1261 Status pointer_write_error;
1265 if (!pointer_write_error.
Success()) {
1267 "couldn't write the address of symbol {0}: {1}",
m_symbol.GetName(),
1281 "EntitySymbol::Dematerialize [address = {0:x}, m_symbol = {1}]",
1282 (uint64_t)load_addr,
m_symbol.GetName());
1288 Log *log)
override {
1295 dump_stream.
Format(
"{0:x}: EntitySymbol ({1})\n", load_addr,
1306 dump_stream.
PutCString(
" <could not be read>\n");
1326 *iter = std::make_unique<EntitySymbol>(symbol_sp);
1328 (*iter)->SetOffset(ret);
1348 "EntityRegister::Materialize [address = 0x%" PRIx64
1349 ", m_register_info = %s]",
1354 if (!frame_sp.get()) {
1356 "couldn't materialize register %s without a stack frame",
1371 "data for register %s had size %llu but we expected %llu",
1392 "couldn't write the contents of register %s: %s",
1406 "EntityRegister::Dematerialize [address = 0x%" PRIx64
1407 ", m_register_info = %s]",
1414 if (!frame_sp.get()) {
1416 "couldn't dematerialize register %s without a stack frame",
1426 if (!extract_error.
Success()) {
1447 if (!reg_context_sp->WriteRegister(&
m_register_info, register_value)) {
1455 Log *log)
override {
1462 dump_stream.
Printf(
"0x%" PRIx64
": EntityRegister (%s)\n", load_addr,
1473 dump_stream.
PutCString(
" <could not be read>\n");
1495 *iter = std::make_unique<EntityRegister>(register_info);
1497 (*iter)->SetOffset(ret);
1504 if (dematerializer_sp)
1505 dematerializer_sp->Wipe();
1517 if (dematerializer_sp) {
1531 entity_up->Materialize(frame_sp, map, process_address,
error);
1533 if (!
error.Success())
1540 "Materializer::Materialize (frame_sp = %p, process_address = 0x%" PRIx64
1542 static_cast<void *
>(frame_sp.get()), process_address);
1544 entity_up->DumpToLog(map, process_address, log);
1559 frame_sp = thread_sp->GetFrameWithStackID(
m_stack_id);
1563 exe_scope =
m_map->GetBestExecutionContextScope();
1567 "Couldn't dematerialize: invalid dematerializer");
1575 "Materializer::Dematerialize (frame_sp = %p, process_address "
1576 "= 0x%" PRIx64
") about to dematerialize:",
1584 frame_bottom,
error);
1586 if (!
error.Success())
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_LOGF(log,...)
static constexpr uint32_t g_default_var_byte_size
static constexpr uint32_t g_default_var_alignment
static llvm::StringRef GetName(XcodeSDK::Type type)
Materializer::PersistentVariableDelegate * m_delegate
lldb::ExpressionVariableSP m_persistent_variable_sp
void DestroyAllocation(IRMemoryMap &map, Status &err)
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err) override
void MakeAllocation(IRMemoryMap &map, Status &err)
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Status &err) override
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
EntityPersistentVariable(lldb::ExpressionVariableSP &persistent_variable_sp, Materializer::PersistentVariableDelegate *delegate)
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err) override
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Status &err) override
RegisterInfo m_register_info
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
lldb::DataBufferSP m_register_contents
EntityRegister(const RegisterInfo ®ister_info)
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Status &err) override
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
Materializer::PersistentVariableDelegate * m_delegate
bool m_is_program_reference
This is used both to control whether this result entity can (and should) track the value in inferior ...
size_t m_temporary_allocation_size
EntityResultVariable(const CompilerType &type, bool is_program_reference, bool keep_in_memory, Materializer::PersistentVariableDelegate *delegate)
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err) override
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
lldb::addr_t m_temporary_allocation
EntitySymbol(const Symbol &symbol)
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err) override
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Status &err) override
ConstString GetName() const override
ValueObjectProviderTy m_valobj_provider
lldb::ValueObjectSP m_valobj_sp
bool LocationExpressionIsValid() const override
Returns 'true' if the location expression associated with this variable is valid.
std::optional< size_t > GetTypeBitAlign(ExecutionContextScope *scope) const override
Returns alignment of the type associated with this variable in bits.
llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *scope) const override
Returns size in bytes of the type associated with this variable.
lldb::ValueObjectSP SetupValueObject(ExecutionContextScope *scope) override
Creates and returns ValueObject tied to this variable and prepares Entity for materialization.
EntityValueObject(ConstString name, ValueObjectProviderTy provider)
lldb::DataBufferSP m_original_data
size_t m_temporary_allocation_size
lldb::addr_t m_temporary_allocation
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err) override
virtual ~EntityVariableBase()=default
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
virtual std::optional< size_t > GetTypeBitAlign(ExecutionContextScope *scope) const =0
Returns alignment of the type associated with this variable in bits.
virtual ConstString GetName() const =0
virtual bool LocationExpressionIsValid() const =0
Returns 'true' if the location expression associated with this variable is valid.
virtual lldb::ValueObjectSP SetupValueObject(ExecutionContextScope *scope)=0
Creates and returns ValueObject tied to this variable and prepares Entity for materialization.
virtual llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *scope) const =0
Returns size in bytes of the type associated with this variable.
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, lldb::addr_t frame_top, lldb::addr_t frame_bottom, Status &err) override
ConstString GetName() const override
std::optional< size_t > GetTypeBitAlign(ExecutionContextScope *scope) const override
Returns alignment of the type associated with this variable in bits.
lldb::ValueObjectSP SetupValueObject(ExecutionContextScope *scope) override
Creates and returns ValueObject tied to this variable and prepares Entity for materialization.
bool LocationExpressionIsValid() const override
Returns 'true' if the location expression associated with this variable is valid.
lldb::VariableSP m_variable_sp
Variable that this entity is based on.
llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *scope) const override
Returns size in bytes of the type associated with this variable.
EntityVariable(lldb::VariableSP &variable_sp)
A section + offset based address class.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
lldb::addr_t GetFileAddress() const
Get the file address.
Generic representation of a type in a programming language.
A uniqued constant string class.
A subclass of DataBuffer that stores a data buffer on the heap.
lldb::offset_t GetByteSize() const override
Get the number of bytes in the data buffer.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
virtual lldb::StackFrameSP CalculateStackFrame()=0
virtual lldb::ProcessSP CalculateProcess()=0
virtual lldb::TargetSP CalculateTarget()=0
@ EVIsLLDBAllocated
This variable is resident in a location specifically allocated for it by LLDB in the target process.
@ EVNeedsFreezeDry
Copy from m_live_sp to m_frozen_sp during dematerialization.
@ EVNeedsAllocation
Space for this variable has yet to be allocated in the target process.
@ EVIsProgramReference
This variable is a reference to a (possibly invalid) area managed by the target program.
@ EVKeepInTarget
Keep the allocation after the expression is complete rather than freeze drying its contents and freei...
Encapsulates memory that may exist in the process but must also be available in the host process.
void Free(lldb::addr_t process_address, Status &error)
lldb::ByteOrder GetByteOrder()
llvm::Expected< lldb::addr_t > Malloc(size_t size, uint8_t alignment, uint32_t permissions, AllocationPolicy policy, bool zero_memory, AllocationPolicy *used_policy=nullptr)
void ReadPointerFromMemory(lldb::addr_t *address, lldb::addr_t process_address, Status &error)
ExecutionContextScope * GetBestExecutionContextScope() const
void GetMemoryData(DataExtractor &extractor, lldb::addr_t process_address, size_t size, Status &error)
uint32_t GetAddressByteSize()
void WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t pointer, Status &error)
void WriteScalarToMemory(lldb::addr_t process_address, Scalar &scalar, size_t size, Status &error)
void Leak(lldb::addr_t process_address, Status &error)
void WriteMemory(lldb::addr_t process_address, const uint8_t *bytes, size_t size, Status &error)
void ReadMemory(uint8_t *bytes, lldb::addr_t process_address, size_t size, Status &error)
@ eAllocationPolicyMirror
The intent is that this allocation exist both in the host and the process and have the same content i...
void PutString(llvm::StringRef str)
Materializer * m_materializer
void Dematerialize(Status &err, lldb::addr_t frame_top, lldb::addr_t frame_bottom)
lldb::ThreadWP m_thread_wp
lldb::addr_t m_process_address
virtual ~PersistentVariableDelegate()
PersistentVariableDelegate()
uint32_t AddResultVariable(const CompilerType &type, bool is_lvalue, bool keep_in_memory, PersistentVariableDelegate *delegate, Status &err)
uint32_t AddStructMember(Entity &entity)
std::unique_ptr< Entity > EntityUP
std::shared_ptr< Dematerializer > DematerializerSP
DematerializerSP Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Status &err)
uint32_t AddSymbol(const Symbol &symbol_sp, Status &err)
uint32_t AddRegister(const RegisterInfo ®ister_info, Status &err)
DematerializerWP m_dematerializer_wp
uint32_t AddValueObject(ConstString name, ValueObjectProviderTy valobj_provider, Status &err)
Create entity from supplied ValueObject and count it as a member of the materialized struct.
uint32_t AddPersistentVariable(lldb::ExpressionVariableSP &persistent_variable_sp, PersistentVariableDelegate *delegate, Status &err)
uint32_t AddVariable(lldb::VariableSP &variable_sp, Status &err)
uint32_t m_current_offset
uint32_t m_struct_alignment
virtual lldb::ExpressionVariableSP CreatePersistentVariable(const lldb::ValueObjectSP &valobj_sp)=0
virtual ConstString GetNextPersistentVariableName(bool is_error=false)=0
Return a new persistent variable name with the specified prefix.
uint32_t GetAsMemoryData(const RegisterInfo ®_info, void *dst, uint32_t dst_len, lldb::ByteOrder dst_byte_order, Status &error) const
uint32_t GetByteSize() const
void Clear()
Clear the object state.
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
bool Fail() const
Test for error condition.
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
bool Success() const
Test for success condition.
llvm::StringRef GetString() const
void Format(const char *format, Args &&... args)
Forwards the arguments to llvm::formatv and writes to the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS, ValueObjectManager *manager=nullptr)
These routines create ValueObjectConstResult ValueObjects from various data sources.
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp)
uint8_t * GetBytes()
Get a pointer to the data.
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::function< lldb::ValueObjectSP(ConstString, StackFrame *)> ValueObjectProviderTy
Functor that returns a ValueObjectSP for a variable given its name and the StackFrame of interest.
void DumpHexBytes(Stream *s, const void *src, size_t src_len, uint32_t bytes_per_line, lldb::addr_t base_addr)
@ eAddressTypeLoad
Address is an address as in the current target inferior process.
std::string toString(FormatterBytecode::OpCodes op)
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Variable > VariableSP
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Every register is described in detail including its name, alternate name (optional),...