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

Assignment Help:

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.


Related Discussions:- Pseudo-code to illustrate the breakpoint in a program

DOM - Document Object Model, What is DOM? The Document Object Model is a pl...

What is DOM? The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure an

Write a program that lets the user play an adventure game, Let the player (...

Let the player (denoted U in the diagram below) navigate around the board until she wins the game by finding the exit or is killed by a monster. A player begins the game with a sli

Matrices and vectors, This section is proposed to be a catch all for severa...

This section is proposed to be a catch all for several of the fundamental concepts which are used occasionally in working with systems of differential equations. There will not be

Explain the use of sync and fsck, Problem 1 Define the architecture of ...

Problem 1 Define the architecture of UNIX operating system with appropriate diagram Problem 2 Define the term inter-process communication. What are several approaches t

JSP, can you provide some assignments for JSP learning

can you provide some assignments for JSP learning

Pascal program, Pascal program: Exactly what you need to do to generat...

Pascal program: Exactly what you need to do to generate your empirical data is specific to your individual assignment. However, some rules apply to all of you: 1. The gener

Shell script to count characters, Normal 0 false false fals...

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

Write a program to draw the fish, Write a program to draw the figure shown ...

Write a program to draw the figure shown below. the program must provide: a. Close the fish's mouth slowly (at least 5 moves from the original position to close the mouth) b.

Computer programming on human algorithm, 1.   You have been asked to write ...

1.   You have been asked to write a computer program that will figure out the total of an order when given the amount of the order ($200) and a sales tax rate of five percent.  I w

Improved application deployment, Improved Application Deployment Data sourc...

Improved Application Deployment Data source implementation is perhaps the key to any Asp.net program implementation, and, if the database implementation is easily done, there is an

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd