Cleanup before kernel export refactor.
This commit is contained in:
@@ -34,7 +34,7 @@ uint32_t XKernelModule::GetProcAddressByOrdinal(uint16_t ordinal) {
|
||||
// Export (or its parent library) not found.
|
||||
return 0;
|
||||
}
|
||||
if (export->type == cpu::KernelExport::ExportType::Variable) {
|
||||
if (export->type == cpu::Export::Type::kVariable) {
|
||||
if (export->variable_ptr) {
|
||||
return export->variable_ptr;
|
||||
} else {
|
||||
|
||||
@@ -338,11 +338,11 @@ void XUserModule::Dump() {
|
||||
const xe_xex2_import_info_t* info = &import_infos[m];
|
||||
|
||||
if (kernel_state_->IsKernelModule(library->name)) {
|
||||
KernelExport* kernel_export =
|
||||
auto kernel_export =
|
||||
export_resolver->GetExportByOrdinal(library->name, info->ordinal);
|
||||
if (kernel_export) {
|
||||
known_count++;
|
||||
if (kernel_export->is_implemented) {
|
||||
if (kernel_export->is_implemented()) {
|
||||
impl_count++;
|
||||
} else {
|
||||
unimpl_count++;
|
||||
@@ -384,13 +384,13 @@ void XUserModule::Dump() {
|
||||
const char* name = "UNKNOWN";
|
||||
bool implemented = false;
|
||||
|
||||
KernelExport* kernel_export = nullptr;
|
||||
Export* kernel_export = nullptr;
|
||||
if (kernel_state_->IsKernelModule(library->name)) {
|
||||
kernel_export =
|
||||
export_resolver->GetExportByOrdinal(library->name, info->ordinal);
|
||||
if (kernel_export) {
|
||||
name = kernel_export->name;
|
||||
implemented = kernel_export->is_implemented;
|
||||
name = kernel_export->name.c_str();
|
||||
implemented = kernel_export->is_implemented();
|
||||
}
|
||||
} else {
|
||||
auto module = kernel_state_->GetModule(library->name);
|
||||
@@ -399,7 +399,7 @@ void XUserModule::Dump() {
|
||||
implemented = true;
|
||||
}
|
||||
}
|
||||
if (kernel_export && kernel_export->type == KernelExport::Variable) {
|
||||
if (kernel_export && kernel_export->type == Export::Type::kVariable) {
|
||||
printf(" V %.8X %.3X (%3d) %s %s\n", info->value_address,
|
||||
info->ordinal, info->ordinal, implemented ? " " : "!!", name);
|
||||
} else if (info->thunk_address) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* // Build the export table used for resolution.
|
||||
* #include "xenia/kernel/util/export_table_pre.inc"
|
||||
* static KernelExport my_module_export_table[] = {
|
||||
* static Export my_module_export_table[] = {
|
||||
* #include "xenia/kernel/my_module/my_module_table.inc"
|
||||
* };
|
||||
* #include "xenia/kernel/util/export_table_post.inc"
|
||||
@@ -23,11 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#define XE_EXPORT(module, ordinal, name, type, flags) \
|
||||
#define XE_EXPORT(module, ordinal, name, type) \
|
||||
{ \
|
||||
ordinal, \
|
||||
xe::cpu::KernelExport::type, \
|
||||
flags, \
|
||||
xe::cpu::Export::Type::type, \
|
||||
#name, \
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#define XE_EXPORT(module, ordinal, name, type, flags) \
|
||||
#define XE_EXPORT(module, ordinal, name, type) \
|
||||
name = ordinal
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ using PPCContext = xe::cpu::frontend::PPCContext;
|
||||
#define SHIM_CALL void _cdecl
|
||||
#define SHIM_SET_MAPPING(library_name, export_name, shim_data) \
|
||||
export_resolver->SetFunctionMapping( \
|
||||
library_name, ordinals::##export_name, shim_data, \
|
||||
library_name, ordinals::##export_name, \
|
||||
(xe::cpu::xe_kernel_export_shim_fn)export_name##_shim);
|
||||
|
||||
#define SHIM_MEM_BASE ppc_state->virtual_membase
|
||||
|
||||
@@ -42,7 +42,7 @@ void XamModule::RegisterExportTable(xe::cpu::ExportResolver* export_resolver) {
|
||||
|
||||
// Build the export table used for resolution.
|
||||
#include "xenia/kernel/util/export_table_pre.inc"
|
||||
static xe::cpu::KernelExport xam_export_table[] = {
|
||||
static xe::cpu::Export xam_export_table[] = {
|
||||
#include "xenia/kernel/xam_table.inc"
|
||||
};
|
||||
#include "xenia/kernel/util/export_table_post.inc"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -159,7 +159,7 @@ void XboxkrnlModule::RegisterExportTable(
|
||||
|
||||
// Build the export table used for resolution.
|
||||
#include "xenia/kernel/util/export_table_pre.inc"
|
||||
static xe::cpu::KernelExport xboxkrnl_export_table[] = {
|
||||
static xe::cpu::Export xboxkrnl_export_table[] = {
|
||||
#include "xenia/kernel/xboxkrnl_table.inc"
|
||||
};
|
||||
#include "xenia/kernel/util/export_table_post.inc"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user