Someone asked how to count I/O accesses, well, here’s how to do it with
SoftICE. Our SoftICE guru says, you can use the BPLOG Breakpoint Logging
feature. Here’s how it works.
First, a little bit about our BPIO command. Say the user wants to set a
breakpoint when a value is read from port 0x3fe. The command will be,
bpio 3fe R
If the user wants to further refine it to say, only when the upper 2 bits
are set, then the command would become
bpio 3fe r if ((AL & C0)==C0)
This would cause SoftICE to popup when the breakpoint is hit. At this point
in time (or whenever the user pops up into SoftICE) they can issue the
‘bstat’ command. This command will give them information on how many times
the breakpoint was hit, missed, SoftICE popped up, SoftICE logged the break
but did not popup, and a few other options.
Now, if we don’t want SoftICE to popup on a breakpoint, we can use
Breakpoint Logging. Breakpoint logging is the ability for a breakpoint to
hit yet cause SoftICE to not popup. Breakpoint logging is a function that
always evaluates to TRUE and needs to be used at the end of the conditional
expression for a breakpoint. So in the previous example the user could have
done the following
bpio 3fe r if ((AL & C0)==C0) && BPLOG
If the entire expression prior to the BPLOG evaluates to TRUE then the bplog
function will be executed, cause SoftICE to log the breakpoint to the
command window, update the statistics, and not pop up softice. If the user
did not want a conditional then the breakpoint command would look like
bpio 3fe r if (BPLOG)
At a future point in time the user would pop into SoftICE and then examine
the command window to see the elapsed time for when a breakpoint was hit,
and issue the ‘bstat’ command to see how many times the breakpoint was hit,
missed, and logged.
Hope this helps !
Alberto.
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.