WO2006137223A1 - デバッグシステム、デバッグ方法、およびプログラム - Google Patents

デバッグシステム、デバッグ方法、およびプログラム Download PDF

Info

Publication number
WO2006137223A1
WO2006137223A1 PCT/JP2006/309230 JP2006309230W WO2006137223A1 WO 2006137223 A1 WO2006137223 A1 WO 2006137223A1 JP 2006309230 W JP2006309230 W JP 2006309230W WO 2006137223 A1 WO2006137223 A1 WO 2006137223A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
execution unit
debugging
unit
execution
Prior art date
Application number
PCT/JP2006/309230
Other languages
English (en)
French (fr)
Inventor
Noriaki Suzuki
Junji Sakai
Original Assignee
Nec Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nec Corporation filed Critical Nec Corporation
Priority to EP06746062A priority Critical patent/EP1901168A4/en
Priority to US11/921,437 priority patent/US8589879B2/en
Priority to JP2007522210A priority patent/JP5163120B2/ja
Priority to CN2006800227201A priority patent/CN101208667B/zh
Publication of WO2006137223A1 publication Critical patent/WO2006137223A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3632Software debugging of specific synchronisation aspects

Definitions

  • the present invention relates to a debugging system, a debugging method, and a program, and particularly to a debugging system, a debugging method, and a program in a system having a plurality of execution units.
  • this conventional debug system includes an arithmetic processor group 801, a memory device 802, and a diagnostic processor 803 that monitors the operating state of the arithmetic processor group 801.
  • the diagnostic processor 803 includes a stall detection unit 831 that detects that each arithmetic processor constituting the arithmetic processor group 801 is in a stalled state, a collection unit 832 that collects the internal state of the arithmetic processor, and the arithmetic processor. Is stored in the memory device 8002, and an initialization unit 836 that initializes the information processing system while maintaining the internal state of the arithmetic processor in the memory device 802.
  • a conventional debug system having such a configuration operates as follows.
  • the stall detection unit 831 detects that each arithmetic processor power S constituting the arithmetic processor group 801 is in a stalled state.
  • the collecting unit 832 collects the internal state of the arithmetic processor
  • the writing unit 834 writes the collected internal state of the arithmetic processor in the memory device 802 as the internal state 821 of the arithmetic processor.
  • the information processing system is initialized while holding the internal state of the arithmetic processor in the memory device 802. Therefore, even after initialization, the internal state of the arithmetic processor is stored on the memory device 802. Since the information is stored, this information can be used to debug the situation where the stall occurred.
  • this conventional debug system includes a CPU control circuit 903 that controls reset and interrupt of a system LSI incorporating a plurality of CPUs (CPU-A901, CPU-B902). .
  • the CPU control circuit 903 has a function of setting one of a plurality of CPUs (CPU-A901, CPU-B902) as a debugging means in which a normal operation program is replaced with a debugging program.
  • the CPU control circuit 903 includes an interrupt control circuit 904, a bus trace function 905, a strap capture circuit 906, and a debug control circuit 907.
  • the strap take-in circuit 906 reads external setting information such as strap information from the strap setting unit 908 (step S92).
  • step S93 If the read strap information indicates normal operation (No in step S93), the debug control circuit 907 determines whether the CPU—A901 and CPU—B902 and each function are based on the read strap information. Release the reset for the block (step S94). [0013] When the reset is released, each functional block starts operation (step S95).
  • step S93 if the read strap information specifies debugging (Yes in step S93), the debugging process is started (step S96).
  • the debug control circuit 907 releases the reset of the CPU B902 selected by the strap information (Ste S962).
  • Step S963 the debugger CPU—B902 is started (Step S963), and when the startup operation is completed (Yes in Step S964), the reset on the target CPU—A901 and each functional block is released (Step S965). .
  • the debug control circuit 907 releases the reset of the CPU—A901 selected by the strap information (step S966). ).
  • step S967 the debugger CPU—A901 is activated (step S967), and when the start-up operation is completed (Yes in step S968), the reset of the target CPU—B902 and each functional block is released (step S969).
  • Patent Document 2 the conventional method described in Patent Document 2 is characterized in that an execution unit (debug CPU) that starts a debug program is assigned at reset, and resets again when the debug CPU is changed. Need to do. Therefore, if a problem occurs that affects the operation of the debug CPU assigned at reset, the situation cannot be denominated.
  • execution unit debug CPU
  • the operation timing will be different from that when only the normal operation program is operated.Therefore, it may occur in normal operation due to the presence of the debug program. However, there is a problem that should not occur when only the normal operation program is executed.
  • Patent Document 1 Japanese Patent Laid-Open No. 11-184736
  • Patent Document 2 Japanese Patent Application Laid-Open No. 2004-164113 Disclosure of the invention
  • the present invention has been made in view of the above problems, and in a system in which a plurality of execution units work together, a debugging program is started on an arbitrary execution unit at an arbitrary timing. It is an object of the present invention to provide a debugging system, a debugging method, and a program that enable debugging work.
  • the debugging system of the present invention includes:
  • a debugging system for debugging a program executed in a system in which a plurality of execution units operate in cooperation with each other.
  • start instruction distribution means for distributing the start instruction to the plurality of execution units
  • a plurality of debugging program start means provided corresponding to each of the plurality of execution units and starting a debugging program on the corresponding execution unit based on the start instruction distributed by the start instruction distribution means; It has.
  • the activation instruction distribution unit may transmit the activation instruction to a debugging program activation unit corresponding to the execution unit designated by the activation instruction.
  • a debugging program starting unit for starting a debugging program is provided for each execution unit, and the starting instruction distributed by the starting instruction distribution unit is provided by the debugging program starting unit. Based on this, the debugging program is started. Therefore, even if a malfunction is confirmed when only the normal operation program is running, the debug program is started on the execution unit that is performing the process that causes the failure at any time. Debugging work can be performed.
  • the activation instruction distribution unit transmits the activation instruction to a debugging program activation unit corresponding to an execution unit determined based on the operation status of each of the plurality of execution units. But ⁇ .
  • the activation instruction distribution unit detects a free space in a storage area used by each of the plurality of execution units, and activates a debugging program corresponding to an execution unit having a sufficient free space detected.
  • the activation instruction may be transmitted to the means. This makes it possible to prevent a situation in which the debug program cannot be started due to insufficient free space.
  • the activation instruction distribution unit may transmit the activation instruction to a debugging program activation unit corresponding to an execution unit that has no or little relationship with an execution unit to be debugged. .
  • a command that is provided corresponding to one of the plurality of execution units! / And one of them is transmitted from the communication port to the debugging program.
  • Relay means for relaying to the debugging program on the execution unit designated by the activation instruction is further provided.
  • the present invention can be applied to a system in which an execution unit to be communicated of a communication port is fixed.
  • a command that is provided for each of the plurality of execution units and that is transmitted from the communication port to the debugging program is received.
  • the relay means for relaying the command transmitted to the debugging program is provided for each execution unit. Therefore, even when a certain execution unit is in a stalled state, the communication is performed. It is possible to start multiple debugging programs simultaneously on multiple execution units while eliminating the need for complicated switching of execution units to be communicated with ports.
  • another debugging system of the present invention further includes a stall generation execution unit avoiding means for preventing the start instruction from being transmitted to the debug program starting means corresponding to the stalled execution unit.
  • the debug program start instruction force S the debug programmer corresponding to the stall execution unit If it is sent to the system activation means, debugging work cannot be performed, and adverse effects can be prevented.
  • Information extraction means for extracting the necessary information on the storage area capacity used by the execution unit to be debugged, which is different from the execution unit in which the debugging program is running, is configured.
  • the debugging program since the physical 'virtual address conversion means and the information extraction means are configured in the debugging program, the debugging program uses an execution unit different from the activated execution unit. It is possible to refer to the storage area to be used. Therefore, even if the execution unit to be debugged becomes stalled, the external force can also check the contents of the storage area.
  • an execution unit in which a failure has occurred among the plurality of execution units is detected, and an activation instruction for debugging the detected execution unit is generated.
  • a defect detection means is further provided.
  • the failure detection means when a failure occurs in any of the plurality of execution units, the failure detection means generates a debug program start instruction for debugging the failure and debugs it. Program can be started automatically. Therefore, it is possible to perform debugging work without generating external debugging program start instructions.
  • an interrupt handler which is a program that is first activated to process the interrupt, has an interrupt when another execution unit generates an interrupt.
  • Information acquisition and control means for acquiring information in a preset memory; and
  • a response generation unit configured to transmit the information acquired by the information acquisition control unit to the execution unit that generated the interrupt;
  • An inter-execution unit interrupt generation means for generating an interrupt for an execution unit to be debugged
  • Response receiving means for receiving a response from the execution unit to be debugged is configured.
  • the information acquisition / control means for acquiring the information in the memory is configured in the interrupt handler, and the inter-execution unit interrupt generation means is configured in the debugging program. Even when the target execution unit is in a stalled state, it is possible to acquire information in the memory such as cache memory and registers and perform debugging work.
  • the present invention includes a debugging program start instruction allocating unit and a debugging program starting unit, thereby enabling debugging on an arbitrary execution queue at an arbitrary timing.
  • a debugging program start instruction allocating unit and a debugging program starting unit, thereby enabling debugging on an arbitrary execution queue at an arbitrary timing.
  • FIG. 1 is a block diagram showing a configuration example of a conventional debug system.
  • FIG. 2 is a block diagram showing another configuration example of a conventional debug system.
  • FIG. 3 is a flowchart for explaining the operation of the debug system shown in FIG.
  • FIG. 4 is a block diagram showing a configuration example of target hardware for carrying out the present invention.
  • FIG. 5 is a block diagram showing a configuration of a debug system according to the first embodiment of the present invention.
  • FIG. 6 is a block diagram showing a configuration example of a debugging program start instruction distribution unit shown in FIG. 5.
  • 7 is a flowchart for explaining the operation of the debug system shown in FIG.
  • FIG. 8 is a flowchart for explaining the operation of the debug program start instruction distribution unit shown in FIGS. 5 and 6.
  • FIG. 9 is a block diagram showing a configuration of a debug system according to a second embodiment of the present invention.
  • FIG. 10 is a block diagram showing a configuration of a debug system according to a third embodiment of the present invention.
  • FIG. 11 is a block diagram showing a configuration of a debug system according to a fourth embodiment of the present invention.
  • FIG. 12 is a flowchart for explaining the operation of the stall occurrence execution unit avoidance unit shown in FIG. 11.
  • FIG. 13 is a block diagram showing a configuration of a debug system according to a fifth embodiment of the present invention.
  • FIG. 14 is a flowchart for explaining a second physical “virtual address translation operation of the physical“ virtual address translation unit ”shown in FIG.
  • 15 is a flowchart for explaining the operation of the information extracting unit shown in FIG.
  • FIG. 16 is a block diagram showing a configuration of a debug system according to a sixth embodiment of the present invention.
  • FIG. 17 is a flowchart for explaining the operation of the second configuration of the defect detection section shown in FIG. 16.
  • FIG. 18 is a flowchart for explaining the operation of the third configuration of the defect detection section shown in FIG. 16.
  • FIG. 19 is a flowchart for explaining the operation of the fourth configuration of the defect detection section shown in FIG. 16.
  • FIG. 20 is a block diagram showing a configuration of a debug system according to a seventh embodiment of the present invention.
  • FIG. 21 is a flowchart for explaining the operation of the debugging system shown in FIG.
  • FIG. 22 is a block diagram showing a configuration of a debug system according to an eighth embodiment of the present invention.
  • FIG. 23 is a flowchart for explaining the operation of the debugging system shown in FIG. BEST MODE FOR CARRYING OUT THE INVENTION
  • the debug system of the present embodiment includes a rewritable storage unit 2 including two execution units A and B, a communication port 1, a RAM (Random Access Memory), and the like. And a program storage unit 3 configured by an HDD (Hard Disk Drive) device or the like in which various programs are stored.
  • the storage area of the storage unit 2 includes an execution unit A program area 6 and an execution unit B program area 7.
  • the execution unit A program area 6 includes a debug program start instruction distribution unit (indicated as a distribution unit in FIG. 5) 61 and a debug program start unit (see FIG. 5). In FIG. 5, it is displayed as an activation unit.) 62, a debugging program 63, and a normal operation program 64 are provided. These are configured as programs to be executed on execution unit A.
  • the execution unit B program area 7 also includes a debug program start instruction distribution unit 71, a debug program start unit 72, a debug program 73, and a normal operation program 74. It has. These are configured as programs to be executed on execution unit B.
  • the debug program start instruction distribution unit 61, 71 and the debug program start unit 62, 72 are simply stored as programs in the storage unit 2, and are started on the execution units A, B. For the first time, various operations are performed. However, here, in order to simplify the explanation, it is assumed that the debugging program activation instruction distribution units 61 and 71 and the debugging program activation units 62 and 72 perform various operations independently.
  • debug program start instruction distribution units 61 and 71 When receiving the debug program start instruction (hereinafter simply referred to as start instruction) sent from communication port 1, debug program start instruction distribution units 61 and 71 are designated by this start instruction.
  • the received debug program is distributed to the execution unit that is currently running.
  • the debug program start-up units 62 and 72 are provided corresponding to the execution units A and B, respectively. Based on the start instructions distributed by the start instruction distribution units 61 and 71, the debug program start-up units 62 and 72 are provided on the corresponding execution units. Start debugging programs 63 and 73.
  • the debug program start instruction distribution unit 61 Receiving unit 611 that receives an activation instruction from port 1, a transmission unit 614 that transmits an activation instruction to debugging program activation unit 62, and an activation instruction to another execution unit B using inter-execution unit communication A transmission unit 612, a reception unit 615 that receives an activation instruction transmitted from another execution unit B using inter-execution unit communication, and a communication target change unit 613 that changes the communication target execution unit of communication port 1. It has.
  • the debug program activation instruction distribution unit 71 includes a reception unit 711, a transmission unit 714, a transmission unit 712, a reception unit 715, and a communication target change unit 713.
  • an activation instruction input at an external control terminal is sent to communication port 1.
  • This start instruction includes a code for specifying an execution unit for starting the debug program and a code for specifying the type of the debug program to be started.
  • the debug program start instruction distribution unit 61, 71 receives the debug program start instruction from the communication port 1 (step S1), the debug program start instruction specified by the start instruction is started.
  • the start instruction is distributed to the execution units to be executed, and the start instruction is issued to the debug program start units 62 and 72 (step S2).
  • the debugging program startup units 62 and 72 start up the debugging programs 63 and 73 (step S3).
  • a command analysis unit (not shown) composed of the debugging program 63, 73 outputs an S command.
  • the command received from communication port 1 is a debug command (No in step S5)
  • the work content corresponding to the command is executed and the debug work is performed.
  • data may be sent and received through communication port 1.
  • the command received from communication port 1 is an end command (Yes in step S5), the debugging programs 63 and 73 end debugging.
  • the command analysis unit is a means for analyzing the content of the received command, and is configured by debugging programs 63 and 73.
  • the types of commands In addition to the end command, there are commands that read the contents of the memory and registers and commands that write values to the memory registers.
  • step S11 when a debug program activation instruction is sent from communication port 1, an interrupt to execution unit A occurs (step S11), and activation instruction distribution unit 61 is activated. Thereafter, the receiving unit 611 receives an activation instruction from the communication port 1 (step S12), and determines its destination. If the destination is execution unit A (Yes in step S21), the transmission unit 614 transmits an activation instruction to the debug program activation unit 62 of execution unit A (step S22). On the other hand, when the destination is the execution unit B (No in step S21), the transmission unit 612 using inter-unit communication transmits an activation instruction to the execution unit B (step S23).
  • the activation instruction distribution unit 71 on the execution unit B side receives this activation instruction from the reception unit 715 (step S24)
  • the communication target changing unit 713 changes the communication target of the communication port 1 to the execution unit B.
  • the transmission unit 714 transmits an activation instruction to the debug program activation unit 72 of the execution unit B.
  • the debug program is started by receiving the debug program start instruction from the communication port 1.
  • it can be configured to start the debugging program after a certain period of time by giving a start instruction using a timer, etc., and check the status at that time.
  • the debugging program is started when the program reaches a specific point, such as by setting a breakpoint or by issuing a start instruction when the program to be debugged itself reaches a certain point. It is good as well.
  • a system including two execution units A and B has been described as an example, but it can be easily extended to a system including any three or more execution units. Is possible.
  • the execution unit that starts the debugging program is designated in advance.
  • the debug program start instruction distribution unit 61, 71 is described as distributing the start instruction to the execution unit specified by the start instruction.
  • the execution unit that starts the debug program is automatically selected. It can also be set as the structure to select.
  • the debug program start instruction distribution unit 61, 71 is configured to send a start instruction to the debug program start unit corresponding to the execution unit determined based on the operation status of the execution units A and B. be able to.
  • the operation statuses of the execution units A and B indicate, for example, the free space in the storage area used by the execution units A and B, the state of cooperation between the execution units A and B, and the like.
  • the start instruction distribution units 61 and 71 can be configured to distribute the start instruction to the debug program start unit corresponding to the execution unit having a margin.
  • a method for making such a configuration a method in which the start instruction distribution units 61 and 71 on the execution units A and B detect free space and notify the free space to other execution units, There is a method in which the start instruction distribution units 61 and 71 on each execution unit A and B directly detect the free space by directly referring to the storage areas used by other execution units.
  • each program has secured a communication path with another program, and there is no relationship with the cooperatively operated program to be debugged.
  • the start instruction distribution units 61 and 71 can be configured to distribute start instructions to each other.
  • a method for detecting that the communication path has been secured there are a method for detecting that the program has made a function call to secure the communication path, and a storage area where the status of the communication path is stored is observed. Methods can be adopted.
  • a product program in which the program to be debugged is running on another execution unit.
  • start instructions are distributed to the linked execution unit as well as the execution unit, and the linked programs are collectively debugged. It can also be set as a simple structure.
  • the debug program start instruction distribution units 61 and 71 and the debug program start units 62 and 72 are configured as programs to be executed on the execution units A and B, and after receiving the start instruction, Since the debugging program is configured to be started on one of the execution units A and B, the efficiency of debugging work can be improved without increasing the cost by hardware dedicated for debugging.
  • debugging program start instruction distribution units 61 and 71 and the debug program start units 62 and 72 are provided, debugging is performed on an arbitrary execution unit at an arbitrary timing.
  • the program can be started. As a result, a failure occurs while only the normal operation program is executed, or the normal operation program is executed until immediately before the failure occurs, and then the processing that causes the failure is performed on the execution unit. It is possible to start a debugging program and perform debugging work.
  • it may be configured such that a debug program is instructed using a timer or the like and the debug program is started after a predetermined time has elapsed.
  • a debug program is instructed using a timer or the like and the debug program is started after a predetermined time has elapsed.
  • the program for debugging when the program reaches a specific point by the method of setting a break point, the method of issuing the start instruction by the program to be debugged itself when reaching a certain point, etc. Can also be configured to start. In such a configuration, the arrival time to the point where the observation is to be made does not become constant depending on the conditions only by adjusting the start-up time. This makes it possible to start a debugging program.
  • the storage area is used by a normal operation program that is already operating, In some cases, additional debugging programs cannot be started.
  • additional debugging programs cannot be started.
  • the present embodiment may be configured to detect the free capacity of the storage area of each execution unit and distribute the activation instruction to the execution units having sufficient free capacity. With such a configuration, if the debugging program cannot be started due to insufficient free space, the start instruction can be issued while avoiding the execution unit.
  • the first embodiment described above is a case where the present invention is applied to a system that can change the communication execution unit of the communication port.
  • the execution unit subject to communication of the communication port cannot be changed! / That is, the execution unit subject to communication of the communication port is fixed.
  • the present invention is applied to such a system, even if a debug program start instruction distribution unit is provided for each execution queue, it becomes a communication target of the communication port and is not on the execution unit. The command cannot be sent to the debugging program started by.
  • the debug system of the present embodiment has a configuration applicable to a system in which the communication execution unit of the communication port is fixed.
  • the debugging system of the present embodiment is different from the configuration of the first embodiment shown in FIG. 5 in the communication of debugging programs executed in other execution units.
  • the relay section 65 that relays the network is added.
  • the relay unit 65 is executed on the execution unit A of the two execution units A and B. Relays commands sent from communication port 1 to debugging programs 63 and 73 to the debugging program on the execution unit specified by the start instruction.
  • the execution unit to be communicated is fixed to execution unit A. Then, when the destination of the command from communication port 1 is execution unit A, relay unit 65 transmits the command to debug program 63 of execution unit A, and the destination of command from communication port 1 If is execution unit B, the command is sent to the debugging program 73 of execution unit B.
  • the activation instruction distribution units 61 and 71 in this embodiment are the communication target change units 613 and 713 of the activation instruction distribution units 61 and 71 shown in FIG.
  • the communication receiving unit 615, the inter-unit communication transmitting unit 712 and the communication port receiving unit 711 on the execution unit B side can be omitted.
  • the overall operation in the present embodiment is the same as that in the first embodiment of the present invention.
  • the operation of the start instruction distribution units 61 and 71 is the same as that of the first embodiment of the present invention except that there is no step for changing the communication target of the communication port in FIG.
  • a system including two execution units A and B has been described as an example.
  • the system can be easily expanded to a system including three or more arbitrary execution units. Is possible.
  • the execution unit A program area 6 is provided with a relay unit 65 that relays communication to the debugging programs 63 and 73, and this relay unit 65 is executed by the execution unit B.
  • the communication of the debugging program 73 is configured to be relayed. Therefore, the present invention can be applied to a system in which the execution unit to be communicated with communication port 1 is fixed to execution unit A and cannot be changed.
  • the debugging program 73 on the execution unit B can communicate with the relay unit 65 by directly communicating with the communication port 1, a plurality of debugging programs can be simultaneously executed on the plurality of execution units A and B. 63, 73 can be used.
  • the debug system of the present embodiment is an application of the present invention to a system that can change the execution unit to be communicated with the communication port, as in the debug system of the first embodiment.
  • a command for the debugging program can be transmitted by switching the communication port.
  • switching of communication ports is expected to be complicated.
  • a certain amount of overhead is required for processing to change the execution target of the communication port.
  • the debug system of the present embodiment has a relay unit for each execution unit so that various commands to the debug program can be relayed regardless of which execution unit is stalled. It has a configuration provided.
  • the debug system of this embodiment adds a new program area 8 for execution unit C as compared with the configuration of the first embodiment shown in FIG.
  • the execution unit A side relay unit 65, the execution unit B side relay unit 75, and the execution unit C side relay unit 85 for relaying the communication of the debugging program executed by other execution units are added. It is a complicated structure.
  • the relay units 65, 75, 85 in this embodiment are arranged on three execution units A, B, C. Each command is executed, and the command sent from communication port 1 to the debugging program 63, 73, 83 is relayed to the debugging program on the execution unit specified by the start instruction.
  • the execution unit C program area 8 includes a debug program start instruction distribution unit 81, a debug program start unit 82, a debug program 83, and a normal operation program 84. These are configured as programs to be executed on execution unit C.
  • the operations of the start instruction distribution units 61 and 71 in the present embodiment are the same as those in the first embodiment of the present invention.
  • the operation of the activation instruction distribution unit 81 is the same as that of the activation instruction distribution units 61 and 71.
  • switching is useless when starting the second and subsequent debug programs. It is possible to avoid this.
  • each execution unit A, B, C includes a relay unit 65, 75, 85 that relays communication to the debug program, and a debug program that is executed by another execution unit.
  • the communication is configured so that it can be relayed even by the execution unit of the deviation. Therefore, even when an execution unit becomes stalled, it is not necessary to switch between execution units A, B, and C to be communicated via communication port 1, and multiple execution units A, B, and J A plurality of debugging programs 63, 73, and 83 can be used simultaneously.
  • execution unit A is set as the communication target execution unit of communication port 1. Therefore, the debugging program 63, the debugging program 73, and the debugging program 83 are connected to the execution unit A via the relay unit 65 provided for the execution unit A. Various commands are relayed.
  • the relay unit 65 also does not function. For this reason, the execution unit to be communicated with communication port 1 is changed from execution unit A to execution unit B, and the program for debugging 73, 83 is passed through relay unit 75 provided for execution unit B. It is sufficient to relay various commands to.
  • the execution unit to be communicated at the communication port 1 is sent to the execution unit B for communication with the debugging program 73 and to the execution unit C for communication with the debugging program 83.
  • Debugging programs can be started simultaneously on two execution units B and C without requiring complicated processing to switch.
  • the debug program start instruction is distributed to the execution unit specified by the debug program start instruction or the execution unit selected by the start instruction distribution unit. It was. However, the execution unit that tried to start the debugging program may already be in a stalled state, and it may not be possible to start the debugging program.
  • the debug program in order to prevent such an adverse effect, when selecting an execution unit capable of starting a debug program, the debug program cannot be started due to a stalled state. The execution unit is not selected.
  • the debug system of the present embodiment can execute a program while avoiding stalled execution units, as compared with the configuration in the first embodiment shown in FIG.
  • the stall generation execution unit avoidance unit (indicated as an avoidance unit in FIG. 11) 66 and 76 performs processing such that a start instruction is sent to the start instruction distribution unit of the execution unit.
  • Stall occurrence execution unit avoidance units 66 and 76 are arranged for each of a plurality of execution units A and B capable of starting a debugging program. And the stall occurrence execution menu The boot avoiding units 66 and 76 perform processing so that the start instruction is not sent to the stalled execution unit.
  • the stall occurrence execution unit avoidance unit 66 of the execution unit A makes the execution unit A the execution unit from which the start instruction is distributed (that is, the communication target execution unit of the communication port 1).
  • the communication port 1 is notified, and the stall occurrence execution unit avoidance unit 76 of the execution unit B notifies the communication port 1 to set the execution unit from which the start instruction is distributed to the execution unit B.
  • the stall generation execution unit avoiding unit is alternately shown as execution units A, B, A, B, ..., A, B.
  • Configure 66, 76 to be activated.
  • the stall occurrence execution unit avoidance unit is activated in turn by the power of using the timer and the program in the timer interrupt handler used during normal operation. To do.
  • the stall generation execution unit avoidance units 66 and 76 it is not always necessary to start them alternately or sequentially, but they are effectively combined with the defect detection unit described later. In order to make this desirable,
  • a timer interrupt handler is a program that is started first to process an interrupt when a timer interrupt occurs. This timer interrupt handler is a commonly used program as long as it is an execution unit with a timer interrupt function.
  • the overall operation of the present embodiment is the same as that of the present invention except that a step of selecting an execution unit capable of starting a debug program is added before receiving the start instruction in the flowchart of FIG. This is the same as the first embodiment.
  • step S71 and step S74 are processings that are inevitably selected according to the situation at that time, not intentionally selected. That is, in step S72, if force execution unit A, which is a process executed by execution unit A, is stalled, the program is not executed. Therefore, the branch of step S71 indicates that the process proceeds to step S73 without performing the process of step S72. Similarly, Step S75 is a process executed by execution unit B. If execution unit B is stalled, the program is not executed. Therefore, the branch of step S74 indicates that the process proceeds to step S76 without performing the process of step S75.
  • the initial value of the execution unit that is the distribution source of the start instruction for the debugging program that is, the communication target execution unit of communication port B
  • step S71 First, if execution unit A is not stalled in step S71 (No in step S71), the stalled execution unit avoidance unit 66 on execution unit A distributes the debug program start instruction.
  • the set value of the original execution unit is changed to execution unit A (step S72). This process is performed by changing the communication target of communication port 1. If there is a start instruction here (Yes in step S73), the start instruction is transmitted to the set execution unit (here, execution unit A) (step S77).
  • step S73 if there is no activation instruction in step S73 (No in step S73), if execution unit B is not stalled (No in step S74), a stall occurs on execution unit B.
  • Execution unit avoidance unit 76 the start unit that becomes the distribution source of the debug program start instruction is changed to execution unit B (step S75). If there is a start instruction here (Yes in step S76), the start instruction is transmitted to the set execution unit (execution unit B in this case) (step S77). If no start command is given (No in step S76), return to the beginning.
  • execution unit A is stalled at the stage of step S71, the power to proceed to step S73 without performing the process of step S72.
  • the instruction to start the debugging program The execution unit that is the distribution source of is execution unit B. Therefore, it is possible to avoid a situation in which a debug program start instruction is sent to the stalled execution unit A and it cannot be started.
  • execution B is stalled at the stage of step S74, the same mechanism can be used to avoid the situation where the execution instruction for the debug program is sent to execution unit B and it cannot be started. it can.
  • step S72 execution unit A receives the startup instruction in step S73. This is the case of stalling. This is the same between step S75 and step S76.
  • the debug program startup instruction is not accepted, but after a certain period of time, the execution unit that is the source of the startup instruction is changed by the execution unit that has not stalled. It is desirable that the activation instruction be reissued later.
  • the configuration may be such that the processing is terminated and an error is reported if the execution unit is not activated by reissuing a certain number of activation instructions.
  • the storage area related to the execution unit to be debugged which is different from the execution unit in which the debugging program is running, is referred to and
  • the configuration is such that the debug program is started on the execution unit that is the source of the start instruction, such as by starting the debug unit that analyzes the status of the execution unit or program that runs on the execution unit. It is desirable to do. In this case, of the functions of the activation instruction distribution unit, the function of transferring the activation instruction to another execution unit can be made unnecessary.
  • the stall occurrence execution unit avoidance units 66 and 76 are configured such that a start instruction is not sent to an execution unit that cannot execute a debugging program.
  • the execution unit stalls, affecting the operation of the execution unit. Even in such a case, if there is an execution unit that can be used, a debugging program can be started on the execution unit.
  • the debugging program can only refer to the storage area related to the activated execution queue. However, by referring to how the storage area is used, it may be possible to analyze the status of the program running on the execution unit being debugged.
  • the debug system of the present embodiment is configured to enable debugging work by referring to the recording area of the execution unit to be debugged from the execution unit where the debugging program is started. .
  • the debugging system of the present embodiment is different from the configuration of the first embodiment shown in FIG.
  • the configuration is replaced with 77.
  • the debugging program 67 uses a physical 'virtual address translation unit 67 to analyze the state.
  • the physical / virtual address conversion unit 671 converts a virtual address into a physical address.
  • the information extraction unit 672 uses the physical address converted by the physical 'virtual address conversion unit 671, and the normal operation program 74 considers the structure in which the OS (Operating System) or the like places management information in the memory. Storage area power used Extract necessary information.
  • the debugging program 77 includes a physical / virtual address conversion unit 771 and an information extraction unit 772.
  • the physical / virtual address conversion unit 671 performs a first physical 'virtual address conversion operation for performing mutual conversion between the virtual address and the physical address by adjusting the offset (difference) information between the virtual address and the physical address.
  • a second physical 'virtual address translation operation' that associates the address with the physical address.
  • the first physical 'virtual address translation operation is performed on an area where a continuous physical address is secured over a wide range, such as an area that is statically secured by the OS kernel (hereinafter referred to as a continuous area). This is an operation to respond.
  • the difference between the virtual address and the physical address can be calculated separately, but there is an OS in which the virtual address corresponding to the head of the continuous area is predetermined.
  • the difference can be calculated based on the physical address information at the beginning of the storage area allocated to each CPU. For this reason, it is desirable to be able to acquire the physical address information at the beginning of the storage area assigned to each CPU when starting the debugging program, and to automatically calculate the difference.
  • the second physical 'virtual address translation operation is a method used in a high-function OS, etc., and corresponds to a method for managing virtual addresses such as user programs using a physical / virtual address table. It is. In a user program, etc., storage areas corresponding to consecutive virtual addresses are not always continuous, and multiple steps are required because physical addresses are not uniquely determined by differences.
  • the physical address of the physical / virtual address translation table held by the OS is obtained using the first physical' virtual address translation operation (Ste S 101).
  • the physical / virtual address conversion table By referring to the physical / virtual address conversion table using this physical address, the contents of the physical'virtual address conversion table are acquired (step S102). [0143] In some advanced OSs, the physical 'virtual translation table is composed of multiple layers.
  • step S104 the virtual address of the physical / virtual conversion table to be referred to next is also acquired.
  • step S103 When these processes are repeated and the target physical address is obtained (Yes in step S103), the obtained physical address is notified (step S105), and the second physical'virtual address conversion is performed. End the operation.
  • step S201 based on a virtual address where a data structure as a base point exists, physical'virtual address conversion is performed (step S201), thereby obtaining a physical address where data to be referenced exists.
  • step S 202 If a physical address that can directly reference data can be mapped, the data of the structure that has the same or similar structure to the referenced data is mapped to the corresponding physical address. It is configured so that it can be easily accessed (step S 202), and data is referenced (step S 203).
  • a variable having the same or similar structure as the data to be referenced is prepared in advance, and the data to be referenced is copied to the prepared variable area using the acquired physical address, and the data is referred to. It may be done.
  • the physical address cannot directly refer to the data, there is a disadvantage that an overhead occurs to perform a force copy that makes it possible to refer to the data.
  • Step S204 the extraction is completed by these processes (Yes in Step S204), and the process is completed by notifying the extraction result (Step S206).
  • some data is arranged in a distributed state such as a list structure.
  • step S205 If the necessary data is not found in the first reference, or if all data is complete (No in step S204), an address indicating the location of the next list is obtained (step S205). . Since this address is described as a virtual address, the physical address is obtained by performing physical 'virtual address conversion (step S201), and the contents of the following list are referenced (steps S202 and S203). This process is repeated several times until the necessary data is available. [0151] In this embodiment, except for an OS using a virtual address, the same function can be realized by a process excluding the physical / virtual address conversion of step S201 which is not necessary among these processes. it can.
  • a debug program is started and a storage area related to a debug target execution unit different from the execution unit is referred to, so that the debug target execution unit or its execution unit can A debugging program that analyzes the state of a running program is provided. Therefore, debugging can be performed regardless of the state of the execution unit to be debugged.
  • the resource management unit (not shown) in the execution unit that performs reading / writing and control of the registers and cache memory provided in the execution unit on the execution unit to be debugged is used for debugging. You may make it comprise with a program.
  • the resource management unit in the execution unit includes a register content read / write unit (not shown), a cache memory management unit (not shown), and a power.
  • the cache memory management unit When the cache memory management unit receives a cache content discharge instruction, the cache memory management unit controls the execution unit to execute a cache memory discharge command. Cache memory Is completed, the latest information is written on the memory. Therefore, a debugging program that acquires information can later observe the storage area on other execution units. Alternatively, the debugging program on the execution unit to be debugged may be configured to notify the read contents of the cache memory to the outside. In addition, it is desirable to be able to control the operation mode of cache memory and update contents.
  • the contents of the registers included in the execution unit such as registers used for computation and registers related to the progress of the program such as the program counter, are stored. Saved in the stack area.
  • the contents of the stack area remain in the cache memory, and the latest value may not be stored in the storage area. Therefore, by using the above cache memory management unit, the contents of the saved register are obtained by discharging the contents of the cache memory onto the storage area or by directly reading the contents of the cache memory. be able to. As a result, it is possible to obtain the contents of the registers held during execution of the program to be debugged.
  • the debug system of the present embodiment if any failure occurs in the execution unit, even if the external control terminal power activation instruction is not input, the activation instruction is automatically generated. It becomes a structure! [0163] As shown in FIG. 16, the debug system of the present embodiment is compared with the configuration of the debug system of the first embodiment shown in FIG. , 78 is added.
  • failure detection units 68 and 78 When the failure detection units 68 and 78 detect that a failure has occurred in the execution units A and B, the failure detection units 68 and 78 generate an instruction to start the debugging program.
  • the system may be configured to only notify the external control terminal that a defect has been detected by the defect detection units 68 and 78.
  • the execution unit or program in which the failure occurred when the occurrence of the failure is detected, the execution unit or program that causes the failure, or other execution unit or program is provided. U want.
  • execution units provided with the defect detection units 68 and 78 do not necessarily need to match the execution units provided with the debug program start units 62 and 72. Only one of them is provided!
  • a fault in which the occurrence of a fault is reported by the system (hereinafter referred to as a runtime error) and a fault that prevents normal operation from being reported by the system.
  • Run-time errors include illegal memory references, illegal instruction execution, and hardware exceptions.
  • Problems that prevent normal operation include stalls due to infinite loops and runaway.
  • the defect detection units 68 and 78 include a defect reception unit (not shown) that receives a defect reported by the system and a notification unit (not shown) that notifies the occurrence of the defect.
  • a defect detection unit may be provided in the specific program.
  • the defect detection unit is a program on the execution unit. If a failure is detected, a fault is detected by the fault detection unit of the execution unit in which the runtime error occurred.
  • the execution unit for starting the debugging program may be used as the execution unit in which a failure has occurred to generate a start instruction.
  • the cause of the failure may not be determined due to the effect of the program startup on the execution unit or storage area. In such a case, it is desirable to issue a debug program start instruction to another execution unit and start the debug programs 67 and 77 in the fifth embodiment.
  • the defect detection units 68 and 78 are an update information reading unit (not shown) for reading information updated by a program executed on the execution unit to be debugged, and whether the information is normally updated. It consists of a normal update confirmation unit (not shown) for checking whether or not and a failure occurrence notification unit (not shown) for notifying the occurrence of a failure.
  • the failure occurrence notification unit is provided as a debug program start instruction generation unit that generates a debug program start instruction after confirming the occurrence of the failure will be described as an example.
  • the update information reading unit reads information updated by a program executed on another execution unit (step S301). Based on this information, the normal update confirmation unit confirms whether the update has been performed normally (step S302). If the update has been performed normally (Yes in step S303), the normal update confirmation unit confirms the next update. When it is detected that the update is abnormal due to a failure (No in step S303), the debug program start instruction generation unit generates a debug program start instruction (step S304), and the debug program A start instruction is given to the starter.
  • Information updated by the program may be obtained by providing a program that updates the information. However, by using the time information used internally by the OS as information updated by the program, it is possible to configure the defect detection unit without providing a separate program.
  • the defect detection units 68 and 78 include an interrupt generation unit (not shown) that generates an interrupt to the debug target execution unit, and a response check unit (not shown) that checks the response from the debug target execution unit. And a start instruction generation unit (not shown) for generating a start instruction for the debugging program.
  • the execution unit to be debugged has a response unit for interrupts.
  • the interrupt generation unit generates an interrupt for another execution unit (step S311) and waits for a response to be returned (step S312). If a response is received within the specified time (Yes in step S313), it is determined to be normal and the next interrupt is generated. If no response is returned within the specified time (No in step S313), it is determined that the response has become impossible due to a problem, and the startup instruction generator generates a startup instruction for the debugging program (step S314) and Gives the program startup unit a startup instruction.
  • the decision criterion is that the response is returned within the specified time, but it is also possible to determine whether the returned response is normal or abnormal.
  • the stall occurrence execution unit avoidance units 66 and 76 in addition to the operation of the stall occurrence execution unit avoidance units 66 and 76 in FIG. 12, the stall occurrence execution unit avoidance units 66 and 76 as shown in FIG. Steps S78 and S79 for determining which execution unit is currently set.
  • step S71 and step S74 are processes that are inevitably selected depending on the situation at that time, not intentionally selected. That is, step S72 Is a process executed by execution unit A. If execution unit A stalls, the program is not executed. Therefore, the branch of step S71 indicates that the process proceeds to step S73 without performing the process of step S72. Similarly, in step S75, if force execution unit B, which is a process executed by execution unit B, is stalled, the program is not executed. Therefore, the branch in step S74 indicates that the process proceeds to step S76 without performing the process in step S75.
  • the execution unit B is the initial value of the execution unit that is the source of the debug program start instruction.
  • step S71 First, if execution unit A is not stalled (No in step S71), the initial setting value is execution unit B (Yes in step S78), so the program on execution unit A is the debug program. The execution unit from which the start instruction is distributed is changed to execution unit A (step S72). On the other hand, if execution unit A is stalled (Yes in step S71), the process proceeds to step S73 without performing the process in step S72. If no start instruction is given (No in step S73), execution unit B stalls! / If not (No in step S74), the process proceeds to step S79. In step S79, the execution unit set as the distribution source of the start instruction is inspected. In this inspection, if the set execution unit is A (Yes in step S79), it is normal.
  • step S79 if it is not the execution unit A (No in step S79), it means that step S72 has not been executed, so that a failure in the execution unit A can be detected. In this case, the process proceeds to step S77, where a start instruction is transmitted to the set execution unit (in this case, execution unit B), and the debugging program is started. If execution unit B is stalled (Yes in step S74), a failure is similarly detected in step S78 (No in step S78), and the debugging program is started.
  • the defect detection units 68 and 78 are provided so that the occurrence of a defect can be confirmed. After authentication, a debugging program can be started to start debugging work.
  • the execution unit program in which a failure occurs at the time of occurrence of the failure the execution unit or program that causes the failure, or another execution unit or program. It is also possible to adopt a configuration provided with means for stopping the operation. By adopting such a configuration, it is possible to avoid the difficulty in pursuing the cause of the occurrence of the failure by the processing proceeding after the occurrence of the failure.
  • the failure detection units 68 and 78 may be configured to generate a debug program start instruction when the occurrence of a failure is detected.
  • the debug operator can start the debugging work without starting the debug program by determining the type of execution unit or debug program that starts the debug program. .
  • the debug system of the present embodiment is configured to enable debugging by reading the contents of a register or cache memory of an execution unit even when a certain execution unit is stalled.
  • the debugging system 63 of the present embodiment is different from the configuration of the first embodiment described above in that the debugging program 63 in the execution unit A program area 6 is
  • the inter-execution unit interrupt generation unit (indicated as an interrupt generation unit in FIG. 20) 631 and a response reception unit 632, and the interrupt handler 69 executed in the execution unit to be debugged includes a response generation unit 691 and an information acquisition / control unit 692 are provided.
  • the inter-execution unit interrupt generation unit 631 generates an interrupt for the execution unit B to be debugged.
  • the response receiver 632 receives the response from the execution unit B to be debugged via the response generator 791.
  • the control unit 692 acquires information in a preset memory such as a register, a cache memory, or a flash memory when an interrupt from another execution unit B occurs.
  • the response generation unit 691 transmits the information obtained by the information acquisition / control unit 692 to the execution unit B that generated the interrupt.
  • the interrupt handler 69 is not shown.
  • the interrupt handler 69 is a program provided as a standard if it is a general execution unit.
  • the debugging program 73 in the execution unit B program area 7 includes an inter-execution unit interrupt generation unit 731 and a response reception unit 732, and
  • the interrupt handler 79 executed in the execution unit to be debugged includes a response generation unit 791 and an information acquisition / control unit 792.
  • FIG. 20 shows an example in which the debug system of the present embodiment is applied to the configuration of the first embodiment, but also for the second to sixth embodiments. The same applies.
  • the debugging program 63 issues an inter-execution unit interrupt to the target execution unit B (step S401). Then, the interrupt handler 79 of the execution unit B is activated (step S402). By using the information acquisition control unit 792 in the interrupt handler 79, information is collected, written, controlled, etc., for the execution unit B registers, cache memory, and flash memory (step S403). Thereafter, the response generation unit 791 generates a response to the execution unit A (step S404), and the execution unit A receives this using the response reception unit 632 (step S405).
  • the work content is only control, only the success / failure information of control may be included in the response.
  • work contents When information collection is included, the collected information is also included in the response.
  • interrupt handler 79 an interrupt handler for a timer interrupt that occurs periodically on execution unit B side is defined as interrupt handler 79, and execution unit A uses a communication unit (not shown) to control execution of the target process. May be provided to execution unit B.
  • execution unit A uses a communication unit (not shown) to control execution of the target process. May be provided to execution unit B.
  • the timing of execution control is only the timing of timer interrupts that occur periodically.
  • the debugging programs 63 and 73 include inter-execution unit interrupt generation units 631 and 731 and response reception units 632 and 732, and the interrupt handler executed by the execution unit to be debugged is information
  • the acquisition / control unit 692, 792 and the response generation unit 691, 791 are provided. Then, an interrupt is generated from the debug program running on the execution unit other than the debug target execution unit to the debug target execution unit, and information is acquired and controlled by the interrupt handler.
  • an interrupt handler is a program that is first started to process an interrupt when an interrupt occurs. Therefore, even if execution units A and B become stalled by providing information acquisition / control units 692 and 792 and response generation units 691 and 791 in interrupt handlers 69 and 79 of execution units A and B, respectively. It becomes possible to read the cache memory and register contents of the execution unit that has stalled.
  • the debug system of this embodiment enters a stalled state by stopping the runaway process and correcting the defect. It is configured to return the execution unit to the normal state.
  • execution unit B is a debug target execution unit, and execution unit A can only debug execution unit B.
  • execution unit A can only debug execution unit B.
  • the debug system 63 of the present embodiment is different from the configuration of the debug system of the first embodiment shown in FIG.
  • An interrupt handler 79 that includes a generation unit (indicated as an interrupt generation unit in FIG. 22) 631 and a response reception unit 632, and that is executed in the execution unit B that is an execution unit to be debugged, generates a response.
  • the unit 791 and the process control unit 793 are provided.
  • the inter-execution unit interrupt generation unit 631 generates an interrupt for execution unit B to be debugged.
  • the response receiver 632 receives the response from the execution unit B to be debugged via the response generator 791.
  • the process control unit 793 performs process control of the normal operation program 74 running in the execution unit B to be debugged, and stops the runaway process.
  • the response generation unit 791 transmits information obtained as a result of the process control by the process control unit 793 to the execution unit B that generated the interrupt.
  • FIG. Figure 23 shows the execution unit 63 from the debug program 63 of execution unit A.
  • the debugging program 63 issues an inter-execution unit interrupt to the execution unit B to be debugged (step S401). Then, the interrupt handler 79 of the execution unit B is activated (step S402). By using the process control unit 793 in the interrupt handler 79, the process control of the normal operation program 74 executed in the execution unit B is performed (step S406). Thereafter, a response is generated by the response generation unit 791 and transmitted to the execution unit A (step S404), and the execution unit A receives the response using the response reception unit 632 (step S405).
  • interrupt handler 79 an interrupt handler for a timer interrupt that occurs periodically on execution unit B side is defined as interrupt handler 79, and execution unit A uses a communication unit (not shown) to instruct execution control of the target process. May be provided to execution unit B.
  • the timing of execution control is only the timing of timer interrupts that occur periodically.
  • the OS scheduler is provided with a process control change unit that changes the process control performed by the scheduler based on an instruction from the outside. This can be realized by sending a process change instruction from the process control unit 793 in the interrupt handler 79 to the process control change unit.
  • a process control signal issuing unit that issues a process control signal to the process to be controlled is provided by a procedure similar to the OS API (Application Program Interface) (system call, etc.). This can be realized by the process control signal issuing unit issuing a process control signal to the controlled process.
  • OS API Application Program Interface
  • the interrupt handler 79 is provided with an address changing unit that changes the return address to the controlled process saved in the storage area to another address. This can be realized by the address changing unit in the interrupt handler 79 changing the return address to an illegal address and generating an illegal address reference exception.
  • the OS performs abnormal termination processing due to the exception even for the processing that generates the exception. Therefore, the process can be terminated.
  • various process controls can be performed by configuring the exception handler to control other than abnormal termination processing, such as stopping the process.
  • the interrupt handler 79 is provided with an instruction change unit that changes an instruction existing at the return address to the controlled process saved in the storage area to another instruction. To do. This can be realized by causing the instruction change unit in the interrupt handler 79 to replace the instruction existing at the return address with a debug instruction, an illegal instruction, etc., and generate an exception.
  • the OS performs the abnormal termination processing due to the exception, so the process can be terminated.
  • various process controls can be performed by configuring the exception handler to control other than abnormal termination processing, such as stopping the process.
  • the operation when performing debugging on the execution unit A side from the debugging program on the execution unit B can be realized with the same mechanism.
  • a process control unit 793 is provided in the interrupt handler 79 executed by the execution unit B to be debugged, and the process to be debugged is controlled from within the interrupt handler 79. . Then, the execution unit B or later to be debugged
  • the debug program 63 running on the external execution unit A generates an interrupt to the debug target execution unit B, and controls the process in the interrupt handler 79.
  • the execution unit A force can also perform process control. Also, since process control is performed from within the interrupt handler 79 that is executed with a higher priority than the user process, even if there is a runaway process, the runaway!
  • the present invention is applicable to uses such as a system LSI debug system having a plurality of execution units.
  • the present invention can also be applied to embedded systems including a plurality of execution units, and debug systems for computer systems including a plurality of execution units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

 デバッグ用プログラム起動指示振り分け部(61,71)は、通信ポート(1)から送られてくるデバッグ用プログラムの起動指示を受信すると、この起動指示により指定されている実行ユニットに対して受信したデバッグ用プログラムを振り分ける。デバッグ用プログラム起動部(62,72)は、実行ユニット(A,B)毎に設けられ、起動指示振り分け部(61,71)により振り分けられた起動指示に基づいて、この起動指示により指定された実行ユニット上でデバッグ用プログラム(63,73)を起動する。

Description

明 細 書
デバッグシステム、デバッグ方法、およびプログラム
技術分野
[0001] 本発明は、デバッグシステム、デバッグ方法、およびプログラムに関し、特に、複数 の実行ユニットを有するシステムにおけるデバッグシステム、デバッグ方法およびプロ グラムに関する。
背景技術
[0002] 近年、開発するプログラムの規模は増大してきており、デバッグ作業に要する時間 が製品開発スケジュールに与える影響が大きくなつてきている。そのため、効率よくデ ノ ッグを行うことができる環境の構築が望まれて 、る。効率よくデバッグを行うための 手法として、特許文献 1の「プロセッサ情報収集装置およびそのプログラム記録媒体」 に記載されたデバッグシステムのように、デバッグを支援する診断プロセッサを用いる 方法がある。
[0003] 図 1に示すように、この従来のデバッグシステムは、演算プロセッサ群 801と、メモリ 装置 802と、演算プロセッサ群 801の動作状態を監視する診断プロセッサ 803とを備 えている。そして、診断プロセッサ 803は、演算プロセッサ群 801を構成する各演算 プロセッサがストール状態になったことを検出するストール検出部 831と、演算プロセ ッサの内部状態を採集する採集部 832と、演算プロセッサの内部状態をメモリ装置 8 02に保存する書込み部 834と、メモリ装置 802に演算プロセッサの内部状態を保持 したまま情報処理システムを初期化する初期化部 836とから構成されている。
[0004] このような構成を有する従来のデバッグシステムは次のように動作する。
[0005] まず、ストール検出部 831が、演算プロセッサ群 801を構成する各演算プロセッサ 力 Sストール状態になったことを検出する。ストールが発生した場合、採集部 832が、演 算プロセッサの内部状態を採集し、書込み部 834が、採集された演算プロセッサの 内部状態を、演算プロセッサの内部状態 821としてメモリ装置 802に書き込む。そし て、メモリ装置 802に演算プロセッサの内部状態を保持したまま情報処理システムが 初期化される。よって、初期化後もメモリ装置 802上に演算プロセッサの内部状態の 情報が保存されているため、この情報を用いることで、ストールが発生した状況につ V、てのデバッグ作業を行うことができる。
[0006] しかし、特許文献 1に記載の従来技術のように、診断プロセッサ 803というデバッグ のための高機能な専用ハードウェアをシステムに搭載する手法は、デバッグを効率 化する効果をもたらすものの、通常動作に寄与しな 、ノヽ一ドウエアの追カ卩が必要とな り、システムのコストが増加するという弊害がある。また、特に組込み機器ではコストに 対する要求が厳しく、専用ハードウェアの搭載が許容されな 、ことが多 、。
[0007] 一方で、半導体集積回路の微細化や、システム LSIに対して要求される機能の高 度化に伴い、システム LSIに CPUなどの複数の実行ユニットを搭載することが増えて きている。デバッグのための専用ハードウェアによるコストの増加を避けつつ、デバッ グを効率ィ匕する従来技術として、特許文献 2の「マルチ CPUのリセット回路およびリセ ット方法」に記載されたデバッグシステムがある。
[0008] 図 2に示すように、この従来のデバッグシステムは、複数の CPU (CPU—A901、 C PU— B902)を内蔵するシステム LSIのリセットおよび割り込みを制御する CPU制御 回路 903を備えている。 CPU制御回路 903は、複数の CPU (CPU—A901、 CPU -B902)のうちの 1つを、通常動作用プログラムをデバッグ用プログラムに置き換え たデバッグ手段に設定する機能を有する。また、 CPU制御回路 903は、割込み制御 回路 904と、バストレース機能 905と、ストラップ取込み回路 906と、デバッグ制御回 路 907とを備えている。
[0009] このような構成を有する従来のデバッグシステムの動作について、図 3を参照して説 明する。
[0010] まず、 CPU制御回路 903がハードウェアリセットを検知すると、デバッグ制御回路 9 07力 内部の各機能ブロック(図示せず)にリセットを発行する (ステップ S91)。
[0011] 次に、ストラップ取込み回路 906が、ストラップ設定部 908からのストラップ情報等の 外部設定情報を読み込む (ステップ S92)。
[0012] 読み込んだストラップ情報が通常動作を示して 、る場合 (ステップ S93の No)、デ ノ ッグ制御回路 907が、読み込んだストラップ情報に基づき、 CPU— A901および C PU— B902と各機能ブロックとに対するリセットを解除する (ステップ S94)。 [0013] リセットが解除されると、各機能ブロックは動作を開始する (ステップ S95)。
[0014] 一方、読み込んだストラップ情報がデバッグを指定して 、る場合 (ステップ S93の Y es)、デバッグ処理に入る(ステップ S96)。
[0015] ここで、ストラップ情報がデバッガとして CPU— B902を選択して 、る場合 (ステップ S961の B)、デバッグ制御回路 907が、ストラップ情報により選択された CPU— B90 2のリセットを解除する(ステップ S962)。
[0016] その後、デバッガ CPU— B902が起動し (ステップ S963)、立ち上がり動作が完了 すると(ステップ S 964の Yes)、ターゲット側の CPU— A901と各機能ブロックのリセッ トを解除する (ステップ S965)。
[0017] 一方、ストラップ情報がデバッガとして CPU— A901を選択している場合 (ステップ S961の A)、デバッグ制御回路 907が、ストラップ情報により選択された CPU— A90 1のリセットを解除する(ステップ S966)。
[0018] その後、デバッガ CPU— A901が起動し (ステップ S967)、立ち上がり動作が完了 すると(ステップ S968の Yes)、ターゲット側の CPU— B902と各機能ブロックのリセッ トを解除する (ステップ S969)。
[0019] 複数の実行ユニットが連携動作するシステムにお 、て実行されるプログラムのデバ ッグを行う場合、複数の実行ユニット間の通信に関する情報であって実行ユニット以 外の外部力 確認できる情報や、不具合発生時の情報を保存しておいて、これらの 情報を後から確認することがある。しかし、この方法では、不具合発生原因を十分に 追究することができないことが多い。他方、通常動作プログラムにより生成される送信 内容を擬似的に生成するデバッグ用プログラムや、送受信内容をデバッグ作業者に 通知するデバッグ用プログラムを利用すると、不具合発生原因を効果的に追求でき ることが多い。そのため、これらのデバッグ用プログラムを実行ユニット上で動作させ てデバッグ作業を行うことがある。
[0020] 一方で、これらのデバッグ用プログラムを事前に動作させておくと、 CPUの負荷が 高くなり、また、デバッグ用プログラムが記憶領域を使用することから、通常動作プロ グラムの動作タイミングなどに影響が出る。そのため、デバッグ用プログラムの存在に よって、通常動作で発生する可能性がある不具合が発生しない、また、この逆に通常 動作プログラムのみの実行では発生しないはずの不具合が発生するなどの弊害があ る。
[0021] また、複数の実行ユニットが連携動作するシステムにおいて実行されるプログラムに おいては、特にタイミングに起因する不具合については、その不具合がどの実行ュ ニットで発生するかが一意に定まらないため、その不具合の発生を想定することは困 難である。ここで、実行ユニットがストール状態になった場合や、実行ユニットの動作 に影響が出る不具合が発生した場合、ストール状態になった実行ユニット上のデバッ グ用プログラムや、動作に影響を受けた実行ユニット上のデバッグ用プログラムが使 用できないことがある。そのため、別の実行ユニット上でデバッグ用プログラムを動作 させる必要がある。しかし、不具合発生箇所が一意に定まらない不具合の場合、その 不具合に影響を受けな 、実行ユニットを決定しておくことができな 、。
[0022] また、特許文献 2に記載の従来手法は、リセット時にデバッグ用プログラムを起動す る実行ユニット(デバッグ用 CPU)を割り当てることを特徴としており、デバッグ用 CPU を変更する場合には再度リセットを行う必要がある。そのため、リセット時に割り当てら れたデバッグ用 CPUの動作に影響を与える不具合が発生した場合、その状況をデ ノ ッグすることができない。
[0023] 上述したように、上記の従来のデバッグシステムでは、複数の実行ユニット(CPU) が連携動作するシステムにおいてデバッグを行う際に、下記のような問題が発生する
(1)予めデバッグ用プログラムを起動させておくと、通常動作プログラムのみを動作さ せた場合と動作タイミングが異なってしまうため、デバッグ用プログラムの存在によつ て、通常動作で発生する可能性がある不具合が発生しない、また、この逆に通常動 作プログラムのみの実行では発生しないはずの不具合が発生する。
(2)デバッグ用プログラムを実行させる実行ユニットを予め設定しておく必要があるが 、設定された実行ユニットの動作に影響を及ぼす不具合が発生した場合、その状況 をデバッグすることができなくなる。
特許文献 1:特開平 11― 184736号公報
特許文献 2:特開 2004 - 164113号公報 発明の開示
[0024] 本発明は上記の問題点に鑑みてなされたものであって、複数の実行ユニットが連 携動作するシステムにお 、て、任意の実行ユニット上で任意のタイミングでデバッグ 用プログラムを起動して、デバッグ作業を行うことを可能にするデバッグシステム、デ ノ ッグ方法、およびプログラムを提供することを目的とする。
[0025] 上記目的を達成するために、本発明のデバッグシステムは、
複数の実行ユニットが連携動作するシステムにおいて実行されるプログラムのデバ ッグを行うためのデバッグシステムであって、
デバッグ用プログラムの起動を指示する起動指示を受信すると、前記複数の実行 ユニットに対して前記起動指示を振り分ける起動指示振り分け手段と、
前記複数の実行ユニットの各々に対応して設けられ、前記起動指示振り分け手段 により振り分けられた起動指示に基づいて、対応する実行ユニット上でデバッグ用プ ログラムを起動する複数のデバッグ用プログラム起動手段とを備えている。
[0026] また、前記起動指示振り分け手段は、前記起動指示により指定された実行ユニット に対応するデバッグ用プログラム起動手段に対して前記起動指示を送信してもよい。
[0027] 本発明によれば、デバッグ用プログラムを起動するためのデバッグ用プログラム起 動手段を各実行ユニット毎に設け、このデバッグ用プログラム起動手段により、起動 指示振り分け手段により振り分けられた起動指示に基づいてデバッグ用プログラムの 起動を行うようにしている。そのため、通常動作プログラムのみを動作させた状態で不 具合が確認された場合であっても、任意のタイミングで不具合の発生原因となる処理 を行っている実行ユニット上でデバッグ用プログラムを起動してデバッグ作業を行うこ とが可能となる。
[0028] また、前記起動指示振り分け手段は、前記複数の実行ユニットの各々の動作状況 に基づ!/ヽて定められる実行ュニットに対応するデバッグ用プログラム起動手段に対し て前記起動指示を送信してもよ ヽ。
[0029] また、前記起動指示振り分け手段は、前記複数の実行ユニットの各々が利用する 記憶領域の空き容量を検出し、検出された空き容量に余裕のある実行ユニットに対 応するデバッグ用プログラム起動手段に対して前記起動指示を送信してもよい。 [0030] このようにすれば、空き容量不足でデバッグ用プログラムを起動できない状態が発 生することを防ぐことが可能となる。
[0031] また、前記起動指示振り分け手段は、デバッグ対象の実行ユニットと関係が無いま たは関係が少ない実行ユニットに対応するデバッグ用プログラム起動手段に対して 前記起動指示を送信してもよ ヽ。
[0032] このようにすれば、不具合の発生原因となる処理を行って!/、る実行ユニットと連携し て動作している実行ユニット上でデバッグ用プログラムを起動して不具合の発生原因 が確認できなくなるという弊害の発生を防ぐことが可能となる。
[0033] また、本発明の他のデバッグシステムでは、前記複数の実行ユニットの!/、ずれか 1 つに対応して設けられ、通信ポートからデバッグ用プログラムに対して送信されるコマ ンドを、前記起動指示により指定された実行ユニット上のデバッグ用プログラムに対し て中継する中継手段をさらに備える。
[0034] 本発明によれば、通信ポートの通信対象の実行ユニットが固定されているようなシ ステムに対しても適用が可能になる。
[0035] さらに、本発明の他のデバッグシステムでは、前記複数の実行ユニットの各々に対 応して設けられ、通信ポートからデバッグ用プログラムに対して送信されるコマンドを
、前記起動指示により指定された実行ユニット上のデバッグ用プログラムに対して中 継する複数の中継手段をさらに備える。
[0036] 本発明によれば、デバッグ用プログラムに対して送信されるコマンドを中継する中 継手段が各実行ユニット毎に設けられているので、ある実行ユニットがストール状態と なった場合でも、通信ポートの通信対象の実行ユニットの煩雑な切り替えを不要とし つつ、複数の実行ユニットで同時に複数のデバッグ用プログラムを起動することが可 能となる。
[0037] さらに、本発明の他のデバッグシステムでは、前記起動指示がストール状態の実行 ユニットに対応するデバッグ用プログラム起動手段には送信されないようにするスト一 ル発生実行ユニット回避手段をさらに備える。
[0038] 本発明によれば、ストール発生実行ユニット回避手段を設けることにより、デバッグ 用プログラム起動指示力 Sストール状態の実行ユニットに対応するデバッグ用プロダラ ム起動手段に対して送信されてしま 、、デバッグ作業を行うことができな 、と 、う弊害 を防ぐことが可能となる。
[0039] さらに、本発明の他のデバッグシステムでは、
前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に は、
仮想アドレスを物理アドレスに変換する物理'仮想アドレス変換手段と、 前記物理'仮想アドレス変換手段により変換された物理アドレスを用いて、オペレー ティングシステムが管理情報をメモリに配置する構造を考慮して、前記デバッグ用プ ログラムが起動している実行ユニットとは異なるデバッグ対象の実行ユニットが利用す る記憶領域力 必要情報を抽出する情報抽出手段とが構成されている。
[0040] 本発明によれば、デバッグ用プログラム内に物理'仮想アドレス変換手段と情報抽 出手段とを構成しているので、デバッグ用プログラムは、起動された実行ユニットとは 異なる実行ユニットが利用する記憶領域を参照することが可能になる。そのため、デ ノ ッグ対象の実行ユニットがストール状態となった場合でも、外部力も記憶領域の内 容を確認することが可能となる。
[0041] さらに、本発明の他のデバッグシステムでは、前記複数の実行ユニットの中カも不 具合が発生した実行ユニットを検出し、検出された実行ユニットのデバッグを行うため の起動指示を生成する不具合検出手段をさらに備える。
[0042] 本発明によれば、複数の実行ユニットの中のいずれかの実行ユニットに不具合が 発生した場合、その不具合をデバッグするためのデバッグ用プログラムの起動指示を 不具合検出手段により生成してデバッグ用プログラムを自動的に起動することが可能 となる。従って、外部力もデバッグ用プログラム起動指示を生成することなぐデバッグ 作業を行うことが可能となる。
[0043] さらに、本発明の他のデバッグシステムでは、
前記複数の実行ユニットの各々にお 、て割り込みが発生した場合に該割り込みを 処理するために最初に起動されるプログラムである割り込みハンドラ内には、 他の実行ユニットからの割り込みが発生した際に、予め設定されたメモリ内の情報を 取得する情報取得 ·制御手段と、 前記情報取得 '制御手段により取得された情報を、割り込みを発生させた実行ュニ ットに対して送信する応答生成手段とが構成されており、
前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に は、
デバッグ対象の実行ユニットに対して割り込みを発生させる実行ユニット間割り込み 生成手段と、
デバッグ対象の実行ユニットからの応答を受信する応答受信手段とが構成されてい る。
[0044] 本発明によれば、割り込みハンドラ内にメモリ内の情報を取得するための情報取得 •制御手段を構成し、デバッグ用プログラム内に実行ユニット間割り込み生成手段を 構成しているので、デバッグ対象の実行ユニットがストール状態となった場合でも、キ ャッシュメモリやレジスタ等のメモリ内の情報を取得してデバッグ作業を行うことが可能 となる。
[0045] 以上説明したように、本発明は、デバッグ用プログラム起動指示振り分け手段と、デ ノ ッグ用プログラム起動手段を備えることにより、任意のタイミングで任意の実行ュ- ット上にデバッグ用プログラムを起動できるよう構成されていることにより、通常動作プ ログラムのみを実行した状態で不具合を発生させる力、その直前まで進め、その後、 不具合の発生原因となる処理を行っている実行ユニット上にデバッグ用プログラムを 起動し、デバッグ作業を行うことが可能になるという効果を得ることができる。
図面の簡単な説明
[0046] [図 1]従来のデバッグシステムの一構成例を示すブロック図である。
[図 2]従来のデバッグシステムの他の構成例を示すブロック図である。
[図 3]図 2に示したデバッグシステムの動作を説明するフローチャートである。
[図 4]本発明を実施するための対象ハードウェアの一構成例を示すブロック図である
[図 5]本発明の第 1の実施形態のデバッグシステムの構成を示すブロック図である。
[図 6]図 5に示したデバッグ用プログラム起動指示振り分け部の一構成例を示すプロ ック図である。 [図 7]図 5に示したデバッグシステムの動作を説明するフローチャートである。
[図 8]図 5および図 6に示したデバッグ用プログラム起動指示振り分け部の動作を説 明するフローチャートである。
[図 9]本発明の第 2の実施形態のデバッグシステムの構成を示すブロック図である。
[図 10]本発明の第 3の実施形態のデバッグシステムの構成を示すブロック図である。
[図 11]本発明の第 4の実施形態のデバッグシステムの構成を示すブロック図である。
[図 12]図 11に示したストール発生実行ユニット回避部の動作を説明するフローチヤ ートである。
[図 13]本発明の第 5の実施形態のデバッグシステムの構成を示すブロック図である。
[図 14]図 13に示した物理'仮想アドレス変換部の第 2の物理'仮想アドレス変換動作 を説明するフローチャートである。
[図 15]図 13に示した情報抽出部の動作を説明するフローチャートである。
[図 16]本発明の第 6の実施形態のデバッグシステムの構成を示すブロック図である。
[図 17]図 16に示した不具合検出部の第 2の構成の動作を説明するフローチャートで ある。
[図 18]図 16に示した不具合検出部の第 3の構成の動作を説明するフローチャートで ある。
[図 19]図 16に示した不具合検出部の第 4の構成の動作を説明するフローチャートで ある。
[図 20]本発明の第 7の実施形態のデバッグシステムの構成を示すブロック図である。
[図 21]図 20に示したデバッグシステムの動作を説明するフローチャートである。
[図 22]本発明の第 8の実施形態のデバッグシステムの構成を示すブロック図である。
[図 23]図 22に示したデバッグシステムの動作を説明するフローチャートである。 発明を実施するための最良の形態
[0047] 以下に、本発明の実施形態について図面を参照して説明する。
[0048] (第 1の実施形態)
まず、本発明の第 1の実施形態のデバッグシステムについて図面を参照して説明 する。 [0049] 図 4に示すように、本実施形態のデバッグシステムは、 2個の実行ユニット A, Bと、 通信ポート 1と、 RAM (Random Access Memory)等により構成され書き換え可能な記 憶部 2と、 HDD (Hard Disk Drive)装置等により構成され各種プログラムが格納され たプログラム格納部 3とを備えている。そして、記憶部 2の記憶領域は、実行ユニット A用プログラム領域 6と、実行ユニット B用プログラム領域 7とから構成されている。
[0050] 図 5に示すように、実行ユニット A用プログラム領域 6は、デバッグ用プログラム起動 指示振り分け部(図 5中では、振り分け部と表示する。)61と、デバッグ用プログラム起 動部(図 5中では、起動部と表示する。)62と、デバッグ用プログラム 63と、通常動作 プログラム 64とを備えて 、る。これらは実行ユニット A上で実行されるプログラムとして 構成されている。
[0051] また、図 5に示すように、実行ユニット B用プログラム領域 7も、デバッグ用プログラム 起動指示振り分け部 71と、デバッグ用プログラム起動部 72と、デバッグ用プログラム 73と、通常動作プログラム 74とを備えている。これらは実行ユニット B上で実行される プログラムとして構成されて 、る。
[0052] ここで、デバッグ用プログラム起動指示振り分け部 61, 71およびデバッグ用プログ ラム起動部 62, 72は、記憶部 2内では単にプログラムとして記憶されていて、実行ュ ニット A, B上で起動されて初めて各種の動作を行うものである。ただし、ここでは、説 明を簡単にするために、デバッグ用プログラム起動指示振り分け部 61, 71およびデ バッグ用プログラム起動部 62, 72は、独自に各種の動作を行うものとして説明する。
[0053] これらの各種プログラムは、プログラム格納部 3から記憶部 2に読み込まれ、記憶部 2上の所定の領域に記憶される。
[0054] デバッグ用プログラム起動指示振り分け部 61, 71は、通信ポート 1から送られてくる デバッグ用プログラムの起動指示 (以下、単に、起動指示と称する。)を受信すると、 この起動指示により指定されている実行ユニットに対して、受信したデバッグ用プログ ラムを振り分ける。デバッグ用プログラム起動部 62, 72は、実行ユニット A, Bの各々 に対応して設けられており、起動指示振り分け部 61, 71により振り分けられた起動指 示に基づいて、対応する実行ユニット上でデバッグ用プログラム 63, 73を起動する。
[0055] ここで、図 6に示すように、デバッグ用プログラム起動指示振り分け部 61は、通信ポ ート 1から起動指示を受信する受信部 611と、デバッグ用プログラム起動部 62に起動 指示を送信する送信部 614と、実行ユニット間通信を用いて他の実行ユニット Bに起 動指示を送信する送信部 612と、他の実行ユニット Bから実行ユニット間通信を用い て送信されてくる起動指示を受信する受信部 615と、通信ポート 1の通信対象の実行 ユニットを変更する通信対象変更部 613とを備えている。
[0056] また、デバッグ用プログラム起動指示振り分け部 71も同様に、受信部 711と、送信 部 714と、送信部 712と、受信部 715と、通信対象変更部 713とを備えている。
[0057] 次に、図 5および図 7のフローチャートを参照して本実施形態のデバッグシステムの 全体動作について説明する。
[0058] まず、外部の制御端末(図示せず)において入力された起動指示が、通信ポート 1 に対して送られてくる。この起動指示には、デバッグ用プログラムを起動する実行ュ ニットを指定する符号と、起動するデバッグ用プログラムの種別を指定する符号とが 含まれている。
[0059] ここで、デバッグ用プログラム起動指示振り分け部 61, 71が、通信ポート 1からデバ ッグ用プログラム起動指示を受信すると (ステップ S1)、起動指示で指定されている、 デバッグ用プログラムを起動する実行ユニットに対して、起動指示を振り分け、デバッ グ用プログラム起動部 62, 72に起動指示を発行する (ステップ S2)。その後、デバッ グ用プログラム起動部 62, 72が、デバッグ用プログラム 63, 73の起動を行う(ステツ プ S3)。
[0060] ここで、デバッグ用プログラム 63, 73が通信ポート 1からコマンドを受信すると (ステ ップ S4)、デバッグ用プログラム 63, 73により構成されるコマンド解析部(図示せず) 力 Sコマンドを解析する。通信ポート 1から受信したコマンドがデバッグコマンドの場合 は (ステップ S5の No)、コマンドに応じた作業内容が実行され、デバッグ作業が行わ れる。ここで、作業内容によっては通信ポート 1を通じてデータの送受信を行うことも ある。通信ポート 1から受信したコマンドが終了コマンドであった場合は (ステップ S5 の Yes)、デバッグ用プログラム 63, 73はデバッグを終了する。
[0061] ここで、コマンド解析部とは、受信したコマンドの内容を解析するための手段であり、 デバッグ用プログラム 63, 73により構成される。また、コマンドの種類としては、上述 した終了コマンド以外にも、メモリやレジスタの内容を読み込むコマンドや、メモリゃレ ジスタに値を書き込むコマンドが存在する。
[0062] 次に、図 6および図 8のフローチャートを参照して、デバッグ用プログラム起動指示 振り分け部 61, 71の動作について説明する。ここでは、通信ポート 1の割り込み先の 初期値が実行ユニット Aであるものとして説明する。
[0063] まず、デバッグ用プログラム起動指示が通信ポート 1から送られてきた場合、実行ュ ニット Aに対する割り込みが発生し (ステップ S11)、起動指示振り分け部 61が起動す る。その後、受信部 611が通信ポート 1からの起動指示を受信し (ステップ S12)、そ の宛先を判定する。ここで、宛先が実行ユニット Aであった場合には (ステップ S21の Yes)、送信部 614が、実行ユニット Aのデバッグ用プログラム起動部 62に対して起 動指示を送信する (ステップ S22)。一方、宛先が実行ユニット Bであった場合には( ステップ S21の No)、ユニット間通信を用いる送信部 612が、実行ユニット Bに対して 起動指示を送信する (ステップ S23)。次に、実行ユニット B側の起動指示振り分け部 71が、受信部 715によりこの起動指示を受信すると (ステップ S24)、通信対象変更 部 713が、通信ポート 1の通信対象を実行ユニット Bに変更し (ステップ S25)、送信 部 714が、実行ユニット Bのデバッグ用プログラム起動部 72に対して起動指示を送信 する。
[0064] なお、本実施形態では、通信ポート 1からデバッグ用プログラムの起動指示を受け 取ることによって、デバッグ用プログラムを起動するものとして説明した。その他にも、 タイマなどを用いて起動指示を与えることにより一定時間経過後にデバッグ用プログ ラムを起動し、その時点での状況を確認するような構成とすることもできる。また、ブレ イクポイントを設定する方法、ある地点に到達した時にデバッグ対象のプログラム自 身が起動指示を発行する方法などにより、プログラムが特定地点に到達したことによ つて、デバッグ用プログラムを起動することとしてもよい。
[0065] また、本実施形態では、 2個の実行ユニット A, Bを備えるシステムを例に挙げて説 明したが、 3個以上の任意の個数の実行ユニットを備えるシステムへの拡張も容易に 可能である。
[0066] さらに、本実施形態では、デバッグ用プログラムを起動する実行ユニットが予め指定 されていて、デバッグ用プログラム起動指示振り分け部 61, 71は、起動指示により指 定された実行ユニットに対して起動指示を振り分けるものとして説明したが、デバッグ 用プログラムを起動する実行ユニットを自動的に選択する構成とすることもできる。例 えば、実行ユニット A, Bの動作状況に基づいて定められる実行ユニットに対応した デバッグ用プログラム起動部に対して起動指示を送るように、デバッグ用プログラム起 動指示振り分け部 61, 71を構成することができる。ここで、実行ユニット A, Bの動作 状況とは、例えば、各実行ユニット A, Bが利用する記憶領域の空き容量や、実行ュ ニット A, B間の連携の状態等を示している。
[0067] 各実行ユニット A, Bの記憶領域の空き容量に基づいて振り分け先を選択する場合 、例えば、各実行ユニット A, Bの記憶領域の空き容量を検出し、検出された空き容 量に余裕がある実行ユニットに対応したデバッグ用プログラム起動部に対して起動指 示を振り分けるように、起動指示振り分け部 61, 71を構成することができる。このよう な構成とするための方式としては、各実行ユニット A, B上の起動指示振り分け部 61 , 71が空き容量の検出を行い、他の実行ユニットに対して空き容量を通知する方式 や、各実行ユニット A, B上の起動指示振り分け部 61, 71が、他の実行ユニットが利 用する記憶領域を直接参照して、単独で空き容量を検出する方式などがある。
[0068] また、本実施形態では、 2個の実行ユニット A, Bが連携して動作を行うシステムを 例に挙げて説明した。 3個以上の実行ユニットで連携を行いながら動作するシステム に利用されるプログラムをデバッグ対象とする場合には、その連携の状態を把握して 起動指示の振り分け先を決定することもできる。
[0069] この場合には、まず、各プログラムが他のプログラムとの通信経路を確保したことを 検出し、デバッグ対象とする連携動作しているプログラムとの関係が無いまたは関係 が少ない実行ユニット上に起動指示を振り分けるように、起動指示振り分け部 61, 71 を構成することができる。ここで、通信経路が確保されたことの検出方法としては、プ ログラムが通信経路を確保する関数呼び出しを行ったことを検出する方法、通信経 路のステータスが保存されている記憶領域を観測する方法などを採用することができ る。
[0070] その逆に、デバッグ対象のプログラムが別の実行ユニット上で動作しているプロダラ ムと連携して 、る場合、デバッグ対象のプログラムが動作して 、る実行ユニットだけで なぐその連携先の実行ユニットに対しても起動指示を振り分け、連携するプログラム をまとめてデバッグ対象とするような構成とすることもできる。
[0071] 次に、本実施形態のデバッグシステムの効果について説明する。
[0072] 本実施形態では、デバッグ用プログラム起動指示振り分け部 61, 71とデバッグ用 プログラム起動部 62, 72とを実行ユニット A, B上で実行されるプログラムとして構成 し、起動指示の受信後に、デバッグ用プログラムを実行ユニット A, B上のいずれかで 起動するよう構成されて 、るため、デバッグ専用のハードウェアによりコストが増加す ることなぐデバッグ作業の効率ィ匕を図ることができる。
[0073] また、本実施形態では、デバッグ用プログラム起動指示振り分け部 61, 71とデバッ グ用プログラム起動部 62, 72とを備えているため、任意のタイミングで任意の実行ュ ニット上でデバッグ用プログラムを起動することが可能となる。その結果、通常動作プ ログラムのみを実行した状態で不具合を発生させるか、通常動作プログラムを不具合 が発生する直前まで実行し、その後に、不具合の発生原因となる処理を行っている 実行ユニット上でデバッグ用プログラムを起動し、デバッグ作業を行うことが可能であ る。
[0074] また、本実施形態では、タイマなどを用いてデバッグ用プログラムの起動指示を与 え、一定時間経過後にデバッグ用プログラムを起動する構成とすることもできる。この ような構成とすることで、デバッグ作業者自身が起動指示を入力することで生じる、デ ノ ッグ用プログラムを起動するタイミングがばらつくといった影響を排除することが可 能となり、また、高い時間精度で起動時間を調整することが可能となる。
[0075] また、本実施形態では、ブレイクポイントを設定する方法、ある地点に到達した時に デバッグ対象のプログラム自身が起動指示を発行する方法などにより、プログラムが 特定地点に到達したことによってデバッグ用プログラムを起動する構成とすることもで きる。このような構成とすることで、起動時間を調整するのみでは、観測を行いたい地 点への到達時間が条件により一定にならな 、場合にぉ 、ても、観測を行!ヽた 、地点 でデバッグ用プログラムを起動することが可能となる。
[0076] さらに、既に動作している通常動作プログラムによって記憶領域が使用されており、 デバッグ用プログラムを追加で起動できない場合がある。一方で、デバッグ用プログ ラムの中には、どの実行ユニットで起動してもデバッグ作業を行えるタイプのものがあ る。このような場合に、本実施形態では、各実行ユニットの記憶領域の空き容量を検 出し、空き容量に余裕がある実行ユニットに対して起動指示を振り分ける構成とする こともできる。このような構成とすることで、空き容量不足でデバッグ用プログラムが起 動できな 、実行ユニットを避けて、起動指示を発行することができる。
[0077] また、連携動作して!/、るプログラムが実行されて 、る実行ユニット上でデバッグ用プ ログラムを起動すると、連携動作して 、るプログラムの動作に影響を与えることがあり 、デバッグ作業に支障をきたすことがある。このような場合に、本実施形態では、連携 の状態を把握して起動指示を発行する構成とすることもできる。このような構成とする ことで、連携動作して 、るプログラムが実行されて 、る実行ユニットとは異なる実行ュ ニット上でデバッグ用プログラムを起動することができる。
[0078] (第 2の実施形態)
次に、本発明の第 2の実施形態のデバッグシステムについて図面を参照して説明 する。
[0079] 上記で説明した第 1の実施形態は、通信ポートの通信対象の実行ユニットを変更で きるシステムに対して本発明を適用した場合であった。しかし、システムによっては、 通信ポートの通信対象の実行ユニットを変更できな!/、、つまり通信ポートの通信対象 の実行ユニットが固定されているようなシステムも存在する。このようなシステムに対し て本発明を適用した場合、デバッグ用プログラム起動指示振り分け部を各実行ュ-ッ トに対して設けたとしても、通信ポートの通信対象となって 、な 、実行ユニット上で起 動されたデバッグ用プログラムに対してコマンドを送信することができない。
[0080] 本実施形態のデバッグシステムは、通信ポートの通信対象の実行ユニットが固定さ れて 、るシステムに対して適用可能な構成となって 、る。
[0081] 図 9に示すように、本実施形態のデバッグシステムは、図 5に示された第 1の実施形 態における構成と比較して、他の実行ユニットで実行されるデバッグ用プログラムの 通信を中継する中継部 65を追加した構成となって 、る。
[0082] 中継部 65は、 2つの実行ユニット A, Bのうちの実行ユニット A上で実行されるもの であり、通信ポート 1からデバッグ用プログラム 63, 73に対して送信されるコマンドを、 起動指示により指定された実行ユニット上のデバッグ用プログラムに対して中継する
[0083] 本実施形態における通信ポート 1は、通信対象の実行ユニットが実行ユニット Aに 固定されている。そして、中継部 65は、通信ポート 1からのコマンドの宛先が実行ュ ニット Aの場合には、そのコマンドを実行ユニット Aのデバッグ用プログラム 63に送信 し、また、通信ポート 1からのコマンドの宛先が実行ユニット Bの場合には、そのコマン ドを実行ユニット Bのデバッグ用プログラム 73に送信する。
[0084] 本実施形態における起動指示振り分け部 61, 71は、図 6に示した起動指示振り分 け部 61, 71のうち、通信対象変更部 613, 713と、実行ユニット A側のユニット間通 信受信部 615と、実行ユニット B側のユニット間通信送信部 712および通信ポート受 信部 711とを省略することができる。
[0085] 本実施形態における全体動作は、本発明の第 1の実施形態と同一である。起動指 示振り分け部 61, 71の動作は、図 8における通信ポートの通信対象を変更するステ ップがないことを除いて本発明の第 1の実施形態と同一である。
[0086] また、本実施形態では、 2個の実行ユニット A, Bを備えるシステムを例に挙げて説 明したが、 3個以上の任意の個数の実行ユニットを備えるシステムへの拡張も容易に 可能である。
[0087] 次に、本実施形態のデバッグシステムの効果について説明する。
[0088] 本実施形態では、実行ユニット A用プログラム領域 6に、デバッグ用プログラム 63, 73への通信を中継する中継部 65が備えられ、この中継部 65が、実行ユニット Bで実 行されるデバッグ用プログラム 73の通信を中継するように構成されている。そのため 、通信ポート 1の通信対象の実行ユニットが実行ユニット Aに固定されていて変更で きないようなシステムに対しても、本発明を適用することが可能となる。また、通信ポー ト 1と直接通信して 、な 、実行ユニット B上のデバッグ用プログラム 73も中継部 65に よって通信が可能となるため、複数の実行ユニット A, Bで同時に複数のデバッグ用 プログラム 63, 73を利用することが可能となる。
[0089] (第 3の実施形態) 次に、本発明の第 3の実施形態のデバッグシステムについて図面を参照して説明 する。
[0090] 本実施形態のデバッグシステムは、第 1の実施形態のデバッグシステムと同様に、 通信ポートの通信対象の実行ユニットの変更が可能なシステムに対して本発明を適 用したものである。
[0091] 通信ポートの通信対象の実行ユニットの変更が可能なシステムでは、デバッグ用プ ログラムに対するコマンドは、通信ポートの切り替えにより送信することが可能である。 しかし、複数のデバッグ用プログラムを同時に起動させるような場合、通信ポートの切 り替えが煩雑に発生することが予想される。また、通信ポートの通信対象の実行ュ- ットを変更する処理には、ある程度のオーバヘッドが必要となる。
[0092] そのため、通信ポートの通信対象の実行ユニットを変更可能な場合であっても、図 9に示した第 2の実施形態のデバッグシステムにおける中継部を用いて、デバッグ用 プログラムへの各種コマンドを中継した方力 S、通信ポートを切り替える処理が不要とな り処理の軽減を図ることが可能となる。
[0093] しかし、この中継部をある特定の実行ユニットにし力備えないような構成を採用した 場合、中継部が備えられた実行ユニットがストール状態となると、中継部自体も機能 しなくなつてしまう。
[0094] そのため、本実施形態のデバッグシステムは、どの実行ユニットがストール状態にな つた場合でも、デバッグ用プログラムへの各種コマンドを中継することが可能なように 、中継部を各実行ユニット毎に設けた構成になっている。
[0095] 以下では、説明の都合により、 3つの実行ユニット A, B, Cが存在するシステムに対 して本発明を適用した場合について説明する。
[0096] 図 10に示すように、本実施形態のデバッグシステムは、図 5に示された第 1の実施 形態における構成と比較して、実行ユニット C用プログラム領域 8を新たに追加し、さ らに、他の実行ユニットで実行されるデバッグ用プログラムの通信を中継するための 実行ユニット A側の中継部 65、実行ユニット B側の中継部 75、および実行ユニット C 側の中継部 85を追カ卩した構成となって 、る。
[0097] 本実施形態における中継部 65, 75, 85は、 3つの実行ユニット A, B, C上でそれ ぞれ実行されるものであり、通信ポート 1からデバッグ用プログラム 63, 73, 83に対し て送信されるコマンドを、起動指示により指定された実行ユニット上のデバッグ用プロ グラムに対して中継する。
[0098] 実行ユニット C用プログラム領域 8は、デバッグ用プログラム起動指示振り分け部 81 と、デバッグ用プログラム起動部 82と、デバッグ用プログラム 83と、通常動作プロダラ ム 84とを備えて 、る。これらは実行ユニット C上で実行されるプログラムとして構成さ れている。
[0099] 本実施形態における起動指示振り分け部 61, 71の動作は、本発明の第 1の実施 形態と同様である。また、起動指示振り分け部 81の動作は、起動指示振り分け部 61 , 71と同様である。ただし、起動指示振り分け部 61, 71, 81の動作における通信ポ ート 1の通信対象を変更するステップについては、 2つ目以降のデバッグ用プロダラ ムを起動する場合には切り替えが無駄であることも考えられるため、実行しなくてもよ い。
[0100] また、本実施形態では、 3個の実行ユニット A, B, Cを備えるシステムを例に挙げて 説明したが、 4個以上の任意の個数の実行ユニットを備えるシステムへの拡張も容易 に可能である。
[0101] 次に、本実施形態のデバッグシステムの効果について説明する。
[0102] 本実施形態では、各実行ユニット A, B, C毎に、デバッグ用プログラムへの通信を 中継する中継部 65, 75, 85を備え、他の実行ユニットで実行されるデバッグ用プロ グラムの通信を 、ずれの実行ユニットでも中継可能なように構成されて 、る。そのた め、ある実行ユニットがストール状態になった場合でも、通信ポート 1の通信対象の実 行ユニット A, B, Cの煩雑な切り替えを不要としつつ、複数の実行ユニット A, B,じで 同時に複数のデバッグ用プログラム 63, 73, 83を利用することができる。
[0103] 例えば、図 10に示した本実施形態のデバッグシステムにおいて、 3つのデバッグ用 プログラム 63, 73, 83をそれぞれ起動した場合を例に挙げて説明する。
[0104] 図 10の例では、通信ポート 1の通信対象実行ユニットとして実行ユニット Aが設定さ れている。そのため、実行ユニット Aに対して備えられた中継部 65を経由して、デバ ッグ用プログラム 63、デバッグ用プログラム 73、およびデバッグ用プログラム 83に対 して各種コマンドが中継される。ここで、実行ユニット Aが何等かの理由によりストール 状態となってしまった場合、中継部 65も機能しなくなってしまう。そのため、通信ポー ト 1の通信対象の実行ユニットを、実行ユニット Aから実行ユニット Bに変更し、実行ュ ニット Bに対して備えられている中継部 75を経由して、デバッグ用プログラム 73, 83 への各種コマンドの中継を行うようにすればよい。そうすれば、デバッグ用プログラム 73との通信においては実行ユニット Bへ、デバッグ用プログラム 83との通信において は実行ユニット Cへというように、各通信毎に通信ポート 1における通信対象の実行ュ ニットを切り替える煩雑な処理を必要とすることなぐ 2個の実行ユニット B, Cで同時 にデバッグ用プログラムの起動を行うことが可能となる。
[0105] (第 4の実施形態)
次に、本発明の第 4の実施形態のデバッグシステムについて図面を参照して説明 する。
[0106] 上記第 1から第 3の実施形態では、デバッグ用プログラム起動指示により指定され た実行ユニットまたは起動指示振り分け部により選択された実行ユニットに対して、デ バッグ用プログラム起動指示が振り分けられていた。しかし、デバッグ用プログラムを 起動しょうとした実行ユニットが既にストール状態となっていて、デバッグ用プログラム の起動が不可能な場合がある。
[0107] 本実施形態のデバッグシステムは、このような弊害の発生を防ぐため、デバッグ用 プログラムを起動可能な実行ユニットを選定する際に、ストール状態となってデバッグ 用プログラムの起動が不可能な実行ユニットが選択されないような構成になっている
[0108] 図 11に示すように、本実施形態のデバッグシステムは、図 5に示された第 1の実施 形態における構成と比較して、ストールしている実行ユニットを避けて、プログラムを 実行可能な実行ユニットの起動指示振り分け部に起動指示が送られるような処理を 行うストール発生実行ユニット回避部(図 11中では、回避部と表示する。 ) 66, 76を 備える構成となっている。
[0109] ストール発生実行ユニット回避部 66, 76は、デバッグ用プログラムを起動可能な複 数の実行ユニット A, B毎にそれぞれ配置されている。そして、ストール発生実行ュ- ット回避部 66, 76は、ストール状態の実行ユニットに対して起動指示が送られないよ うな処理を行っている。
[0110] 具体的には、実行ユニット Aのストール発生実行ユニット回避部 66は、起動指示の 振り分け元の実行ユニット(つまり、通信ポート 1の通信対象の実行ユニット)を実行ュ ニット Aにするよう通信ポート 1に対して通知し、実行ユニット Bのストール発生実行ュ ニット回避部 76は、起動指示の振り分け元の実行ユニットを実行ユニット Bにするよう 通信ポート 1に対して通知する。
[0111] 図 4のように 2個の実行ユニット A, Bを備えるシステムでは、実行ユニット A, B, A, B, · ··, A, Bのように交互に、ストール発生実行ユニット回避部 66, 76が起動される よう構成する。また、 3個以上の実行ユニットを備えるシステムでは、それぞれ順番に 、タイマを利用する力、通常動作時に利用されているタイマ割り込みハンドラ内のプロ グラムによってストール発生実行ユニット回避部が起動されるよう構成する。なお、スト ール発生実行ユニット回避部 66, 76の具体的な実現方法としては、交互に起動した り、順番に起動したりする必要は必ずしもないが、後述する不具合検出部と効果的に 組み合わせるために、このように構成することが望ま 、。
[0112] タイマ割り込みハンドラとは、タイマ割り込みが発生した場合に、その割り込みを処 理するために最初に起動されるプログラムのことである。このタイマ割り込みハンドラ は、タイマ割り込み機能を備えた実行ユニットであれば、一般的に使用されるプロダラ ムである。
[0113] 本実施形態における全体の動作については、図 7のフローチャートにおける起動指 示受信前に、デバッグ用プログラムを起動可能な実行ユニットを選定するステップが 追加されることを除いて本発明の第 1の実施形態と同一である。
[0114] 次に、ストール発生実行ユニット回避部 66, 76の動作について図 12を参照して説 明する。なお、図 12において、ステップ S71とステップ S74は意図的に選択するもの ではなぐその時点での状況によって必然的に選択される処理である。つまり、ステツ プ S72は実行ユニット Aによって実行される処理である力 実行ユニット Aがストール している場合はプログラムが実行されない。そのため、ステップ S71の分岐は、ステツ プ S72の処理が行われずにステップ S73に進んでしまうことを示す。同様に、ステツ プ S75は実行ユニット Bによって実行される処理である力 実行ユニット Bがストール している場合はプログラムが実行されない。そのため、ステップ S74の分岐は、ステツ プ S75の処理が行われずにステップ S76に進んでしまうことを示す。ここでは、デバッ グ用プログラムの起動指示の振り分け元の実行ユニット(つまり、通信ポート丄の通信 対象の実行ユニット)の初期値が Bであるものとして説明する。
[0115] まず、ステップ S71の段階で、実行ユニット Aがストールしていない場合 (ステップ S 71の No)、実行ユニット A上のストール発生実行ユニット回避部 66が、デバッグ用プ ログラム起動指示の振り分け元となる実行ユニットの設定値を実行ユニット Aに変更 する (ステップ S72)。この処理は、通信ポート 1の通信対象を変更することで行われ る。ここで起動指示があった場合 (ステップ S73の Yes)、設定された実行ユニット (こ こでは実行ユニット A)へ起動指示が送信される (ステップ S77)。
[0116] 一方、ステップ S73で起動指示がな力つた場合 (ステップ S73の No)、実行ユニット Bがストールしていなければ (ステップ S74の No)、実行ユニット B上のストール発生 実行ユニット回避部 76が、デバッグ用プログラム起動指示の振り分け元となる起動ュ ニットを実行ユニット Bに変更する (ステップ S75)。ここで起動指示があった場合 (ス テツプ S76の Yes)、設定された実行ユニット (ここでは実行ユニット B)へ起動指示が 送信される (ステップ S77)。起動指示がな!、場合は (ステップ S76の No)、初めに戻 る。
[0117] ここで、ステップ S71の段階で実行ユニット Aがストールしていた場合、ステップ S72 の処理が行われずにステップ S73に進む力 ここで起動指示があった場合、デバッ グ用プログラムの起動指示の振り分け元である実行ユニットは実行ユニット Bである。 そのため、ストールした実行ユニット Aにデバッグ用プログラム起動指示が送信され、 起動ができなくなる状況を避けることができる。また、ステップ S74の段階で実行ュ- ット Bがストールしていた場合も、同様の仕組みにより、実行ユニット Bにデバッグ用プ ログラムの起動指示が送信され、起動ができなくなる状況を避けることができる。
[0118] この方法は、実行ユニットが 3個以上の場合でも容易に拡張可能であり、実行ュ- ットの 、ずれかが動作して 、れば、動作して!/、る実行ユニットがデバッグ用プログラム の起動指示の振り分け元となるよう設定される。 [0119] ただし、次の場合について注意が必要である。
[0120] 1つの注意点は、ステップ S72においてデバッグ用プログラムの起動指示の振り分 け元となる実行ユニットを実行ユニット Aに変更した後、ステップ S73において起動指 示を受け取る前に実行ユニット Aがストールする場合である。これは、ステップ S75と ステップ S76の間においても同様である。この場合、デバッグプログラムの起動指示 が受理されないが、一定時間を経過すると、ストールしていない実行ユニットによって 起動指示の振り分け元となる実行ユニットが変更されるため、起動に失敗した場合に は一定時間後に起動指示を再発行するような構成とすることが望ましい。また、全て の実行ユニットがストールした場合に備えて、一定回数の起動指示の再発行によって も起動しない場合は処理を終了し、エラー報告をするような構成としてもよい。
[0121] 他の注意点は、これまでの手法によりデバッグ用プログラム起動指示振り分け部ま での実行は可能であるものの、起動指示で指定して 、るデバッグ用プログラムを起動 する実行ユニットがストールしている場合には起動ができないことである。この場合、 一定時間後に起動が確認できな 、場合はエラー報告をするような構成としてもょ 、。 ただし、後述する不具合検出'起動指示生成部の不具合検出手法によってストール を検出し、起動できないと判定されている場合には、即座にエラー報告をし、別の実 行ユニットでデバッグ用プログラムを起動するなどの手法を用いることが望まし 、。
[0122] また、起動する実行ユニットを別途指定する必要がないように、デバッグ用プロダラ ムが起動している実行ユニットとは異なる、デバッグ対象の実行ユニットに関わる記憶 領域を参照し、デバッグ対象の実行ユニットやその実行ユニットで動作して 、るプロ グラムの状態を解析するデバッグ用プログラムを起動するなどして、起動指示振り分 け元の実行ユニット上でデバッグ用プログラムを起動するような構成とすることが望ま しい。この場合は、起動指示振り分け部の機能のうち、起動指示を他の実行ユニット に対して転送する機能を不要とすることもできる。
[0123] 次に、本実施形態のデバッグシステムの効果について説明する。
[0124] 本実施形態では、ストール発生実行ユニット回避部 66, 76により、デバッグ用プロ グラムを実行不可能な実行ユニットに対して起動指示が送られな ヽように構成されて いるため、不具合によって実行ユニットがストールし、実行ユニットの動作に影響が出 るような場合でも、利用可能な実行ユニットがあれば、その実行ユニット上でデバッグ 用プログラムを起動することが可能となる。
[0125] (第 5の実施形態)
次に、本発明の第 5の実施形態について説明する。
[0126] 上記第 1から第 4の実施形態では、デバッグ用プログラムは、起動された実行ュ-ッ トに関わる記憶領域しか参照することができな力つた。しかし、記憶領域をどのように 使用しているかを参照することにより、デバッグ対象の実行ユニットで動作しているプ ログラムの状態を解析することが可能になる場合がある。
[0127] 本実施形態のデバッグシステムは、デバッグ対象の実行ユニットの記録領域をデバ ッグ用プログラムが起動された実行ユニットから参照してデバッグ作業を行うことを可 能にする構成となっている。
[0128] 図 13に示すように、本実施形態のデバッグシステムは、図 5に示された第 1の実施 形態における構成と比較して、デバッグ用プログラム 63, 73を、それぞれデバッグ用 プログラム 67, 77に置き換えた構成となっている。
[0129] デバッグ用プログラム 67は、状態を解析するために、物理'仮想アドレス変換部 67
1と、情報抽出部 672とを備えている。
[0130] 物理 ·仮想アドレス変換部 671は、仮想アドレスを物理アドレスに変換する。
[0131] 情報抽出部 672は、物理'仮想アドレス変換部 671により変換された物理アドレスを 用い、 OS (Operating System)などが管理情報をメモリに配置する構造を考慮して、 通常動作プログラム 74が使用している記憶領域力 必要情報を抽出する。
[0132] また、デバッグ用プログラム 77も同様に、物理 ·仮想アドレス変換部 771と、情報抽 出部 772とを備えている。
[0133] 以下では、実行ユニット A上でデバッグ用プログラムを起動する場合の動作を例に 挙げて説明するが、実行ユニット B上でデバッグ用プログラム 77を起動する場合の動 作も同様である。
[0134] 物理 ·仮想アドレス変換部 671は、仮想アドレスと物理アドレスのオフセット(差分) 情報を加減することにより、仮想アドレスと物理アドレスの相互変換を行う第 1の物理' 仮想アドレス変換動作と、物理'仮想変換テーブルの情報を解析することにより仮想 アドレスと物理アドレスを対応づける第 2の物理'仮想アドレス変換動作とを行う。
[0135] まず、第 1の物理'仮想アドレス変換動作について説明する。
[0136] 第 1の物理'仮想アドレス変換動作は、 OSのカーネルが静的に確保する領域など 、広範囲に渡って連続する物理アドレスが確保されている領域 (以後、連続領域とす る)に対応するための動作である。
[0137] 連続領域において、ある仮想アドレスに対応する物理アドレスが分力つた場合に、 仮想アドレスと物理アドレスの差分を求めることができる。連続領域では、仮想アドレ スを n単位増加させた場合に対応する物理アドレスも n単位増加したものになる。その ため、仮想アドレスと物理アドレスの差分を保持し、これを加減することで、仮想アドレ スから物理アドレスへの変換、物理アドレス力 仮想アドレスの変換を行うことが可能 となる。
[0138] また、仮想アドレスと物理アドレスの差分は別途計算しておいたものを用いることも できるが、連続領域の先頭に対応する仮想アドレスが予め決まっている OSがある。こ の場合、各 CPUに割り当てられる記憶領域の先頭の物理アドレス情報を元に差分を 計算することが可能となる。そのため、デバッグ用プログラムの起動時に、各 CPUに 割り当てられて 、る記憶領域の先頭の物理アドレス情報を取得可能とし、自動的に 差分を計算可能にする構成とすることが望ましい。
[0139] 次に、第 2の物理'仮想アドレス変換動作について図 14を用いて説明する。
[0140] 第 2の物理'仮想アドレス変換動作は、高機能 OSなどで用いられる手法であって、 物理 ·仮想アドレステーブルを用いてユーザプログラムなどの仮想アドレス管理を行う 手法に対応するための動作である。ユーザプログラムなどでは、連続する仮想アドレ スに対応する記憶領域が連続しているとは限らず、物理アドレスが差分により一意に 決まらないため、複数の手順を要する。
[0141] 第 2の物理'仮想アドレス変換動作では、まず、第 1の物理'仮想アドレス変換動作 を利用して、 OSが保持して 、る物理 ·仮想アドレス変換テーブルの物理アドレスを取 得する(ステップ S 101)。
[0142] この物理アドレスを用いて物理.仮想アドレス変換テーブルを参照し、物理'仮想ァ ドレス変換テーブルの内容を取得する(ステップ S 102)。 [0143] 高機能 OSでは、物理'仮想変換テーブルが複数の層で構成されているものがあり
、一度の参照で変換が完了するとは限らない。そのため、変換が完了しない場合 (ス テツプ S103の No)、物理.仮想変換テーブルの内容力も次に参照すべき物理.仮想 変換テーブルの仮想アドレスを取得する(ステップ S 104)。
[0144] これらの処理を繰り返し、目的の物理アドレスが得られた場合 (ステップ S 103の Ye s)、得られた物理アドレスの通知を行い (ステップ S 105)、第 2の物理'仮想アドレス 変換動作を終了する。
[0145] 次に、情報抽出部 672の動作について図 15を用いて説明する。
[0146] まず、基点となるデータ構造が存在する仮想アドレスを元に、物理'仮想アドレス変 換を行うことによって (ステップ S201)、参照するデータが存在する物理アドレスを取 得する。
[0147] データを直接参照可能な物理アドレスがマッピング可能である場合、参照するデー タと同一または類似の構造をもつ構造体の変数を該当する物理アドレスにマッピング するなどの方法で必要なデータに容易にアクセス可能なように構成し (ステップ S 202 )、データを参照する (ステップ S 203)。
[0148] または、参照するデータと同一または類似の構造をもつ変数を予め用意し、取得さ れた物理アドレスを用いて、参照するデータを用意した変数の領域にコピーし、その データを参照を行うこととしてもよい。この場合、物理アドレスがデータを直接参照で きないものであっても、そのデータを参照することが可能になる力 コピーを行うォー バヘッドが発生すると 、う欠点も生じる。
[0149] データ構造が単純な場合、これらの処理で抽出が終了し (ステップ S204の Yes)、 抽出結果を通知 (ステップ S206)することで処理が完了する。ただし、データによつ ては、リスト構造などのデータが分散した状態で配置されているものがある。
[0150] 最初の参照で必要データがな!、かまたは一部し力揃って 、な 、場合 (ステップ S 20 4の No)、次のリストの場所を示すアドレスを取得する(ステップ S 205)。このアドレス は仮想アドレスで記載されているため、物理'仮想アドレス変換を行うことによって、物 理アドレスを取得し (ステップ S201)、次のリストの内容を参照する(ステップ S202, S 203)。この処理を必要なデータが揃うまで複数回繰り返す。 [0151] なお、本実施形態では、仮想アドレスを用いる OS以外では、これらの処理のうちス テツプ S201の物理 ·仮想アドレス変換は必要がなぐこれを除いた処理によって同様 の機能を実現することができる。
[0152] また、本実施形態では、 2個の実行ユニット A, Bを備えるシステムを例に挙げて説 明したが、 3個以上の任意の個数の実行ユニットを備えるシステムへの拡張も容易に 可能である。
[0153] 本実施形態では、デバッグ用プログラムが起動して 、る実行ユニットとは異なるデバ ッグ対象の実行ユニットに関わる記憶領域を参照することで、デバッグ対象の実行ュ ニットやその実行ユニットで動作しているプログラムの状態を解析するデバッグ用プロ グラムを備えている。そのため、デバッグ対象の実行ユニットの状態の如何にかかわ らずデバッグ作業を行うことが可能となる。
[0154] 一方で、実行ユニットが備えるレジスタやキャッシュメモリなどの資源は、実行ュ-ッ トが使用する記憶領域を参照するだけでは確認することができない。そして、レジスタ の内容が参照できないことにより、必要なデバッグ情報が得られないという弊害や、キ ャッシュメモリに最新の情報がとどまり続けることにより、記憶領域を参照するだけでは 最新の情報が確認できないなどの弊害が生じる可能性がある。
[0155] そのため、本実施形態では、デバッグ対象である実行ユニット上で、実行ユニットが 備えるレジスタやキャッシュメモリの読み書き、制御などを行う実行ユニット内資源管 理部(図示せず)を、デバッグ用プログラムにより構成するようにしてもよい。この実行 ユニット内資源管理部は、レジスタ内容読み出し '書込み部(図示せず)と、キャッシュ メモリ管理部(図示せず)と力も構成されている。
[0156] レジスタ内容の読み出しを行う場合、デバッグ対象とする実行ユニット上のデバッグ 用プログラムに読み出し指示を与え、レジスタ内容読み出し '書込み部により読み出 しを行わせ、その結果を通知させる。書き込みを行う場合は、デバッグ対象とする実 行ユニット上のデバッグ用プログラムに書き込み指示と書き込むデータを与え、レジス タ内容読み出し'書込み部により書き込みが行わせる。
[0157] また、キャッシュメモリ管理部は、キャッシュ内容の吐き出し指示を受け取ると、実行 ユニットにキャッシュメモリ吐き出し命令を実行するように制御を行う。キャッシュメモリ の吐き出しが完了すると、メモリ上に最新の情報が書き込まれる。そのため、その後、 情報を取得するデバッグ用プログラムが、他の実行ユニット上の記憶領域を観測する ことも可能となる。または、デバッグ対象の実行ユニット上のデバッグ用プログラム力 読み出したキャッシュメモリの内容を外部に通知するような構成とすることもできる。ま た、キャッシュメモリの動作モードの制御や、内容の更新なども制御可能なように構成 することが望ましい。
[0158] さらに、デバッグ対象の実行ユニット上でデバッグ用プログラムを実行中は、その実 行ユニットが備えるレジスタのうち、演算に用いるレジスタやプログラムカウンタなどの プログラムの進行に関わるレジスタなどの内容は、記憶領域のスタック領域に退避さ れている。しかし、そのスタック領域の内容がキャッシュメモリ上に残っており、記憶領 域上には最新の値が保存されていない可能性がある。そのため、上記のキャッシュメ モリ管理部を用いることによって、キャッシュメモリの内容を記憶領域上に吐き出すか 、キャッシュメモリの内容を直接読み出すことにより、退避されたレジスタの内容を取 得するような構成とすることができる。それにより、デバッグ対象プログラムの実行中に 保持されていたレジスタ内容を取得することができる。
[0159] このような構成とすることにより、デバッグ対象の実行ユニットでデバッグ用プロダラ ムを利用可能である場合には、デバッグ対象の実行ユニット上の、レジスタ内容読み 出し'書込み部およびキャッシュメモリ管理部を備えるデバッグ用プログラムを利用し 、記憶領域を参照することができる。それにより、情報を取得するデバッグ用プロダラ ムカ 通常は実行できないレジスタやキャッシュメモリの読み書き、制御などを実現可 能となる。
[0160] (第 6の実施形態)
次に、本発明の第 6の実施形態のデバッグシステムについて説明する。
[0161] 上記で説明した第 1〜第 5の実施形態では、実行ユニットに何らかの不具合が発生 した場合には、外部の制御端末力も起動指示を入力する必要があった。
[0162] 本実施形態のデバッグシステムは、実行ユニットに何等かの不具合が発生した場 合には、外部の制御端末力 起動指示を入力しない場合であっても、自動的に起動 指示が生成される構成となって!/ヽる。 [0163] 図 16に示すように、本実施形態のデバッグシステムは、図 5に示した第 1の実施形 態のデバッグシステムにおける構成と比較して、不具合の発生を検出する不具合検 出部 68, 78を追加した構成となっている。
[0164] 不具合検出部 68, 78は、実行ユニット A, Bにおいて不具合が発生したことを検出 すると、デバッグ用プログラムの起動指示を生成する。
[0165] ここで、不具合検出部 68, 78によって不具合を検出したことを外部の制御端末に 通知することのみを行うようシステムを構成してもよい。ただし、不具合発生を検出し た時点で不具合が発生した実行ユニットやプログラム、不具合を発生させる原因とな る実行ユニットやプログラム、またはその他の実行ユニットやプログラムを停止させる 手段を設けた構成とすることが望ま U、。
[0166] なお、不具合検出部 68, 78が備えられる実行ユニットは、デバッグ用プログラム起 動部 62, 72が備えられる実行ユニットと必ずしも一致している必要はなぐ実行ュ- ット A, Bのどちらか片方にのみ備えられて!/、てもよ!/、。
[0167] 本実施形態における全体の動作については、不具合検出部 68, 78によって不具 合を検出するステップが、デバッグ用プログラム起動指示を受信するステップの前に 追加されることを除いて、上記で説明したいずれかの実施形態と同一である。
[0168] 次に、不具合検出部 68, 78の構成'動作について説明する。
[0169] 不具合には、不具合の発生がシステムにより報告される不具合 (以下、実行時エラ 一と称する。)と、システムによる報告が行われず、正常動作を妨げる不具合とがある 。実行時エラーには、不正メモリ参照、不正命令実行、ハードウェア例外などがある。 正常動作を妨げる不具合には、無限ループなどによるストールや、暴走などがある。
[0170] まず、実行時エラーを対象とする不具合検出部 68, 78の第 1の構成について説明 する。この場合の不具合検出部 68, 78は、システムにより報告される不具合を受信 する不具合受信部(図示せず)と、不具合発生を通知する通知部(図示せず)とから 構成される。ここで、実行時エラーが発生した場合に特定のプログラムが実行される ように構成されて 、るシステムにお 、ては、この特定のプログラム内に不具合検出部 を設けてもよい。
[0171] 実行時エラーを対象とするために、実行ユニット上のプログラムとして不具合検出部 を設けた場合、実行時エラーが発生した実行ユニットの不具合検出部によって不具 合が検出される。この場合、デバッグ用プログラムを起動する実行ユニットを、不具合 の発生した実行ユニットにして起動指示を生成することとしてもよい。一方で、実行時 エラーが発生した実行ユニット上でデバッグ用プログラムを起動する場合、プログラム の起動が実行ユニットや記憶領域に与える影響によって不具合の原因が判別できな くなる可能性もある。このような場合には、別の実行ユニットに対してデバッグ用プロ グラムの起動指示を発行し、第 5の実施形態におけるデバッグ用プログラム 67, 77を 起動するような構成とすることが望ま 、。
[0172] 次に、正常動作を妨げる不具合を対象とする不具合検出部 68, 78の第 2の構成に ついて説明する。この場合の不具合検出部 68, 78は、デバッグ対象の実行ユニット 上で実行されるプログラムによって更新される情報を読み出す更新情報読出し部(図 示せず)と、情報の更新が正常に行われているかどうかを確認する正常更新確認部( 図示せず)と、不具合発生を通知する不具合発生通知部(図示せず)とから構成され る。
[0173] 次に、不具合検出部 68, 78の第 2の構成の動作について図 17を参照して説明す る。ここでは、不具合発生通知部を、不具合発生確認後にデバッグ用プログラムの起 動指示を生成するデバッグ用プログラム起動指示生成部として設けた場合を例に挙 げて説明する。
[0174] まず、更新情報読出し部が、他の実行ユニット上で実行されるプログラムによって更 新される情報を読み出す (ステップ S301)。この情報を元に、正常更新確認部が、更 新が正常に行われているかどうかを確認する (ステップ S302)。更新が正常に行われ ている場合 (ステップ S303の Yes)、正常更新確認部は次の更新を確認する。不具 合の発生により更新が異常であることが検出されると (ステップ S303の No)、デバッ グ用プログラム起動指示生成部が、デバッグ用プログラム起動指示を生成し (ステツ プ S304)、デバッグ用プログラム起動部に起動指示を与える。なお、プログラムによ つて更新される情報は、情報を更新するプログラムを設けて取得することにしてもよ ヽ 。ただし、 OSが内部で使用する時刻情報をプログラムによって更新される情報として 用いることで、別途プログラムを設けずに不具合検出部を構成することができる。 [0175] 次に、正常動作を妨げる不具合を対象とする不具合検出部 68, 78の第 3の構成に ついて説明する。この場合の不具合検出部 68, 78は、デバッグ対象の実行ユニット に対して割り込みを発生させる割り込み生成部(図示せず)と、デバッグ対象の実行 ユニットからの応答を確認する応答確認部(図示せず)と、デバッグ用プログラムの起 動指示を生成する起動指示生成部(図示せず)と力も構成される。また、デバッグ対 象の実行ユニットは割り込みに対する応答部を備える。
[0176] 次に、不具合検出部の第 3の構成の動作について図 18を参照して説明する。
[0177] まず、割り込み生成部が、他の実行ユニットに対して割り込みを発生させ (ステップ S311)、応答が返ってくるのを待つ (ステップ S312)。規定時間内に応答を受信した 場合は (ステップ S313の Yes)、正常であると判断し、次の割り込みを発生させる。規 定時間内に応答が返ってこない場合 (ステップ S313の No)、不具合により応答不能 になったと判断し、起動指示生成部が、デバッグ用プログラムの起動指示を生成し( ステップ S314)、デバッグ用プログラム起動部に起動指示を与える。なお、ここでは 判断基準を規定時間内に応答が返ってくることとしたが、返ってきた応答が正常であ るか異常であるかを判断基準とすることもできる。
[0178] 次に、正常動作を妨げる不具合を対象とする不具合検出部 68, 78の第 4の構成に ついて説明する。この構成は、ストールが発生している実行ユニットを避けてデバッグ 用プログラムを起動可能な実行ユニットを選定するストール発生実行ユニット回避部( 図 11のストール発生実行ユニット回避部 66, 76)に、現在どの実行ユニットが選定さ れて 、るかを検査する手段を追加することで実現される。
[0179] 次に、不具合検出部 68, 78の第 4の構成の動作について図 19を参照して説明す る。
[0180] 不具合検出部 68, 78の第 4の構成では、図 12におけるストール発生実行ユニット 回避部 66, 76の動作に加えて、図 19のように、ストール発生実行ユニット回避部 66 , 76によって設定されている現在の実行ユニットがどれであるかを判定するステップ S78, S79力追カロされている。
[0181] なお、図 19において、ステップ S71とステップ S74は意図的に選択するものではな ぐその時点での状況によって必然的に選択される処理である。つまり、ステップ S72 は実行ユニット Aによって実行される処理である力 実行ユニット Aがストールして ヽる 場合はプログラムが実行されない。そのため、ステップ S71の分岐は、ステップ S72 の処理が行われずにステップ S73に進んでしまうことを示す。同様に、ステップ S75 は実行ユニット Bによって実行される処理である力 実行ユニット Bがストールしている 場合はプログラムが実行されない。そのため、ステップ S74の分岐は、ステップ S75 の処理が行われずにステップ S76に進んでしまうことを示す。ここでは、デバッグ用プ ログラム起動指示の振り分け元となる実行ユニットの初期値が実行ユニット Bであるも のとして説明する。
[0182] まず、実行ユニット Aがストールしていない場合 (ステップ S71の No)、初期設定値 は実行ユニット Bであるので (ステップ S78の Yes)、実行ユニット A上のプログラムが、 デバッグ用プログラムの起動指示の振り分け元となる実行ユニットを実行ユニット Aに 変更する (ステップ S72)。一方、実行ユニット Aがストールしていた場合 (ステップ S 7 1の Yes)、ステップ S72の処理が行われずにステップ S73に進む。ここで起動指示 がな 、場合 (ステップ S73の No)、実行ユニット Bがストールして!/、なければ (ステップ S74の No)、ステップ S79の検査〖こ進む。ステップ S79では、起動指示の振り分け元 として設定されている実行ユニットを検査する。この検査では、設定されている実行ュ ニットが Aであれば (ステップ S79の Yes)、正常である。し力し、実行ユニット Aでない 場合は (ステップ S79の No)、ステップ S72が実行されな力つたことになるため、実行 ユニット Aの不具合を検出できる。この場合には、ステップ S77に進み、設定されてい る実行ユニット(この場合、実行ユニット B)に起動指示が送信され、デバッグ用プログ ラムを起動する。ここで、実行ユニット Bがストールしていた場合には(ステップ S74の Yes) ,同様にステップ S78にて不具合が検出され (ステップ S78の No)、デバッグ用 プログラムが起動される。
[0183] なお、上記の不具合検出部の第 1〜第 4の構成は、互いに排他的なものではなぐ 任意に組み合わせることも可能である。
[0184] 次に、本実施形態のデバッグシステムの効果について説明する。
[0185] 本実施形態では、不具合検出部 68, 78を備え、不具合の発生を確認できるような 構成としているため、不具合発生の確認が困難なシステムであっても、不具合発生確 認後にデバッグ用プログラムを起動してデバッグ作業を開始することができる。
[0186] また、本実施形態では、不具合発生を検出した時点で不具合が発生した実行ュニ ットゃプログラム、不具合を発生させる原因となる実行ユニットやプログラム、またはそ の他の実行ユニットやプログラムを停止させる手段を設けた構成とすることもできる。 このような構成とすることで、不具合発生後に処理が進んでしまうことにより、不具合 発生の原因の追究が困難になることを避けることができる。
[0187] また、本実施形態では、不具合の発生を検出すると、デバッグ用プログラム起動指 示を生成するよう不具合検出部 68, 78を構成することもできる。このような構成とする ことで、デバッグ作業者が、デバッグ用プログラムを起動する実行ユニットやデバッグ 用プログラムの種類を判断してそのデバッグ用プログラムを起動することなぐデバッ グ作業を開始することができる。
[0188] (第 7の実施形態)
次に、本発明の第 7の実施形態のデバッグシステムについて説明する。
[0189] 上記で説明した第 5の実施形態のデバッグシステムによれば、ある実行ユニットがス トールした場合でも、その実行ユニットに関するメモリの内容を読むことが可能となる。 しかし、この第 5の実施形態のデバッグシステムによっても、ストール状態となった実 行ユニットのレジスタやキャッシュメモリの内容を読むことはできない。なぜならば、実 行ユニットがストール状態となった場合には、一般的にレジスタやキャッシュメモリの 内容の読み出しができなくなるからである。
[0190] 本実施形態のデバッグシステムは、ある実行ユニットがストールした場合であっても 、その実行ユニットのレジスタやキャッシュメモリの内容を読み出してデバッグを行うこ とを可能にする構成となって 、る。
[0191] 図 20に示すように、本実施形態のデバッグシステムは、上記で説明した第 1の実施 形態における構成と比較して、実行ユニット A用プログラム領域 6内のデバッグ用プロ グラム 63は、実行ユニット間割り込み生成部(図 20中では、割り込み生成部と表示す る。)631と応答受信部 632とを備え、また、デバッグ対象の実行ユニットで実行され る割り込みハンドラ 69は、応答生成部 691と情報取得 ·制御部 692とを備える構成と なっている。 [0192] 実行ユニット間割り込み生成部 631は、デバッグ対象の実行ユニット Bに対して割り 込みを発生させる。応答受信部 632は、デバッグ対象の実行ユニット Bからの応答を 応答生成部 791を経由して受信する。
[0193] 情報取得.制御部 692は、他の実行ユニット Bからの割り込みが発生した際に、レジ スタ、キャッシュメモリ、フラッシュメモリ等の予め設定されたメモリ内の情報を取得する
。応答生成部 691は、情報取得 ·制御部 692により得られた情報を、割り込みを発生 させた実行ユニット Bに対して送信する。
[0194] なお、図 5に示した第 1の実施形態では、割り込みハンドラ 69は図示されていない 力 割り込みハンドラは一般的な実行ユニットであれば標準的に備えられて 、るプロ グラムである。
[0195] また、本実施形態のデバッグシステムは、同様にして、実行ユニット B用プログラム 領域 7内のデバッグ用プログラム 73は、実行ユニット間割り込み生成部 731と応答受 信部 732とを備え、また、デバッグ対象の実行ユニットで実行される割り込みハンドラ 79には、応答生成部 791と情報取得 ·制御部 792とを備えた構成となっている。
[0196] なお、図 20は、本実施形態のデバッグシステムを、第 1の実施形態の構成に対して 適用した場合の例を示しているが、第 2〜第 6の実施形態に対しても同様に適用する ことができる。
[0197] 次に、図 21のフローチャートを参照して本実施形態のデバッグシステムの動作につ いて説明する。ここでは、実行ユニット Aのデバッグ用プログラム 63から、実行ユニット B側のデバッグを行う場合の例について説明する。
[0198] まず、デバッグ用プログラム 63は、対象となる実行ユニット Bに対して実行ユニット間 割り込みを発行する (ステップ S401)。すると、実行ユニット Bの割り込みハンドラ 79 が起動する (ステップ S402)。この割り込みハンドラ 79において情報取得'制御部 79 2を用いることにより、実行ユニット Bのレジスタ、キャッシュメモリ、フラッシュメモリを対 象として情報収集、書込み、制御などを行う (ステップ S403)。その後、応答生成部 7 91によって実行ユニット Aに対して応答を生成し (ステップ S404)、実行ユニット Aは 応答受信部 632を用いてこれを受信する (ステップ S405)。ここで、作業内容が制御 のみの場合は、応答には制御の成否情報のみを含めればよい。一方、作業内容が 情報収集を含む場合は、応答には収集した情報も含める。
[0199] または、実行ユニット B側で周期的に発生するタイマ割り込みの割り込みハンドラを 割り込みハンドラ 79とし、実行ユニット Aが通信部(図示せず)を用いて、対象プロセ スの実行制御を行う指示を実行ユニット Bに与える構成としてもよい。ただし、この構 成の場合は、実行制御を行うタイミングが、周期的に発生するタイマ割り込みのタイミ ングだけになるという制約が生じる。
[0200] なお、本実施形態では、実行ユニット Bのデバッグ用プログラム 73から、実行ュ-ッ ト A側のデバッグを行う場合の動作も、同様の仕組みで実現可能である。
[0201] また、本実施形態では、 2個の実行ユニット A, Bを備えるシステムを例に挙げて説 明したが、 3個以上の任意の個数の実行ユニットを備えるシステムへの拡張も容易に 可能である。
[0202] 次に、本実施形態のデバッグシステムの効果について説明する。
[0203] 本実施形態では、デバッグ用プログラム 63, 73は、実行ユニット間割り込み生成部 631, 731と応答受信部 632, 732とを備え、デバッグ対象の実行ユニットで実行さ れる割り込みハンドラは、情報取得 ·制御部 692, 792と応答生成部 691, 791とを備 えている。そして、デバッグ対象の実行ユニット以外の実行ユニット上で動作している デバッグ用プログラムから、デバッグ対象の実行ユニットに対して割り込みを発生させ 、割り込みハンドラにより情報取得や制御を行う。
[0204] 上述したように、割り込みハンドラとは、割り込みが発生した場合に、その割り込みを 処理するために最初に起動されるプログラムである。そのため、実行ユニット A, Bの 割り込みハンドラ 69, 79内に、情報取得 ·制御部 692, 792および応答生成部 691, 791をそれぞれ設けることにより、実行ユニット A, Bがストール状態となった場合でも ストール状態となった実行ユニットのキャッシュメモリやレジスタの内容を読むことが可 能となる。
[0205] (第 8の実施形態)
次に、本発明の第 8の実施形態のデバッグシステムについて説明する。
[0206] 上記で説明した第 1〜第 7の実施形態では、ある実行ユニットがストール状態となつ た場合に、その実行ユニットのデバッグを行うものであった。 [0207] 実行ユニットがストール状態となる場合、通常動作プログラムにより実行されている あるプロセスが暴走していることが考えられる。このように、あるプロセスが暴走状態に なると、他のプロセスは不具合がないにもかかわらず、実行ユニット全体としてはスト ール状態になり機能しなくなってしまう。
[0208] そこで、本実施形態のデバッグシステムは、あるプロセスが暴走し、実行ユニットが ストール状態となった場合でも、暴走したプロセスを停止させ、不具合の修正を行うこ とにより、ストール状態となった実行ユニットを正常状態に復帰させる構成となってい る。
[0209] 本実施形態のデバッグシステムの構成を図 22に示す。図 22は、実行ユニット Bが デバッグ対象実行ユニットとなり、実行ユニット Aから実行ユニット Bに対するデバッグ を行うことのみが可能な構成となって 、る。任意の実行ユニットから任意の実行ュ-ッ トをデバッグする場合には、同様の構成を各実行ユニットに設ける必要がある。
[0210] 図 22に示すように、本実施形態のデバッグシステムは、図 5に示した第 1の実施形 態のデバッグシステムにおける構成と比較して、デバッグ用プログラム 63は、実行ュ ニット間割り込み生成部(図 22中では、割り込み生成部と表示する。)631と応答受 信部 632とを備え、また、デバッグ対象の実行ユニットである実行ユニット Bにおいて 実行される割り込みハンドラ 79は、応答生成部 791とプロセス制御部 793とを備えた 構成となっている。
[0211] 実行ユニット間割り込み生成部 631は、デバッグ対象の実行ユニット Bに対する割り 込みを発生させる。応答受信部 632は、デバッグ対象の実行ユニット Bからの応答を 応答生成部 791を経由して受信する。
[0212] プロセス制御部 793は、デバッグ対象の実行ユニット Bにおいて起動している通常 動作プログラム 74のプロセス制御を行って、暴走しているプロセスを停止させる。応 答生成部 791は、プロセス制御部 793によるプロセス制御の結果により得られた情報 を、割り込みを発生させた実行ユニット Bに対して送信する。
[0213] 次に、図 23のフローチャートを参照して本実施形態のデバッグシステムの動作につ いて説明する。図 23は、実行ユニット Aのデバッグ用プログラム 63から、実行ユニット
B側のプロセス制御を行う場合の例を示している。 [0214] まず、デバッグ用プログラム 63は、デバッグ対象となる実行ユニット Bに対して実行 ユニット間割り込みを発行する (ステップ S401)。すると、実行ユニット Bの割り込みハ ンドラ 79が起動する(ステップ S402)。この割り込みハンドラ 79においてプロセス制 御部 793を用いることにより、実行ユニット Bで実行されている通常動作プログラム 74 のプロセス制御を行う(ステップ S406)。その後、応答生成部 791によって応答を生 成して実行ユニット Aに対して送信し (ステップ S404)、実行ユニット Aは応答受信部 632を用いて応答を受信する (ステップ S405)。
[0215] または、実行ユニット B側で周期的に発生するタイマ割り込みの割り込みハンドラを 割り込みハンドラ 79とし、実行ユニット Aが通信部(図示せず)を用いて、対象プロセ スの実行制御を行う指示を実行ユニット Bに与える構成としてもよい。ただし、この構 成の場合は、実行制御を行うタイミングが、周期的に発生するタイマ割り込みのタイミ ングだけになるという制約が生じる。
[0216] 制御対象プロセスに対するプロセス制御を実現する具体的な方法としては、次のよ うな方法がある。
[0217] 第 1のプロセス制御方法では、 OSのスケジューラに、スケジューラが行うプロセス制 御を外部からの指示に基づいて変更するプロセス制御変更部を備えるようにする。そ して、割り込みハンドラ 79内のプロセス制御部 793からプロセス制御変更部に対し、 プロセス変更指示を送信することで実現することができる。
[0218] 第 2のプロセス制御方法では、割り込みハンドラ 79内のプロセス制御部 793から、
OSの API (Application Program Interface) (システムコールなど)に類似する手順によ り、制御対象プロセスに対してプロセス制御シグナルを発行するプロセス制御シグナ ル発行部を備えるようにする。そして、プロセス制御シグナル発行部が制御対象プロ セスにプロセス制御シグナルを発行することで実現することができる。
[0219] 第 3のプロセス制御方法では、割り込みハンドラ 79内に、記憶領域上に退避されて いる制御対象プロセスへの戻りアドレスを、別のアドレスに変更するアドレス変更部を 備えるようにする。そして、割り込みハンドラ 79内のアドレス変更部が、戻りアドレスを 不正なアドレスに変更し、不正アドレス参照例外を発生させることで実現することがで きる。ここで、例外を発生させる処理のみでも、例外による異常終了処理を OSが行う ため、プロセスを終了させることができる。しかし、例外ハンドラ内で、プロセスを停止 させるなどの、異常終了処理以外の制御を行わせるような構成とすることで、様々な プロセス制御を行うことが可能となる。
[0220] 第 4のプロセス制御方法では、割り込みハンドラ 79内に、記憶領域上に退避されて いる制御対象プロセスへの戻りアドレスに存在する命令を別の命令に変更する命令 変更部を備えるようにする。そして、割り込みハンドラ 79内の命令変更部が、戻りアド レスに存在する命令をデバッグ命令、不正な命令などに置き換え、例外を発生させる ことで実現することができる。ここで、例外を発生させる処理のみでも、例外による異 常終了処理を OSが行うため、プロセスを終了させることができる。しかし、例外ハンド ラ内で、プロセスを停止させるなどの、異常終了処理以外の制御を行わせるような構 成とすることで、様々なプロセス制御を行うことが可能となる。
[0221] ユーザプロセスとして構成されるデバッグ用プログラム力もプロセス制御用システム コールを発行し、プロセス制御を行う既存手法がある。このような手法を用いる場合、 実行ユニットで実行されて 、るプロセスの 、ずれかが暴走すると、デバッグ用プロダラ ムに制御が移らず、その結果、プロセス制御を行うことができないという弊害がある。 しかし、割り込みハンドラ 79内力もプロセス制御を行う上記いずれかのプロセス制御 を用いる場合、割り込みハンドラ 79はユーザプロセスに比べて高い優先度で実行さ れるため、暴走したプロセスが存在する場合であってもプロセス制御を行うことが可能 となる。
[0222] なお、本実施形態では、実行ユニット Bのデバッグ用プログラムから、実行ユニット A 側のデバッグを行う場合の動作も、同様の仕組みで実現可能である。
[0223] また、本実施形態では、 2個の実行ユニット A, Bを備えるシステムを例に挙げて説 明したが、 3個以上の任意の個数の実行ユニットを備えるシステムへの拡張も容易に 可能である。
[0224] 次に、本実施形態のデバッグシステムの効果について説明する。
[0225] 本実施形態では、デバッグ対象の実行ユニット Bによって実行される割り込みハンド ラ 79内にプロセス制御部 793を備えさせ、割り込みハンドラ 79内からデバッグ対象の プロセスの制御を行うような構成としてする。そして、デバッグ対象の実行ユニット B以 外の実行ユニット A上で動作して 、るデバッグ用プログラム 63から、デバッグ対象の 実行ユニット Bに割り込みを発生させ、割り込みハンドラ 79内でプロセス制御を行うこ とにより、デバッグ対象の実行ユニット B以外の実行ユニット A力もプロセス制御を行う ことが可能になる。また、ユーザプロセスよりも高い優先度で実行される割り込みハン ドラ 79内からプロセス制御を行うため、暴走したプロセスが存在する場合であっても、 暴走して!/、るプロセスを停止させ、不具合が発生して!/、る状況を解析して変数内容 の修正等の処理を行 、、さらに再度プログラムを実行させて不具合が解消されたか 否かを観察することが可能となる。そして、このような処理を繰り返すことにより、最終 的にはストール状態となっていた実行ユニットを正常動作に復帰することが可能とな る。
産業上の利用可能性
本発明は、複数の実行ユニットを備えるシステム LSI用のデバッグシステムといった 用途に適用可能である。また、本発明は、複数の実行ユニットを備える組み込みシス テム、複数の実行ユニットを備えるコンピュータシステム用のデバッグシステムと 、つ た用途にも適用可能である。

Claims

請求の範囲
[1] 複数の実行ユニットが連携動作するシステムにお 、て実行されるプログラムのデバ ッグを行うためのデバッグシステムであって、
デバッグ用プログラムの起動を指示する起動指示を受信すると、前記複数の実行 ユニットに対して前記起動指示を振り分ける起動指示振り分け手段と、
前記複数の実行ユニットの各々に対応して設けられ、前記起動指示振り分け手段 により振り分けられた起動指示に基づいて、対応する実行ユニット上でデバッグ用プ ログラムを起動する複数のデバッグ用プログラム起動手段と、を備えたデバッグシス テム。
[2] 前記起動指示振り分け手段は、前記起動指示により指定された実行ユニットに対 応するデバッグ用プログラム起動手段に対して前記起動指示を送信する、請求項 1 記載のデバッグシステム。
[3] 前記起動指示振り分け手段は、前記複数の実行ユニットの各々の動作状況に基づ いて定められる実行ユニットに対応するデバッグ用プログラム起動手段に対して前記 起動指示を送信する、請求項 1記載のデバッグシステム。
[4] 前記起動指示振り分け手段は、前記複数の実行ユニットの各々が利用する記憶領 域の空き容量を検出し、検出された空き容量に余裕のある実行ユニットに対応するデ バッグ用プログラム起動手段に対して前記起動指示を送信する、請求項 1記載のデ バッグシステム。
[5] 前記起動指示振り分け手段は、デバッグ対象の実行ユニットと関係が無いまたは関 係が少ない実行ユニットに対応するデバッグ用プログラム起動手段に対して前記起 動指示を送信する、請求項 1記載のデバッグシステム。
[6] 前記複数の実行ユニットのいずれか 1つに対応して設けられ、通信ポートからデバ ッグ用プログラムに対して送信されるコマンドを、前記起動指示により指定された実行 ユニット上のデバッグ用プログラムに対して中継する中継手段をさらに備える、請求 項 1に記載のデバッグシステム。
[7] 前記複数の実行ユニットの各々に対応して設けられ、通信ポートからデバッグ用プ ログラムに対して送信されるコマンドを、前記起動指示により指定された実行ユニット 上のデバッグ用プログラムに対して中継する複数の中継手段をさらに備える、請求項
1に記載のデバッグシステム。
[8] 前記起動指示力ストール状態の実行ユニットに対応するデバッグ用プログラム起動 手段には送信されないようにするストール発生実行ユニット回避手段をさらに備える、 請求項 1に記載のデバッグシステム。
[9] 前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に は、
仮想アドレスを物理アドレスに変換する物理'仮想アドレス変換手段と、 前記物理'仮想アドレス変換手段により変換された物理アドレスを用いて、オペレー ティングシステムが管理情報をメモリに配置する構造を考慮して、前記デバッグ用プ ログラムが起動している実行ユニットとは異なるデバッグ対象の実行ユニットが利用す る記憶領域力も必要情報を抽出する情報抽出手段とが構成されている、請求項 1に 記載のデバッグシステム。
[10] 前記複数の実行ユニットの中から不具合が発生した実行ユニットを検出し、検出さ れた実行ユニットのデバッグを行うための起動指示を生成する不具合検出手段をさら に備える、請求項 1に記載のデバッグシステム。
[11] 前記複数の実行ユニットの各々において割り込みが発生した場合に該割り込みを 処理するために最初に起動されるプログラムである割り込みハンドラ内には、 他の実行ユニットからの割り込みが発生した際に、予め設定されたメモリ内の情報を 取得する情報取得 ·制御手段と、
前記情報取得 '制御手段により取得された情報を、割り込みを発生させた実行ュニ ットに対して送信する応答生成手段とが構成されており、
前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に は、
デバッグ対象の実行ユニットに対して割り込みを発生させる実行ユニット間割り込み 生成手段と、
デバッグ対象の実行ユニットからの応答を受信する応答受信手段とが構成されてい る、請求項 1に記載のデバッグシステム。
[12] 複数の実行ユニットが連携動作するシステムにお 、て実行されるプログラムのデバ ッグを行うためのデバッグ方法であって、
デバッグ用プログラムの起動を指示する起動指示を受信すると、前記複数の実行 ユニットに対して前記起動指示を振り分けるステップと、
前記複数の実行ユニットの各々に対応して設けられたデバッグ用プログラム起動手 段が、振り分けられた前記起動指示に基づいて、対応する実行ユニット上でデバッグ 用プログラムを起動するステップと、を備えたデバッグ方法。
[13] 前記起動指示を振り分けるステップでは、前記起動指示により指定された実行ュニ ットに対応するデバッグ用プログラム起動手段に対して前記起動指示を送信する、請 求項 12に記載のデバッグ方法。
[14] 前記起動指示を振り分けるステップでは、前記複数の実行ユニットの各々の動作状 況に基づ ヽて定められる実行ュニットに対応するデバッグ用プログラム起動手段に 対して前記起動指示を送信する、請求項 12に記載のデバッグ方法。
[15] 前記起動指示を振り分けるステップでは、前記複数の実行ユニットの各々が利用す る記憶領域の空き容量を検出し、検出された空き容量に余裕のある実行ユニットに対 応するデバッグ用プログラム起動手段に対して前記起動指示を送信する、請求項 12 に記載のデバッグ方法。
[16] 前記起動指示を振り分けるステップでは、デバッグ対象の実行ユニットと関係が無 V、または関係が少な 、実行ユニットに対応するデバッグ用プログラム起動手段に対し て前記起動指示を送信する、請求項 12に記載のデバッグ方法。
[17] 前記複数の実行ユニットのいずれか 1つに対応して設けられた中継手段が、通信 ポートからデバッグ用プログラムに対して送信されるコマンドを、前記起動指示により 指定された実行ユニット上のデバッグ用プログラムに対して中継するステップをさらに 備える、請求項 12に記載のデバッグ方法。
[18] 前記複数の実行ユニットの各々に対応して設けられた中継手段のいずれ力 1つが
、通信ポートからデバッグ用プログラムに対して送信されるコマンドを、前記起動指示 により指定された実行ユニット上のデバッグ用プログラムに対して中継するステップを さらに備える、請求項 12に記載のデバッグ方法。
[19] 前記起動指示を振り分けるステップでは、前記起動指示がストール状態の実行ュ ニットに対応するデバッグ用プログラム起動手段には送信されないようにする、請求 項 12に記載のデバッグ方法。
[20] 前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に 構成された物理'仮想アドレス変換手段が、仮想アドレスを物理アドレスに変換するス テツプと、
前記物理'仮想アドレス変換手段により変換された物理アドレスを用いて、オペレー ティングシステムが管理情報をメモリに配置する構造を考慮して、前記デバッグ用プ ログラムが起動している実行ユニットとは異なるデバッグ対象の実行ユニットが利用す る記憶領域力 必要情報を抽出するステップとをさらに備える、請求項 12に記載の デバッグ方法。
[21] 前記複数の実行ユニットの中から不具合が発生した実行ユニットを検出し、検出さ れた実行ユニットのデバッグを行うための起動指示を生成するステップをさらに備える
、請求項 12に記載のデバッグ方法。
[22] 前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に 構成された実行ユニット間割り込み生成手段が、デバッグ対象の実行ユニットに対し て割り込みを発生させるステップと、
前記複数の実行ユニットの各々にお 、て割り込みが発生した場合に該割り込みを 処理するために最初に起動されるプログラムである割り込みハンドラ内に構成された 情報取得'制御手段が、他の実行ユニットからの割り込みが発生した際に、予め設定 されたメモリ内の情報を取得するステップと、
前記情報取得 '制御手段により取得された情報を、割り込みを発生させた実行ュニ ットに対して送信するステップと、
デバッグ用プログラムが起動された実行ユニットが、デバッグ対象の実行ユニットか らの応答を受信するステップとをさらに備える、請求項 12に記載のデバッグ方法。
[23] 複数の実行ユニットが連携して動作するシステムにお 、て実行されるプログラムの デバッグを行うためのデバッグ方法をコンピュータに実行させるためのプログラムであ つて、 デバッグ用プログラムの起動を指示する起動指示を受信すると、前記複数の実行 ユニットに対して前記起動指示を振り分ける処理と、
前記複数の実行ユニットの各々に対応して設けられたデバッグ用プログラム起動手 段が、振り分けられた前記起動指示に基づいて、対応する実行ユニット上でデバッグ 用プログラムを起動する処理と、をコンピュータに実行させるためのプログラム。
[24] 前記起動指示を振り分ける処理では、前記起動指示により指定された実行ユニット に対応するデバッグ用プログラム起動手段に対して前記起動指示を送信する、請求 項 23に記載のプログラム。
[25] 前記起動指示を振り分ける処理では、前記複数の実行ユニットの各々の動作状況 に基づ!/ヽて定められる実行ュニットに対応するデバッグ用プログラム起動手段に対し て前記起動指示を送信する、請求項 23に記載のプログラム。
[26] 前記起動指示を振り分ける処理では、前記複数の実行ユニットの各々が利用する 記憶領域の空き容量を検出し、検出された空き容量に余裕のある実行ユニットに対 応するデバッグ用プログラム起動手段に対して前記起動指示を送信する、請求項 23 に記載のプログラム。
[27] 前記起動指示を振り分ける処理では、デバッグ対象の実行ユニットと関係が無いま たは関係が少ない実行ユニットに対応するデバッグ用プログラム起動手段に対して 前記起動指示を送信する、請求項 23に記載のプログラム。
[28] 前記複数の実行ユニットのいずれか 1つに対応して設けられた中継手段が、通信 ポートからデバッグ用プログラムに対して送信されるコマンドを、前記起動指示により 指定された実行ユニット上のデバッグ用プログラムに対して中継する処理をさらにコ ンピュータに実行させる、請求項 23に記載のプログラム。
[29] 前記複数の実行ユニットの各々に対応して設けられた中継手段のいずれ力 1つが
、通信ポートからデバッグ用プログラムに対して送信されるコマンドを、前記起動指示 により指定された実行ユニット上のデバッグ用プログラムに対して中継する処理をさら にコンピュータに実行させる、請求項 23に記載のプログラム。
[30] 前記起動指示を振り分ける処理では、前記起動指示がストール状態の実行ユニット に対応するデバッグ用プログラム起動手段には送信されないようにする、請求項 23 に記載のプログラム。
[31] 前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に 構成された物理'仮想アドレス変換手段が、仮想アドレスを物理アドレスに変換する 処理と、
前記物理'仮想アドレス変換手段により変換された物理アドレスを用いて、オペレー ティングシステムが管理情報をメモリに配置する構造を考慮して、前記デバッグ用プ ログラムが起動している実行ユニットとは異なるデバッグ対象の実行ユニットが利用す る記憶領域力も必要情報を抽出する処理とをさらにコンピュータに実行させる、請求 項 23に記載のプログラム。
[32] 前記複数の実行ユニットの中から不具合が発生した実行ユニットを検出し、検出さ れた実行ユニットのデバッグを行うための起動指示を生成する処理をさらにコンビュ ータに実行させる、請求項 23に記載のプログラム。
[33] 前記複数の実行ユニットのいずれかにおいて起動されるデバッグ用プログラム内に 構成された実行ユニット間割り込み生成手段が、デバッグ対象の実行ユニットに対し て割り込みを発生させる処理と、
前記複数の実行ユニットの各々にお 、て割り込みが発生した場合に該割り込みを 処理するために最初に起動されるプログラムである割り込みハンドラ内に構成された 情報取得'制御手段が、他の実行ユニットからの割り込みが発生した際に、予め設定 されたメモリ内の情報を取得する処理と、
前記情報取得 '制御手段により取得された情報を、割り込みを発生させた実行ュニ ットに対して送信する処理と、
デバッグ用プログラムが起動された実行ユニットが、デバッグ対象の実行ユニットか らの応答を受信する処理とをさらにコンピュータに実行させる、請求項 23に記載のプ ログラム。
PCT/JP2006/309230 2005-06-22 2006-05-08 デバッグシステム、デバッグ方法、およびプログラム WO2006137223A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP06746062A EP1901168A4 (en) 2005-06-22 2006-05-08 SYSTEM AND METHOD FOR DEBUGGING AND RELATED PROGRAM
US11/921,437 US8589879B2 (en) 2005-06-22 2006-05-08 Debugging system, debugging method, and program
JP2007522210A JP5163120B2 (ja) 2005-06-22 2006-05-08 デバッグシステム、デバッグ方法、およびプログラム
CN2006800227201A CN101208667B (zh) 2005-06-22 2006-05-08 调试系统及方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005-182032 2005-06-22
JP2005182032 2005-06-22

