Messages in this thread | | | Date | Fri, 20 Mar 2009 19:30:58 +0100 | From | Ingo Molnar <> | Subject | Re: [Patch 01/11] Introducing generic hardware breakpoint handler interfaces |
| |
* Alan Stern <stern@rowland.harvard.edu> wrote:
> > + * Kernel breakpoints grow downwards, starting from HB_NUM > > + * 'hbkpt_kernel_pos' denotes lowest numbered breakpoint register occupied for > > + * kernel-space request > > + */ > > +unsigned int hbkpt_kernel_pos; > > This doesn't make much sense. All you need to know is which > registers are in use; all others are available. > > For example, suppose the kernel allocated breakpoints 3, 2, and 1, > and then deallocated 2. Then bp 2 would be available for use, > even though 2 > 1.
it's a high/low watermark mechanism. Yes, it's not an allocator that can allocate into a debug registrs 'hole', but it is a simple one that matches current hardware breakpoint usages and enables the kernel to utilize them as well - and keeps all the code simple.
Ingo
| |