This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Systemtap translator support for hardware breakpoints on


On Fri, Jan 08, 2010 at 10:52:31AM -0800, Roland McGrath wrote:
> > For ppc, any length upto 8 is acceptable. IIRC, the hwbkpt kernel API 
> > takes care of filtering a hit if the defined hwbkpt probe has a separate 
> > address interval and the hit is at an address which is outside that 
> > interval. (I need to check its implementation with hw breakpoint kernel 
> > API).
> 
> I don't understand.  Do you mean that the trap handler gets the precise
> address of the load/store, not just the address aligned to 8?
>

Yes, we put the Data Address Register (DAR) to use here and know the
exact address which was accessed to cause the breakpoint exception. The
value of DAR along with the length of the symbol (taken as input from
the user when registering a breakpoint request) is used to filter out
extraneous breakpoint exceptions.

For instance, a breakpoint request for a symbol with length for 4 bytes
is accepted (anything <= 8 is considered valid). Whenever a breakpoint
exception arises, the hw_breakpoint_handler() checks to see if the value
of DAR lies between the bp_addr and bp_addr+len. If yes, we know that
the exception is a result of a memory access in the address-range we're
interested in, otherwise it returns early.

Thanks,
K.Prasad


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]