From mboxrd@z Thu Jan 1 00:00:00 1970 From: jtc@redback.com (J.T. Conklin) To: Andrew Cagney Cc: GDB Subject: Re: breakpoint insert API (was: A patch for ia32 hardware watchpoint.) Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <5m8zzl6w5r.fsf@jtc.redbacknetworks.com> References: <200003080845.AAA18410@alabama.wrs.com> <5mitywc5ac.fsf@jtc.redbacknetworks.com> <38C834AD.3379D1F2@cygnus.com> X-SW-Source: 2000-q1/msg00698.html Message-ID: <20000401000000.6r-_UdBYW04pmT1wZ16_DZYkSfFMVDyylaggDgQXSGI@z> >>>>> "Andrew" == Andrew Cagney writes: Andrew> One aspect of this gives me cold feet and sweety palms. Andrew> You're giving the target code access to the entire bp struct. Andrew> While I don't have any problems with handing the code a Andrew> breakpoint handle, I have strong reservations towards any Andrew> moves that give the target unfettered access to the entire Andrew> ``struct breakpoint''. We'll be spending the next 10 years Andrew> trying to get control back again :-) I appreciate this argument, and agree that the target interface should be as robust as possible. After reading your message, I thought about hiding the fact that the argument is a struct breakpoint pointer and providing macros to access "public" fields, but any subversion we do can be undone by a clever programmer. I'm still working on something that is simple, elegant, and efficent. However, I think it's a bit of a stretch to say such changes in and of themselves will lead to GDB being out of control. IMHO, this can only happen if the GDB maintainers fail to do their jobs and integrate code that disrupts GDB's architectural integrity. I'll stipulate that we've done a rather poor job of this in the past, but I'm hopeful that attitudes have changed. 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. I don't quite follow. Care to elaborate? --jtc -- J.T. Conklin RedBack Networks