Skip to content

Debug and Profiling Export Symbols Problem #113

Description

@RadWolfie

I recently noticed that attempting to get the address of a kernel export function using either debug or profiling symbols will cause the console to reboot to the dashboard. I verified that using a known, existing kernel export function works properly. Additionally, I noticed that checking the function directly using a null check, such as ((void*) != NULL), always returns true.

Due to this issue with the official Xbox kernel, an alternative solution is needed. I can think of two possible solutions:

  1. Compile for the target console with additional exported tests (this will require multiple builds and preprocessor definitions).
  2. Bypass the official Xbox kernel restrictions by reading the kernel's data directly to allow this test suite to run with all exported tests.
    A. Use the kernel's base address directly and manually parse the export table to verify the symbol's existence (though this may cause compatibility conflicts with current emulators).
    B. Explore other unknown dynamic lookup methods.

Implementing tests for both debug and profiling symbols will not be permitted, unless preprocessor conditional statements are used to disable them for the time being. Alternatively, the TEST_SKIP macro could be used, provided the reasons are documented with details.

The affected export symbols are:

  • XProfpControl
  • XProfpGetData
  • IrtClientInitFast
  • IrtSweep
  • DbgLoadImageSymbols
  • DbgUnLoadImageSymbols
  • MmDbgAllocateMemory
  • MmDbgFreeMemory
  • MmDbgQueryAvailablePages
  • MmDbgReleaseAddress
  • MmDbgWriteCheck

NOTE: Attempting to check &XProfpControl != NULL will always return true because the compiler evaluates the expression as inherently true at compile time. Forcing this check to work properly is achieved by using these example lines below:

void* pXProfpControl = &XProfpControl;
int has_XProfpControl = pXProfpControl != NULL;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions