questions about s/w and h/w breakpoint in GDB

The Westlakers westlakers@gmail.com
Sat Dec 22 15:35:00 GMT 2007


Greeting!

I have couple of questions regarding gdb with remote target in Sparc:

1) how to configure the gdb to issue an h/w breakpoint?

2) in software breakpoint, gdb 'cont' command will issue this
following serial protocol commands
after setting breakpoint, say at location of 0x50c57c:

- Z0,50c57c
- Hc0
- C11
- c
- g
- z0,50c57c

then the target return SIGSTOP, gdb stops at prompt, the target stops
at 0x50c57c and
then we type gdb command 'cont' again, it issues the following commands:

- m50c57c
- Z0,50c580
- Hc1
- C11
- c
- g
- z0,50c580

sounds like gdb implements the s/w bp as:

insert bp, exec, insert step-bp and exec.

Do we have to type two 'cont' to make one single exec of the breakpoint?
what is the right behavior from the target?

Thanks
Jesse



More information about the Gdb mailing list