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: gdb at sourceware dot cygnus dot com (GDB)
- Subject: Re: breakpoint insert API (was: A patch for ia32 hardware watchpoint.)
- From: jtc at redback dot com (J.T. Conklin)
- Date: 14 Mar 2000 15:14:32 -0800
- References: <200003100128.RAA00013@alabama.wrs.com>
- Reply-To: jtc at redback dot com
>>>>> "Todd" == Todd Whitesel <toddpw@windriver.com> writes:
Andrew> I'd prefer to see something that tightens rather than loosens
Andrew> access to ``struct breakpoint''. Perhaphs something along the
Andrew> lines of multi-arch where the target is notified of breakpoint
Andrew> create, insert, remove, delete operations.
Todd> Basically what I need is the moral equivalent of a "user" field
Todd> tacked onto every breakpoint struct.
Todd>
Todd> Based on my existing code, the contents of this field would be:
Todd> UINT32 breakpointID; /* WTX-supplied handle for this breakpoint */
Todd> bool is_foreign; /* true if breakpoint was set by someone else */
Todd> bool is_global; /* true if breakpoint active for all tasks */
The reason I was passing the breakpoint pointer (with the intention of
adding a "void *private_data" field), is that I don't want to preclude
any target implementation. A 32 bit integer ID is probably the most
common breakpoint handle, but you never can tell...
I don't think your is_foreign flag is suitable for the target specific
data, because it changes the behavior of generic breakpoint code. You
didn't describe is_global, so I'm not sure about it. How is it
different from (bp->thread == -1)?
--jtc
--
J.T. Conklin
RedBack Networks