In article <local.mail.freebsd-hackers/[EMAIL PROTECTED]> yo
u write:
>This is not as efficent as it could be implemented with a separate
>flag to indicate whether saving the debug registers is necessary since
>loading/storing the debug registers is fairly expensive (11 clocks on
>an i486).
 
Yes; you may want to just use another bit in pcb_flags that indicates
if the debug registers are in use.
 
 
>Should 'struct reg' be extended to directly include the debug
>registers or should we go the route of having another data structure
>for the debug registers, not unlike how the floating point registers
>are handled?
 
I'd be inclined to create another data structure, unless the debug
registers are architecturally defined to be identical on all x86
chips.
 
 
>Otherwise, I think I will need to set up a 'struct dbregs', provide
>the appropriate 'fill_dbregs()' and 'set_dbregs()', and then provide a
>PT_SETDBREGS, PT_GETDBREGS interface to 'ptrace()'.
 
Either that, or create a routine like i386_set_breakpoint() in
sys_machdep that would handle setting breakpoints for different
types of cpu architectures.
--
Jonathan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to