This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: breakpoint insert API (was: A patch for ia32 hardware watchpoint.)
- To: jtc at redback dot com
- Subject: Re: breakpoint insert API (was: A patch for ia32 hardware watchpoint.)
- From: Todd Whitesel <toddpw at windriver dot com>
- Date: Thu, 9 Mar 2000 17:33:50 -0800 (PST)
- Cc: gdb at sourceware dot cygnus dot com (GDB)
> One issue that I'm not sure how to address is that there are several
> places breakpoints are inserted where a breakpoint has not been
> constructed. Most of these occur in tdep code which implements single
> step with breakpoints on processors without a trace mode.
Aiee! Such code is evil and must be destroyed.
One important value of the full breakpoint machinery is that it can help
avoid the same location being patched twice. Any time we patch the same
instruction twice, we must un-patch it in exactly reverse order or else
we leave a breakpoint instruction sitting in the code -- Not Good.
So I would have to argue that the singlestep logic must either happen at a
really low level (this guarantees it will patch last and un-patch first) or
must go through the real breakpoint logic which can do duplicate detection.
--
Todd Whitesel
toddpw @ windriver.com