Fixed AppendParam for X_EX_TITLE_TERMINATE_REGISTRATION,
X_EXCEPTION_RECORD. Added AppendParam for X_OBJECT_ATTRIBUTES.
This commit is contained in:
parent
2d60d6f672
commit
4fc3bdf213
|
@ -366,6 +366,32 @@ inline void AppendParam(StringBuffer* string_buffer, lpdouble_t param) {
|
||||||
string_buffer->AppendFormat("(%G)", param.value());
|
string_buffer->AppendFormat("(%G)", param.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void AppendParam(StringBuffer* string_buffer,
|
||||||
|
pointer_t<X_OBJECT_ATTRIBUTES> record) {
|
||||||
|
string_buffer->AppendFormat("%.8X", record.guest_address());
|
||||||
|
if (record) {
|
||||||
|
auto name_string =
|
||||||
|
kernel_memory()->TranslateVirtual<X_ANSI_STRING*>(record->name_ptr);
|
||||||
|
std::string name =
|
||||||
|
name_string == nullptr
|
||||||
|
? "(null)"
|
||||||
|
: name_string->to_string(kernel_memory()->virtual_membase());
|
||||||
|
string_buffer->AppendFormat("(%.8X,%s,%.8X)",
|
||||||
|
uint32_t(record->root_directory), name.c_str(),
|
||||||
|
uint32_t(record->attributes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void AppendParam(StringBuffer* string_buffer,
|
||||||
|
pointer_t<X_EX_TITLE_TERMINATE_REGISTRATION> reg) {
|
||||||
|
string_buffer->AppendFormat("%.8X(%.8X, %.8X)", reg.guest_address(),
|
||||||
|
static_cast<uint32_t>(reg->notification_routine),
|
||||||
|
static_cast<uint32_t>(reg->priority));
|
||||||
|
}
|
||||||
|
void AppendParam(StringBuffer* string_buffer,
|
||||||
|
pointer_t<X_EXCEPTION_RECORD> record) {
|
||||||
|
string_buffer->AppendFormat("%.8X(%.8X)", record.guest_address(),
|
||||||
|
uint32_t(record->exception_code));
|
||||||
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void AppendParam(StringBuffer* string_buffer, pointer_t<T> param) {
|
void AppendParam(StringBuffer* string_buffer, pointer_t<T> param) {
|
||||||
string_buffer->AppendFormat("%.8X", param.guest_address());
|
string_buffer->AppendFormat("%.8X", param.guest_address());
|
||||||
|
|
|
@ -31,22 +31,6 @@ typedef struct {
|
||||||
} X_THREADNAME_INFO;
|
} X_THREADNAME_INFO;
|
||||||
static_assert_size(X_THREADNAME_INFO, 0x10);
|
static_assert_size(X_THREADNAME_INFO, 0x10);
|
||||||
|
|
||||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa363082.aspx
|
|
||||||
typedef struct {
|
|
||||||
xe::be<uint32_t> exception_code;
|
|
||||||
xe::be<uint32_t> exception_flags;
|
|
||||||
xe::be<uint32_t> exception_record;
|
|
||||||
xe::be<uint32_t> exception_address;
|
|
||||||
xe::be<uint32_t> number_parameters;
|
|
||||||
xe::be<uint32_t> exception_information[15];
|
|
||||||
} X_EXCEPTION_RECORD;
|
|
||||||
static_assert_size(X_EXCEPTION_RECORD, 0x50);
|
|
||||||
void AppendParam(StringBuffer* string_buffer,
|
|
||||||
pointer_t<X_EXCEPTION_RECORD> record) {
|
|
||||||
string_buffer->AppendFormat("%.8X(%.8X)", record.guest_address(),
|
|
||||||
uint32_t(record->exception_code));
|
|
||||||
}
|
|
||||||
|
|
||||||
void RtlRaiseException(pointer_t<X_EXCEPTION_RECORD> record) {
|
void RtlRaiseException(pointer_t<X_EXCEPTION_RECORD> record) {
|
||||||
if (record->exception_code == 0x406D1388) {
|
if (record->exception_code == 0x406D1388) {
|
||||||
// SetThreadName. FFS.
|
// SetThreadName. FFS.
|
||||||
|
|
|
@ -320,13 +320,6 @@ SHIM_CALL XexGetProcedureAddress_shim(PPCContext* ppc_context,
|
||||||
SHIM_SET_RETURN_32(result);
|
SHIM_SET_RETURN_32(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppendParam(StringBuffer* string_buffer,
|
|
||||||
pointer_t<X_EX_TITLE_TERMINATE_REGISTRATION> reg) {
|
|
||||||
string_buffer->AppendFormat("%.8X(%.8X, %.8X)", reg.guest_address(),
|
|
||||||
static_cast<uint32_t>(reg->notification_routine),
|
|
||||||
static_cast<uint32_t>(reg->priority));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ExRegisterTitleTerminateNotification(
|
void ExRegisterTitleTerminateNotification(
|
||||||
pointer_t<X_EX_TITLE_TERMINATE_REGISTRATION> reg, dword_t create) {
|
pointer_t<X_EX_TITLE_TERMINATE_REGISTRATION> reg, dword_t create) {
|
||||||
if (create) {
|
if (create) {
|
||||||
|
|
|
@ -385,6 +385,17 @@ struct X_OBJECT_ATTRIBUTES {
|
||||||
xe::be<uint32_t> attributes; // 0xC
|
xe::be<uint32_t> attributes; // 0xC
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa363082.aspx
|
||||||
|
typedef struct {
|
||||||
|
xe::be<uint32_t> exception_code;
|
||||||
|
xe::be<uint32_t> exception_flags;
|
||||||
|
xe::be<uint32_t> exception_record;
|
||||||
|
xe::be<uint32_t> exception_address;
|
||||||
|
xe::be<uint32_t> number_parameters;
|
||||||
|
xe::be<uint32_t> exception_information[15];
|
||||||
|
} X_EXCEPTION_RECORD;
|
||||||
|
static_assert_size(X_EXCEPTION_RECORD, 0x50);
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
} // namespace xe
|
} // namespace xe
|
||||||
|
|
Loading…
Reference in New Issue