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 and System.out should not be used anywhere in the programs except in main and only for testing purposes.  All calculations should be done in a method.  Note:  To use J

how to get the HORIZONTAL motion field from motion vectors matrices

Write a program to use a robot to move the stack of blocks from a source location to a target location, based. Movement of robot arms, picking and dropping, can be controlled usi

While working in the eHealth Applied Research lab at Mohawk College, you are asked to transform an xml file into an XHTML representationusing XSLT for display in a browser.The xml

2. Design an ER diagram for an IT training group database that will meet the information need’training programme. Clearly indicate the entities, relationships and the key constrain

For this assignment you will need to design and construct a basic math program which targets elementary school children. Your program must adhere to the following steps and require

A large logistics company requires a software system to support the business processes associated with managing shift patterns of employees and making the associated payments. The

1. Implement a program where an ellipse follows the perimeter of the window. 2. Implement a program that can draw graphs, possibly following your plan from last week. Have it gr

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

Overview You will write a loadable kernel module. If you have an idea which you can convince me is a good idea that can not be done as a module, but only via direct modificatio