> Well, you could post the important details.  You talk about 3 different
> variables without mentioning whether any or all of the 3 variables is
> optimized, live, dead, aliased, initialized, referenced or modified at
> the 4 times in question, or at any other point in the code sequence.
>
> Any of the above details could produce debug traces that might look
> confusing (no need to invoke this as a guru or expert level bug report
> without the all the relevant details. at least yet.)

I left the details out to try to make it easy to see the main problem.
Anyway, here is the full prototype:

static void my_func (UInt16             *parm1,
                     UInt16             parm2,
                     Int16              rows,
                     Boolean            parm4,
                     my_generic_func    *parm5);

The actual invocation is like this:

my_func(&recno, count, number_of_rows, false, my_routine);

My declarations are:

typedef void my_generic_func (Boolean flag);

UInt16           recno;
UInt16           count;
Int16            number_of_rows;

All 3 of these global variables have the right values before the calls.
"RECNO" and "COUNT" are correct afterwards, only "NUMBER_OF_ROWS" seems to
get overwritten.

The "my_routine" function's prototype is:

static void my_routine (Boolean yesno);

Inside "my_func", the call looks like this:

parm5(true);

I didn't think it could have anything to do with these other parameters,
because it was working correctly on the release ROMS, but I certainly might
be wrong about that. Again, I get no errors or warnings regarding the stack
or anything else.

The main thing is this:  The value is correct immediately before returning
from my_func, but INCORRECT immediately after the CALL to my_func. Something
(the stack?) is getting messed up as we return from the subroutine.

I hope these extra details help. Thanks!

Tom


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

Reply via email to