Pseudo-code to illustrate the breakpoint in a program, Programming Languages

The standard way for debuggers to plant interactive breakpoints in a program in RAM (whatever the processor instruction set) is to save the break pointed instruction and replace it by a jump to the breakpoint handling code. After the breakpoint is triggered, the saved instruction is restored in its original place in the code. If the interactive dialogue with the debugger during the breakpoint handling indicates that that the triggered breakpoint is to be removed, execution of the program can be resumed simply by jumping to the instruction that had been break pointed. However, if the dialogue with the debugger indicates that the breakpoint is to remain in place when execution of the program is resumed, implementation is more complicated. Execution of the saved instruction could be emulated, but this is difficult to do, ensuring all side effects such as condition code setting and exception triggering are performed correctly, as well as correctly simulating all addressing modes, such as PC relative. It is much easier simply to execute the break pointed instruction in place, but to plant another breakpoint on a subsequent instruction in the same basic block, usually the immediate successor to the original breakpoint, so that the breakpoint handler can regain control in order to replant the original breakpoint and remove the secondary one. This obviously has some challenges if the successor of the break pointed instruction cannot be statically predicted, for instance if the break pointed instruction is a conditional jump, but a common solution is simply to ban planting breakpoints on such instructions. Identify the critical races that exist with this scheme if the program is executed by multiple threads, possibly multiple cores or multiple processors. Use pseudo-code to illustrate how you would resolve these issues.

Posted Date: 2/22/2013 1:34:22 AM | Location : United States







Related Discussions:- Pseudo-code to illustrate the breakpoint in a program, Assignment Help, Ask Question on Pseudo-code to illustrate the breakpoint in a program, Get Answer, Expert's Help, Pseudo-code to illustrate the breakpoint in a program Discussions

Write discussion on Pseudo-code to illustrate the breakpoint in a program
Your posts are moderated
Related Questions
The scenario As an XML expert you are required to model a system for an online furniture shop. After an interview with the shop manager you have the following information: T

In this exercise you will develop a small 'Pop Game' in which the user will "pop" shapes that are drawn on the screen. The game will be time based, showing a shot clock at the top

1 Problem Description The task of the assignment is to build a book recommendation system for Auer Libraries. The system is to be implemented in Prolog and as the owners of t

would you like to see some of my code. I am trying to do an add friend request. when I view my friends page I click on the add button. with ajax I want the script to send over the

Components of .NET Framework 3.5 .NET Framework Conceptual Overview Presents the .NET Structure and its elements. Installing the .NET Framework Provides information about .NET Stru

Pseudo code the shows logic for a program that generates a random number, then ask the user to think of a number between 1 and 10

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

How to make game in pascal language

i doing a project about depth estimation, i have done some research, and i used the block matching algorithm to get the motion vectors from the image sequences, i now have the prob

Board Coloring Problem Description In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color.