-
Notifications
You must be signed in to change notification settings - Fork 136
Fix cpptest example #118
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
Fix cpptest example #118
Conversation
|
I wondered if 0xFFFFFFFF was the result of a bug subtracting 1 from a 32-bit unsigned 0. |
|
Patch looks great to me, thanks! |
|
Let me try it on hardware and merge. Thank you! This is a really important step. |
|
I'm actually noticing that the global constructor for At least it's not completely failing anymore. 😅 I'll see if I can figure out what's going on here. |
|
@anacierdem I have fixed the issue with the global constructors not being called: pointers to pointers are confusing. 😅 Luckily, MAME's debugger is super awesome and let me step through to find the problem. 🎉 |
|
Those external labels make things even more complicated. I did the same many times myself too 😁 I have a minor comment. I will try to test and merge this when I have the time |
|
Unfortunately this does not work on the real console. There is something wrong with how we arelinking it IMO b/c removing everything and only leaving a Still we can merge it though as it seem to fix the ctors according to the spec. |
Changed - Running vscode tasks now always rebuild libdragon examples and tests - Root makefile always rebuilds examples and tests - Update readme Fixed - C++ test example works now (DragonMinded/libdragon#118) - Fix broken bench makefile Added - `installDragon` vscode task to make and install libdragon to the container
Changed - Running vscode tasks now always rebuild libdragon examples and tests - Root makefile always rebuilds examples and tests - Update readme Fixed - C++ test example works now (DragonMinded/libdragon#118) - Fix broken bench makefile Added - `installDragon` vscode task to make and install libdragon to the container
Changed - Running vscode tasks now always rebuild libdragon examples and tests - Root makefile always rebuilds examples and tests - Update readme Fixed - C++ test example works now (DragonMinded/libdragon#118) - Fix broken bench makefile Added - `installDragon` vscode task to make and install libdragon to the container
* Minor improvements to cpptest example * Remove unused global destructors from ld script * Fix global constructors for C++
* Minor improvements to cpptest example * Remove unused global destructors from ld script * Fix global constructors for C++
* Minor improvements to cpptest example * Remove unused global destructors from ld script * Fix global constructors for C++
* Minor improvements to cpptest example * Remove unused global destructors from ld script * Fix global constructors for C++
I have verified that the cpptest example now works correctly in MAME.
Resolves #92
ldscriptAccording to https://gcc.gnu.org/onlinedocs/gccint/Initialization.html
Global destructors weren't exactly hurting anything by being included, but they were never being called and there is no logical reason to call them since the system effectively halts after
mainreturns (which it should pretty much never do).