This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why is the debugger hanging?

Hi

I'm writing my first ARM application. I have C++ code that works in Visual Studio on Windows and I am porting it to ARM using ARM Dev Studio. I want to target Cortex M6 but am currently targeting Cortex-A53 as that is suggested in the tutorial.  My code builds ok and runs ok in the debugger up to a certain point, at which the debugger hangs when I try to step over the next line:

It seems to be a consequence of accessing the pointer rather than the cout. Earlier cout's work ok. I think the pointer is valid.

Please can you help me find out why this is happening? I don't know what to do next.

Thanks

David

Parents
  • Hi David

    On which line of C do you see the hang occurring?  Is it on the cout?  It isn't clear from the screen-shot. 

    The FVP model to which the Debugger is connected appears to be still running, so you should be able to press the Interrupt button (F9) to see where code execution has reached.  Maybe an exception is occurring (due to e.g. a stack or heap overflow), but you have no exception handlers in place.

    Try single stepping through the assembly code in the Disassembly view to see what instruction is causing the problem.  To step instruction-by-instruction, press the "Step by instruction" button in the Debug Control view.

    Where do you expect the cout output to appear - in the Debugger's console via semihosting, or via some hardware peripheral such as a UART?

    Hope this helps

    Stephen

Reply
  • Hi David

    On which line of C do you see the hang occurring?  Is it on the cout?  It isn't clear from the screen-shot. 

    The FVP model to which the Debugger is connected appears to be still running, so you should be able to press the Interrupt button (F9) to see where code execution has reached.  Maybe an exception is occurring (due to e.g. a stack or heap overflow), but you have no exception handlers in place.

    Try single stepping through the assembly code in the Disassembly view to see what instruction is causing the problem.  To step instruction-by-instruction, press the "Step by instruction" button in the Debug Control view.

    Where do you expect the cout output to appear - in the Debugger's console via semihosting, or via some hardware peripheral such as a UART?

    Hope this helps

    Stephen

Children