Re: GDB requires software breakpoints?

Daniel Jacobowitz
2005-06-25T04:32:59Z

On Fri, Jun 24, 2005 at 04:38:53PM -0400, Chad Phillips wrote:
> Problem 1:
> After attaching to the target which is stopped in main, I issue the step
> command. The target correctly steps to the next source line. At the
> end of the stepping process, GDB tries to set a breakpoint at main.
> Using 'info break' replies "No breakpoints or watchpoints."
>
> First: How can I prevent it from trying to do this?

It doesn't in general. Main is special, if you don't have a
recognizable dynamic loader.

> Second: It attempt to set a software breakpoint, which is not supported
> by the stub. Then it tries to write a software breakpoint (instruction
> 0x0000) to memory at the start of main, which fails since the stub
> cannot write to flash. Why is it doing this if the stub has already
> indicated that software breakpoints are not supported?

Try just making the software breakpoint request set a hardware
breakpoint.

--
Daniel Jacobowitz
CodeSourcery, LLC