At 10:03 AM 4/8/2005, you wrote:
one more thing, i just noticed after playing a bit more with debugger and
experimenting with code that what actually hapens is that when virtual function
(from compiled code, not from library!) is called it just jumps to some strange
position instead of place where it should go. it looks like if virtual table for
class was in wrong memory or overwritten with garbage.


i am sure there is no stack corruption caused by my code, i double-checked it
(and also it works in standart a4 mode without problems)

does someone use expanded mode with a5 jumptables in codewarrior 9.3 with c++
program? are there any special rules for programming when i use it?

Expanded mode affects the way code is generated. You need to be able to handle a few key situations:


1) Do you ever pass function pointers to UltraLite? If so, those function pointers need to be wrapped using the code in CWCallbackThunks.h so that when they're called, they have the correct A4 pointer value.

2) It's possible that the compiler is generating code that's using an A4-reference to find the virtual table, when the vtable linked from the UltraLite code is being put into the A5-region.




-- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to