Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLE: Fix patching functions with the same name #8370

Merged
merged 1 commit into from
Oct 6, 2019

Conversation

sepalani
Copy link
Contributor

This PR address the following issue: https://bugs.dolphin-emu.org/issues/11811

When multiple functions with the same name were patched, only the first one (earliest memory address) was properly patched.

Here is an example: unittest_hle_printf.zip

The expected behaviour with this PR is to print twice each message after loading the symbol map. One from the my_puts_* functions renamed as printf and the original printf function itself. The "Boot to Pause" option might be used to clear the ELF symbol and loading the symbol map before running the executable.

Ready to be reviewed & merged.

@JMC47 JMC47 merged commit b6545ea into dolphin-emu:master Oct 6, 2019
@turbolent
Copy link

@sepalani @Pokechu22 I tried compiling a simple Hello World program with devkitPPC:

#include <stdio.h>

int main(int argc, char **argv) {
  printf("Hello, world!\n");
}

Compiling and running this in the latest version I get this error at the end of the program:

IntCPU: Unknown instruction 00000000 at PC = 80001800  last_PC = 00000000  LR = 80007208

I wondered if this is a recent bug, and after noticing that the old 5.0 release worked fine, I bisected the error to this commit/release (5.0-10956). It works fine in the previous build, 10954.

Should I open a bug report for this, or am I doing something wrong?

@Pokechu22
Copy link
Contributor

Please do open a bug report for that. It'd also be useful to have both the elf and dol files attached to that report, and for you to test with wiiload in the (open) homebrew channel as well as launching it directly with dolphin. You may also be running into issues if you don't have a Wii Menu installed, since I believe dolphin's exit handler is to launch the Wii Menu.

@sepalani sepalani deleted the fix-hle-patch branch October 24, 2021 05:40
@turbolent
Copy link

@Pokechu22 Thank you for your quick reply!

I created the issue here: https://bugs.dolphin-emu.org/issues/12716.

It would be great to keep the old support for not needing any dependencies, as my main use for it is to do integration testing for Wii/PowerPC binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants