Concept

Stepping (debugging)

Résumé
Program animation or stepping refers to the debugging method of executing code one instruction or line at a time. The programmer may examine the state of the program, machine, and related data before and after execution of a particular line of code. This allows the programmer to evaluate the effects of each statement or instruction in isolation, and thereby gain insight into the behavior (or misbehavior) of the executing program. Nearly all modern IDEs and debuggers support this mode of execution. Instruction stepping or single cycle originally referred to the technique of stopping the processor clock and manually advancing it one cycle at a time. For this to be possible, three things are required: A control that allows the clock to be stopped (e.g. a "Stop" button). A second control that allows the stopped clock to be manually advanced by one cycle (e.g. An "instruction step" switch and a "Start" button). Some means of recording the state of the processor after each cycle (e.g. register and memory displays). On the IBM System 360 processor range announced in 1964, these facilities were provided by front panel switches, buttons and banks of neon lights. Other systems, such as the PDP-11, provided similar facilities. On newer processors, which may not support physically stopping the clock and have too much internal state to reasonably display on a panel, similar functionality may be provided via a trap flag, which when enabled instructs the processor to stop after each instruction in a similar manner to a breakpoint. As multiprocessing became more commonplace, such techniques would have limited practicality, since many independent processes would be stopped simultaneously. This led to the development of proprietary software from several independent vendors that provided similar features but deliberately restricted breakpoints and instruction stepping to particular application programs in particular address spaces and threads.
À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.