SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 604 | Next

Shon Harris, Allen Harper, Chris Eagle, and Jonathan Ness

"Gray Hat Hacking, Second Edition"

Once breakpoints
have been set, the tracer allows the target program to continue execution and the
tracer makes note of all breakpoints that are hit. The tracer can optionally clear each
breakpoint when the breakpoint is hit for the first time in order to realize a tremendous
speedup. Recall that the goal of code coverage is to determine whether all branches have
been reached, not necessarily to count the number of times they have been reached. To
count the number of times an instruction has been executed, breakpoints must remain in
place for the lifetime of the program. Setting breakpoints on every instruction in a program
would be very costly from a performance perspective. To reduce the amount of overhead
required, Process Stalker, like BinDiff, leverages the concept of a basic block of code.
When setting breakpoints, it is sufficient to set a breakpoint only on the first instruction of
each basic block, since a fundamental property of basic blocks is that once the first
instruction in a block is hit, all remaining instructions in the block are guaranteed to be
executed in order. As the target program runs under the tracer??™s control, the tracer logs
each breakpoint that is hit and immediately resumes execution of the target program.


Pages:
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616