This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB requires software breakpoints?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Chad Phillips <jcphillips at yahoo dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Sat, 25 Jun 2005 00:32:54 -0400
- Subject: Re: GDB requires software breakpoints?
- References: <42BC6F5D.1080506@yahoo.com>
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