lkml.org 
[lkml]   [2008]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC Patch 1/9] Introducing generic hardware breakpoint handler interfaces
On Thu, Dec 04, 2008 at 11:38:17AM -0800, David Daney wrote:
> K.Prasad wrote:
> [...]
>> + * len and type values are defined in include/asm/hw_breakpoint.h.
>> + * Available values vary according to the architecture. On i386 the
>> + * possibilities are:
>> + *
>> + * HW_BREAKPOINT_LEN_1
>> + * HW_BREAKPOINT_LEN_2
>> + * HW_BREAKPOINT_LEN_4
>> + * HW_BREAKPOINT_LEN_EXECUTE
>> + * HW_BREAKPOINT_RW
>> + * HW_BREAKPOINT_READ
>> + * HW_BREAKPOINT_EXECUTE
>> + *
>> + * On other architectures HW_BREAKPOINT_LEN_8 may be available, and the
>> + * 1-, 2-, and 4-byte lengths may be unavailable. There also may be
>> + * HW_BREAKPOINT_WRITE. You can use #ifdef to check at compile time.
>> + */
>
> On MIPS we support breakpoint lengths that are powers of 2 between 8 and
> 4096. Do you really want symbolic values for these? The debuggers have
> to do calculations with the length values, so translating between the
> symbolic values and numeric values would be tedious at best.
>
>
> David Daney

Given that the possible values for length are finite and small on
x86(just three of them), it was chosen to be defined as constants.

For architectures such as MIPS where a range of lengths can be possibly
monitored using HW Breakpoints, the arch_validate_hwbkpt_settings()
maybe suitably written to validate the input and the 'length' may also
be specified in numeric terms to the kernel interface (say
register_kernel_hw_breakpoint()).

Thanks,
K.Prasad



\
 
 \ /
  Last update: 2008-12-17 04:49    [W:0.046 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site