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: Todd Whitesel <toddpw at windriver dot com>
- Subject: Re: breakpoint insert API (was: A patch for ia32 hardware watchpoint.)
- From: Stephane dot Bihan at arccores dot com
- Date: Mon, 13 Mar 2000 09:45:32 +0000
- Cc: gdb at sourceware dot cygnus dot com (GDB),jtc at redback dot com
- Reply-To: Stephane dot Bihan at arccores dot com
> > 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.
It seems to me that this single_step function is actually not in use.
I don't know about WindRiver, but here we have two targets: an ISS and a
remote target that use the generic breakpoint functions before stepping.
I don't mind to remove this code.
>
> 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.
>
----------------------------------------------------------------
Stephane Bihan
ARC Cores Ltd http://www.arccores.com