Publications (1)

Publication Number Publication Date
WO2006137223A1 true WO2006137223A1 (ja) 2006-12-28

Family

ID=37570259

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/309230 WO2006137223A1 (ja) 2005-06-22 2006-05-08 デバッグシステム、デバッグ方法、およびプログラム

Country Status (6)

Country Link
US (1) US8589879B2 (ja)
EP (1) EP1901168A4 (ja)
JP (1) JP5163120B2 (ja)
KR (1) KR20080015110A (ja)
CN (1) CN101208667B (ja)
WO (1) WO2006137223A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990662A (zh) * 2008-03-14 2011-03-23 松下电器产业株式会社 程序执行装置以及其控制方法
US11068381B2 (en) 2016-12-29 2021-07-20 Mitsubishi Electric Corporation Program analysis device, program analysis system, program analysis method and computer readable medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473921B2 (en) * 2009-12-15 2013-06-25 Microsoft Corporation Debugging mechanisms in a cache-based memory isolation system
US8621118B1 (en) * 2010-10-20 2013-12-31 Netapp, Inc. Use of service processor to retrieve hardware information
EP2656227A2 (en) * 2010-12-22 2013-10-30 Intel Corporation Debugging complex multi-core and multi-socket systems
US9983986B2 (en) * 2015-09-28 2018-05-29 International Business Machines Corporation Testing code response to injected processing errors
CN109408310B (zh) * 2018-10-19 2022-02-18 网易(杭州)网络有限公司 服务器的调试方法、服务器及可读存储介质

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63240644A (ja) * 1987-03-27 1988-10-06 Fujitsu Ltd 情報収集処理方式
JPH0192847A (ja) * 1987-10-02 1989-04-12 Fujitsu Ltd デバック制御方式
JPH0433135A (ja) * 1990-05-30 1992-02-04 Toyo Commun Equip Co Ltd プログラムのデバッグ方式
JPH04101239A (ja) * 1990-08-21 1992-04-02 Nec Eng Ltd 情報処理装置のデバッグ方式
JPH06332747A (ja) * 1993-05-25 1994-12-02 Nec Corp マルチプロセッサシステムのプログラムデバッグ方法
JPH07253907A (ja) * 1994-03-14 1995-10-03 Fujitsu Ltd 自己デバッグ機能付き情報処理装置
JPH08272644A (ja) * 1995-04-03 1996-10-18 Toshiba Corp 分散処理装置で実行されるプログラムのデバッグ方法
JPH10187486A (ja) * 1996-12-27 1998-07-21 Fujitsu Ltd マルチプロセッサシステムのプログラムデバッグ方法
JPH11184736A (ja) 1997-12-19 1999-07-09 Nec Corp プロセッサ情報収集装置およびそのプログラム記録媒体
US6279104B1 (en) 1997-07-22 2001-08-21 Fujitsu Limited Debugging system for parallel processed program and debugging method thereof
JP2003203061A (ja) * 2002-01-08 2003-07-18 Mitsubishi Heavy Ind Ltd 並列計算機システムおよび並列計算機システムにおける計算ノードの選択用プログラム
JP2004164113A (ja) 2002-11-11 2004-06-10 Nec Micro Systems Ltd マルチcpuのリセット回路およびリセット方法

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0132161B1 (en) * 1983-07-19 1988-06-15 Nec Corporation Apparatus for controlling a plurality of interruption processings
JPH03292540A (ja) 1990-04-10 1991-12-24 Mitsubishi Electric Corp 計算機異常診断装置
JPH07113912B2 (ja) * 1991-05-31 1995-12-06 富士ゼロックス株式会社 分散型情報処理システムのデバッグ方式
JPH06168155A (ja) 1992-11-30 1994-06-14 Mitsubishi Electric Corp デバッグ方式
JP2783275B2 (ja) 1995-04-28 1998-08-06 日本電気株式会社 分散並列処理プログラムデバッグ方式
JPH09244919A (ja) 1996-03-14 1997-09-19 Oki Electric Ind Co Ltd マルチcpuにおけるテストプログラムのデバッガ
US5961628A (en) * 1997-01-28 1999-10-05 Samsung Electronics Co., Ltd. Load and store unit for a vector processor
JP2000099366A (ja) * 1998-09-21 2000-04-07 Fujitsu Ltd 演算処理装置および演算処理装置のデバッグ方法
US6384457B2 (en) * 1999-05-03 2002-05-07 Intel Corporation Asymmetric MOSFET devices
US6412106B1 (en) * 1999-06-16 2002-06-25 Intervoice Limited Partnership Graphical system and method for debugging computer programs
US6748403B1 (en) * 2000-01-13 2004-06-08 Palmsource, Inc. Method and apparatus for preserving changes to data
US6826717B1 (en) * 2000-06-12 2004-11-30 Altera Corporation Synchronization of hardware and software debuggers
US8108656B2 (en) * 2002-08-29 2012-01-31 Qst Holdings, Llc Task definition for specifying resource requirements
JP2004164367A (ja) * 2002-11-14 2004-06-10 Renesas Technology Corp マルチプロセッサシステム
US7721265B1 (en) * 2003-11-10 2010-05-18 Cisco Technology, Inc. Source code debugging method and apparatus for use in script testing environment
US7257571B2 (en) * 2004-01-26 2007-08-14 Microsoft Corporation Automatic query clustering
US20050183066A1 (en) * 2004-02-17 2005-08-18 Jabori Monji G. Correlating debugger
US7690001B2 (en) * 2005-04-29 2010-03-30 Sap Ag System and method for a management model event system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63240644A (ja) * 1987-03-27 1988-10-06 Fujitsu Ltd 情報収集処理方式
JPH0192847A (ja) * 1987-10-02 1989-04-12 Fujitsu Ltd デバック制御方式
JPH0433135A (ja) * 1990-05-30 1992-02-04 Toyo Commun Equip Co Ltd プログラムのデバッグ方式
JPH04101239A (ja) * 1990-08-21 1992-04-02 Nec Eng Ltd 情報処理装置のデバッグ方式
JPH06332747A (ja) * 1993-05-25 1994-12-02 Nec Corp マルチプロセッサシステムのプログラムデバッグ方法
JPH07253907A (ja) * 1994-03-14 1995-10-03 Fujitsu Ltd 自己デバッグ機能付き情報処理装置
JPH08272644A (ja) * 1995-04-03 1996-10-18 Toshiba Corp 分散処理装置で実行されるプログラムのデバッグ方法
JPH10187486A (ja) * 1996-12-27 1998-07-21 Fujitsu Ltd マルチプロセッサシステムのプログラムデバッグ方法
US6279104B1 (en) 1997-07-22 2001-08-21 Fujitsu Limited Debugging system for parallel processed program and debugging method thereof
JPH11184736A (ja) 1997-12-19 1999-07-09 Nec Corp プロセッサ情報収集装置およびそのプログラム記録媒体
JP2003203061A (ja) * 2002-01-08 2003-07-18 Mitsubishi Heavy Ind Ltd 並列計算機システムおよび並列計算機システムにおける計算ノードの選択用プログラム
JP2004164113A (ja) 2002-11-11 2004-06-10 Nec Micro Systems Ltd マルチcpuのリセット回路およびリセット方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1901168A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990662A (zh) * 2008-03-14 2011-03-23 松下电器产业株式会社 程序执行装置以及其控制方法
US8701089B2 (en) 2008-03-14 2014-04-15 Panasonic Corporation Program execution device and method for controlling the same
US11068381B2 (en) 2016-12-29 2021-07-20 Mitsubishi Electric Corporation Program analysis device, program analysis system, program analysis method and computer readable medium

