diff --git a/src/xenia/kernel/util/shim_utils.h b/src/xenia/kernel/util/shim_utils.h index 2b3845d1e..4c50abb82 100644 --- a/src/xenia/kernel/util/shim_utils.h +++ b/src/xenia/kernel/util/shim_utils.h @@ -319,6 +319,10 @@ using pointer_t = const shim::TypedPointerParam&; using dword_result_t = shim::Result; using pointer_result_t = shim::Result; +// Exported from kernel_state.cc. +KernelState* kernel_state(); +inline Memory* kernel_memory() { return kernel_state()->memory(); } + namespace shim { inline void AppendParam(StringBuffer* string_buffer, int_t param) { @@ -366,8 +370,8 @@ inline void AppendParam(StringBuffer* string_buffer, lpdouble_t param) { string_buffer->AppendFormat("(%G)", param.value()); } } -void AppendParam(StringBuffer* string_buffer, - pointer_t record) { +inline void AppendParam(StringBuffer* string_buffer, + pointer_t record) { string_buffer->AppendFormat("%.8X", record.guest_address()); if (record) { auto name_string = @@ -381,14 +385,14 @@ void AppendParam(StringBuffer* string_buffer, uint32_t(record->attributes)); } } -void AppendParam(StringBuffer* string_buffer, - pointer_t reg) { +inline void AppendParam(StringBuffer* string_buffer, + pointer_t reg) { string_buffer->AppendFormat("%.8X(%.8X, %.8X)", reg.guest_address(), static_cast(reg->notification_routine), static_cast(reg->priority)); } -void AppendParam(StringBuffer* string_buffer, - pointer_t record) { +inline void AppendParam(StringBuffer* string_buffer, + pointer_t record) { string_buffer->AppendFormat("%.8X(%.8X)", record.guest_address(), uint32_t(record->exception_code)); } @@ -515,10 +519,6 @@ using xe::cpu::ExportTag; #define DECLARE_XAM_EXPORT(name, tags) DECLARE_EXPORT(xam, name, tags) #define DECLARE_XBOXKRNL_EXPORT(name, tags) DECLARE_EXPORT(xboxkrnl, name, tags) -// Exported from kernel_state.cc. -KernelState* kernel_state(); -inline Memory* kernel_memory() { return kernel_state()->memory(); } - } // namespace kernel } // namespace xe