For the padding problem, I haven't figured but made a workaround. Very
strange behavior is that even #pragma pack(1) was not packing the structure,
I had to put in an explicit __attribute__((packed)) around a few structures.


After padding a few other structures, I gotten around the second problem.
Mostly it seems to be a padding issue.

Now I am one to the next set of problems. I will do some more investigation.
Hopefully will find it soon.

Thanks for your support.

On Fri, Mar 13, 2009 at 8:22 PM, fadden <[email protected]> wrote:

>
> On Mar 12, 7:42 pm, vkat <[email protected]> wrote:
> > I figured the problem, the typedef DexTypeItem was getting padded to 4
> > bytes even though it has only one u2 property. This was causing the
> > structure array to be misaligned. The strange thing is when I compiled
> > libdex, I passed the same gcc options as that of in the Android
> > environment.
>
> Odd... the padding rules shouldn't do that.  Did you figure out how to
> make gcc do the right thing, or just work around it?
>
>
> > Now I am debugging the next issue "Too many exceptions during init".
> > Any pointers?
> [...]
> > V( 5396) THROW 'Ljava/lang/NoClassDefFoundError;' msg='D' cause=
> (none)  (dalvikvm)
>
> Somebody is trying to resolve 'D', i.e. the "double" primitive type.
> It's not found (since there is no such class), and the VM tries to
> throw a NoClassDefFoundError.  While trying to manage that it chokes
> on 'F' (float), so instead of looping for a while throwing exceptions
> it decides that things are hopeless and aborts.
>
> I don't know why it would be doing that, unless that DexTypeItem
> problem is causing it to do strange things when walking the class
> list.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to