This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ECOS] printf does not work in user mode on Arm E7T


Pierre Habraken wrote:

What is strange is that I can't step into the printf subroutine: gdb
hangs as soon as I have typed the command stepi.

It's not the first time I've had GDB problems with functions with variadic arguments. Try and set a breakpoint _inside_ printf by hand before you've stepped into it (e.g. set a breakpoint on some function that printf calls).


Actually, it seems that it is the 'branch to subroutine' (Arm BL)
instruction which hangs when executed in user mode: I wrote a small C
program the main function of which merely switches to usr mode and then
call a dummy subprogram, and could observe the same behavior, ie the BL
instruction hangs.
I fear that the problem is related neither to printf nor to newlib or
redboot but to the Arm (Samsung implementation) processor...

Theoretically it could be RedBoot since it's up to RedBoot to set the next breakpoint to implement the single stepping, although that functionality itself is known to work fine elsewhere. It could also be some problem with RedBoot's ability to restore state back to user mode, although it's not clear why it would work for other instructions, but not prior to a BL. What age is this RedBoot? There were some significant patches from Mark Salter in this area a while back - April 2002.


A hardware problem is always possible, but seems improbable really.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]