Stanislav Meduna <[email protected]> writes: > Nick Garnett wrote: > > >> I am unable to do any backtraces (the emulator barfs > >> at trying to access adresses 0xfffffffc - f). > > > > Exactly how does it barf? > > Bus read error, can not find corresponding bank for addr > 0xfffffffc,pc=0x80000dfc > Bus read error, can not find corresponding bank for addr > 0xfffffffd,pc=0x80000dfc > Bus read error, can not find corresponding bank for addr > 0xfffffffe,pc=0x80000dfc > Bus read error, can not find corresponding bank for addr > 0xffffffff,pc=0x80000dfc
Presumably these come from skyeye itself. > > I tried to alter values returned by the emulator for invalid memory, > this did not help. > > The access itself is not a problem, the emulator informs > me of it, but does not generate any exception or such, it simply > returns something. Returning zero should cause GDB to eventually stop trying. You could try returning a value that corresponds to a valid address that would be outside your executable. That might also make GDB behave properly. > > > GDB has a somewhat nasty heuristic to try and do backtraces in the > > presence of compiler optimization. To do this it may access memory by > > treating values it finds on the stack and in registers as > > pointers. Sometimes these will point at invalid locations. > > OK, this is certainly a possibility. However, its heuristics > seems to fail: > > (gdb) where > #0 test1 () at nxttests.cxx:34 > #1 0x00000000 in ?? () > > i.e. it does not even know that the test1() was called from main() > The #1 address varies according to what the "invalid" access returns. > > There is no -O in my compilation flags. In my experience of using the same set of tools, albeit mainly for Cortex-M, they seem to generate backtraces correctly. So I'm afraid I'm out of ideas. Perhaps someone else has seen the same problem and can help. -- Nick Garnett eCos Kernel Architect eCosCentric Limited http://www.eCosCentric.com The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No: 4422071 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