Also Published As

Publication number Publication date
JP5163120B2 (ja) 2013-03-13
EP1901168A1 (en) 2008-03-19
US8589879B2 (en) 2013-11-19
US20090235233A1 (en) 2009-09-17
CN101208667A (zh) 2008-06-25
CN101208667B (zh) 2012-01-11
JPWO2006137223A1 (ja) 2009-01-08
KR20080015110A (ko) 2008-02-18
EP1901168A4 (en) 2012-04-11

Similar Documents

Publication Publication Date Title
JP5405320B2 (ja) 仮想計算機制御装置、仮想計算機制御方法及び仮想計算機制御プログラム
JP5163120B2 (ja) デバッグシステム、デバッグ方法、およびプログラム
EP2787444B1 (en) Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method
CN100555218C (zh) 用于改善片上仿真系统中高级语言的仿真速度的装置和方法
US6668339B1 (en) Microprocessor having a debug interruption function
US6378064B1 (en) Microcomputer
US7577874B2 (en) Interactive debug system for multiprocessor array
US20120304184A1 (en) Multi-core processor system, computer product, and control method
JP2011232986A (ja) 情報処理装置及びメモリダンプ採取方法
JP5277961B2 (ja) 情報処理装置及びその故障隠蔽方法
EP0942374A1 (en) Method and device to simulate interruptions for the emulation of a processor
JP4787551B2 (ja) デバッグシステム、デバッグ方法およびプログラム
JP2006164185A (ja) デバッグ装置
EP0942371B1 (en) Debugging method for a microcomputer
CN100576175C (zh) 用于多个内核的并行执行的方法和系统
JP2001236237A (ja) マルチos構成方法
JP4633553B2 (ja) デバッグシステム、デバッグ方法およびプログラム
CN101311909A (zh) 诊断系统异样的方法
JP4825058B2 (ja) 計算機のエミュレーション方法
JP2004164113A (ja) マルチcpuのリセット回路およびリセット方法
JPH07306800A (ja) デバッグ方式
JP2008146148A (ja) 計算機システム
US20120331334A1 (en) Multi-cluster system and information processing system
JP4872934B2 (ja) コンピュータシステム、クライアントコンピュータ、os終了方法およびos終了プログラム
JP2005196351A (ja) コンピュータシステムおよびその保守方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200680022720.1

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2007522210

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11921437

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 1020077029314

Country of ref document: KR

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2006746062

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2006746062

Country of ref document: EP