On 27/12/15 22:21, David Chisnall wrote: > I managed to get a development environment set up in qemu. All of the > ARM-specific codepaths now work correctly: > > - Message sending works > - Blocks as IMPs work > - C++ exceptions work. > > The property introspection test was failing, because char is unsigned char > and not signed char on ARM Linux. That’s also now fixed. > > Interestingly, the ManyManySelectors test fails on ARM Linux, because it maps > things below the 128KB line and so the selector code thinks that some pointer > values are valid selector IDs. This won’t be a problem if you don’t register > more than 2^16 selectors (not an issue for most code - we shipped with a bug > where message sending was broken with more than this many selectors for years > and only one program so far has triggered it). It’s probably fixable by > ignoring the top bit in the sel id for lookup (it’s already ignored for the > asm paths) and using it to distinguish the values. I’ll think about this, as > it’s a bit complex on big-endian systems.
Thank you, David! I've built libobjc2 with your latest commits for Android and it doesn't crash on objc_msgSend() anymore. However, there is still something wrong - even though simple test [1] doesn't crash anymore, call of objc_msgSend() seems to be noop. As you can see, it's pretty simple - it calls method where global variable assigned some predefined value, and then it check if that global variable really was set. I have running this test in debugger (gdbserver on Android plus gdb on host machine) and was able to set break point and go through instructions step by step. As far as I see, it calls slowMsgLookup, but seems it don't find anything (not sure yet, just because I'm not too familiar with ARM assembler)... The same test works just fine if being built for x86 with the same libobjc2 and running on Android x86 tablet, so it's definitely something related to ARM in libobjc2. I'll try to debug it further, but would be very appreciate if you could somehow advise me on next steps. [1] https://github.com/crystax/android-platform-ndk/blob/master/tests/device/crystax-test-objc-runtime/jni/test.m -- Dmitry Moskalchuk
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
