From mboxrd@z Thu Jan 1 00:00:00 1970 From: Todd Whitesel To: jtc@redback.com Cc: gdb@sourceware.cygnus.com (GDB) Subject: Re: breakpoint insert API (was: A patch for ia32 hardware watchpoint.) Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <200003100133.RAA00070@alabama.wrs.com> References: <5mitywc5ac.fsf@jtc.redbacknetworks.com> X-SW-Source: 2000-q1/msg00669.html Message-ID: <20000401000000.G62ivUkLZXPbTJpwBFt4JmJGL7jL3P8cgwOi4E7jU4U@z> > 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