Weird happenings with printf.
nick.thomas at pixsan.com
Wed Oct 7 14:07:14 UTC 2009
I know this isn't much to go on,
But, I am seeing a problem with a function which never returns.
The function gets called, and then goes into a printf call, which never
Using GDB, I can step through the code, and I see that it goes into 'puts'
function from newlib/libc/stdio/puts.c .
(The printf just has some text, no formatting, so I guess the compiler
changed this 'puts').
After a few more steps it goes into _puts_r (at line 81 of puts.c).
At the next step, it goes into strlen function, but with a completely
different stack frame!!!
The text I was hoping to print has changed to some other text, from another
function, in a different task!
And now execution continues in this other task. So my original task is hung.
Any ideas what is going on here? I am clueless.
Has my task been rescheduled, and can this happen when stepping through the
code in the debugger?
I increased task stack sizes, but that made no difference.
In case this helps, I am using PPC 405 hardware.
Email: nick.thomas at pixsan.com
More information about the users