WO2006070510A1 - Program debug device, program debug method, and information storage medium - Google Patents

Program debug device, program debug method, and information storage medium Download PDF

Info

Publication number
WO2006070510A1
WO2006070510A1 PCT/JP2005/016492 JP2005016492W WO2006070510A1 WO 2006070510 A1 WO2006070510 A1 WO 2006070510A1 JP 2005016492 W JP2005016492 W JP 2005016492W WO 2006070510 A1 WO2006070510 A1 WO 2006070510A1
Authority
WO
WIPO (PCT)
Prior art keywords
parent
child relationship
program
identification information
debug
Prior art date
Application number
PCT/JP2005/016492
Other languages
French (fr)
Japanese (ja)
Inventor
Atsuhiko Fujimoto
Original Assignee
Sony Computer Entertainment Inc.
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 Sony Computer Entertainment Inc. filed Critical Sony Computer Entertainment Inc.
Publication of WO2006070510A1 publication Critical patent/WO2006070510A1/en

Links

Classifications

    • 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

Definitions

  • Program debugging apparatus Program debugging apparatus, program debugging method, and information storage medium
  • the present invention relates to a program debugging device, a program debugging method, and an information storage medium, and more particularly to a multi-process debugger.
  • a debugger is a computer program for supporting the discovery of a bug (bug) in a computer program.
  • a debugger spin-on debugger
  • the user can arbitrarily set a breakpoint in the source program and interrupt the execution of the program at the instruction location corresponding to the breakpoint (breakpoint function).
  • the program can be executed by a fixed amount of processing (for example, one instruction) (step execution function), or the contents of registers and memory can be checked during program execution (watch function ( Or trace function)).
  • GDB The GNU Source-Level Debugger
  • GDB The GNU Source-Level Debugger
  • some or all of a plurality of processes executed on a computer are arbitrarily specified, and these are specified. You can interrupt the execution of processes or resume their execution.
  • Non-Patent Document 1 Richard Stallman, Polish Pesch, Stan Chebbs et al., Debugging with GDB ", [online], March 2000, [Searched December 21, 2000], Internet ⁇ net URL : nttp: //www.asahi— net.or.jp/ wg5k— ickw / html / online / gdb— 5.0 / gdb-ja —toc.html>
  • the present invention has been made in view of the above problems, and an object of the present invention is to provide a program debugging apparatus and program debugging capable of efficiently performing a debugging operation of a program in which a plurality of processes are executed on a computer. It is to provide a method and an information storage medium.
  • a program debug device for performing debug processing on a program that executes a plurality of processes on a computer
  • a parent-child relationship table storage unit for storing a parent-child relationship table indicating a part or all of the parent-child relationship of the process
  • a process identification information acquisition unit for acquiring process identification information for identifying the process to be debugged.
  • a related process selection means for selecting a related process of the process identified by the process identification information acquired by the process identification information acquisition means, and a selection by the related process selection means Debug processing means for performing the debug processing on an associated process.
  • a program debugging method is a program debugging method for performing a debugging process on a program that executes a plurality of processes on a computer, and includes a part or all of the plurality of processes.
  • a parent-child relationship table step for storing a parent-child relationship table in the storage means, a process identification information acquisition step for acquiring process identification information for identifying the process to be debugged, and the parent-child relationship table
  • a debugging process step for performing a debugging process is characterized by that.
  • an information storage medium is a program for performing a debugging process on a program that executes a plurality of processes, and a part of the plurality of processes or Based on the parent-child relationship table storage means for storing a parent-child relationship table indicating all parent-child relationships, a process identification information acquisition means for acquiring process identification information for identifying the process to be debugged, and the parent-child relationship table, The related process selection means for selecting a related process of the process identified by the process identification information acquired by the process identification information acquisition means, and the debug process for the related process selected by the related process selection means.
  • This is an information storage medium for causing a computer to function as a debugging processing means for performing the above.
  • a parent-child relationship table indicating a parent-child relationship of some or all of a plurality of processes executed by a program to be debugged is stored. Then, process identification information for identifying a process to be debugged is acquired, and a related process of the process identified by the process identification information is selected based on the parent-child relationship table. At this time, based on the parent-child relationship table, the process identified by the process identification information acquired by the process identification information acquisition means, and the direct and indirect child processes of the process may be selected as related processes. Good. Then, debug processing is performed for the selected related process. In this way, not only the process identified by the process identification information but also the related process selected based on the parent-child relationship table can be debugged, and the debugging work can be made efficient. I'll do it.
  • the debugging process is a process for stopping or restarting execution of a related process selected by the related process selection unit. In this way, execution of related processes can be stopped or restarted in a batch.
  • parent-child relationship data indicating a parent-child relationship of a process being executed on the computer among the plurality of processes is acquired, and the parent-child relationship data is acquired based on the parent-child relationship data. It further includes parent-child relationship updating means for updating the parent-child relationship table stored in the relationship table storage means. In this way, the parent-child relationship table can be updated based on the parent-child relationship of the processes currently running on the computer.
  • the parent-child relationship update means obtains parent-child relationship data indicating the parent-child relationship of the process when a process is newly generated on the computer.
  • the parent-child relationship table stored in the parent-child relationship table storage means may be updated based on the parent-child relationship data. In this way, the parent-child relationship table can be quickly updated when a new process is created.
  • the parent-child relationship update unit when the process already executed on the computer disappears, stores data related to the process in the parent-child relationship table storage unit. Deleted from the parent-child relationship table. In this way, when the process disappears, the parent-child relationship table can be quickly updated.
  • the process identification information acquisition unit acquires process identification information included in a command related to the debug process input by a user. In this way, according to the input of the instruction by the user, it is possible to perform the debugging process on the process related to the process identified by the process identification information included in the instruction.
  • the process identification information acquisition unit acquires process identification information for identifying a process related to a specific type of event that occurs on the computer. In this way, according to the occurrence of a specific type of event, the debugging process can be performed on the related process of the process related to the event.
  • FIG. 1 is a diagram showing a program development environment according to an embodiment of the present invention.
  • FIG. 2 is a functional block diagram showing functions realized by a debug agent program in a target computer.
  • FIG. 3 is a functional block diagram of a debug process management unit.
  • FIG. 4 is a diagram showing an example of a parent-child relationship of a plurality of processes being executed on a target computer.
  • FIG. 5 is a diagram showing a parent-child relationship table showing parent-child relationships of a plurality of processes shown in FIG.
  • FIG. 6 is a flowchart showing parent-child relationship registration processing.
  • FIG. 7 is a flowchart showing debugging processing.
  • FIG. 8 is a flowchart showing a multi-process instruction process.
  • FIG. 9 is a flowchart showing event processing.
  • FIG. 1 is a diagram showing an example of a program development environment according to an embodiment of the present invention.
  • This program development environment 10 applies a program debugging method according to an embodiment of the present invention, and includes a target computer 12 and a host computer 14 that are communicably connected by a data communication network (not shown). Yes.
  • the target computer 12 is a computer that functions as a program debugging apparatus according to an embodiment of the present invention
  • the host computer 14 is a computer for debugging a program executed on the target computer 12.
  • These computers can be configured using, for example, a known personal computer system or a workstation.
  • an OS (operating system) 20 is operating, and a user application program 16 and a debug agent program 18 are installed. Then, the user application program 16 and the debug agent program 18 are executed on the OS 20.
  • the user application program 16 is a program that executes a plurality of processes, and is a target of user debugging work.
  • the debug agent program 18 is a kind of application program that runs on the OS 20, operates according to the control from the host computer 14, and transmits various types of debugging data obtained from the OS 20 to the host computer 14. It has become.
  • OS20 includes various debugging programs, and debug agent program 18 uses these programs to debug user application program 16 (execution of each process is suspended, execution resumed, contents of memory and registers). Confirmation, etc.).
  • Each program may be stored and distributed in a computer-readable information storage medium such as a CD-ROM or DVD-ROM. In this case, each program of the information storage medium is read and installed in the target computer 12 or the host computer 14.
  • an OS 22 is operating, and a debug communication program is executed on the OS 22.
  • the program 24 and the host debugger program 26 are executed.
  • the host debugger program 26 is a kind of application program for debugging the user application program 16, and designates part or all of the processes started by the user application program 16 and interrupts the execution thereof. And can resume execution.
  • a breakpoint can be set at an arbitrary instruction location of the user application program 16, data can be written to the memory or register of the target computer 12, and the corresponding data can be read, process list acquisition and process status information can be obtained. You can get it.
  • the debug agent program 18 monitors the arrival of breakpoints (hit events) set in the user application program 16, the occurrence of program exceptions, and the end of step execution. If these events occur, the host debugger program 26 is notified of the data indicating them. The host debugger program 26 displays various data thus notified on a display or the like.
  • the debug communication program 24 relays data communication between the host debugger program 26 and the debug agent program 18, and converts the data of the host debugger program 26 into data that can be processed by the debug agent program 18. Conversely, the data of the debug agent program 18 is converted into data that can be processed by the host debugger program 26.
  • FIG. 2 is a functional block diagram showing functions realized by the debug agent program 18 on the target computer 12.
  • the debug agent program 18 is executed by the target computer 12 to realize the functions of the debug protocol transmission / reception block 28, the process control block 30, the debug processing block 32, and the event processing block 34.
  • the debug protocol transmission / reception block 28 includes a transmission unit 28a, a protocol encoding unit 28b, a reception unit 28c, and a protocol decoding unit 28d.
  • the process control block 30 includes a command analysis unit 30a and a debug process management unit 3 Ob.
  • the debug processing block 32 includes a static information processing unit 32a and an execution control unit 32b.
  • the debug protocol transmission / reception block 28 is executed on the host computer 14 via the data communication network to communicate with the debug communication program 24.
  • the protocol encoding unit 28 b converts the processing result passed from the debug processing block 32 into data that can be interpreted by the debug communication program 24.
  • the transmission unit 28a transmits the processing result of the debug processing block 32 encoded by the protocol encoding unit 28b to the debug communication program 24.
  • the host debugger program 26 displays the processing result transmitted to the debug communication program 24 in this way.
  • the receiving unit 28c receives data transmitted from the debug communication program 24. This data is input from the host debugger program 26, and indicates an execution interruption instruction, an execution restart instruction, a memory read instruction, a register read instruction, and the like.
  • the execution suspension instruction and the execution resume instruction include a process ID (identification information) for identifying a process to be suspended or resumed.
  • the protocol decoding unit 28d converts the data received by the receiving unit 28c into data that can be interpreted by the process control block 30. The converted data is passed to the process control block 30.
  • the process control block 30 analyzes the data passed from the debug protocol transmission / reception block 28 and issues a debug instruction corresponding to the instruction indicated by the data to the debug processing block 32.
  • the command analysis unit 30a analyzes the data passed from the protocol decoding unit 28d, and whether the instruction indicated by the data is an execution interruption instruction, an execution restart instruction, a memory read instruction, a register read instruction, or the like Judging. If it is a memory read instruction or a register read instruction, a debug instruction corresponding to the instruction is issued to the debug processing block 32 as it is. On the other hand, if it is an execution interruption instruction or an execution resumption instruction, the contents of those instructions are passed to the debug process management unit 30b.
  • the debug process management unit 30b checks a process ID included in the execution suspension instruction and the execution restart instruction in a parent-child relation table described later, and selects a related process of the process identified by the process ID. This related process is specifically all direct or indirect child processes.
  • the debug process management unit 30b outputs a debug instruction for suspending or resuming execution of the related process (including a process identified by the process ID included in the execution suspend instruction or execution resume instruction) selected in this way. Issued against.
  • the debug processing block 32 executes debug processing according to the debug instruction issued by the command analysis unit 30a or the debug processing block 32. That is, the static information processing unit 32a reads the memory and the register in accordance with the debug instruction issued by the command analysis unit 30a, and passes the contents to the protocol encoding unit 28b of the debug protocol transmission / reception block 28.
  • the execution control unit 32b suspends execution or resumes execution of a plurality of processes according to the debug instruction issued by the debug processing block 32.
  • the event processing block 34 detects the occurrence of a specific event in the OS 20.
  • the specific event is a thread creation event, a thread disappearance event, a process creation event, a process disappearance event, or the arrival of an instruction point corresponding to a breakpoint set in the user application program 16 in advance (break hit Event), program exception, and step execution end event.
  • Debug process management unit 3 Ob determines which process should be interrupted based on the parent-child relationship table, and issues debug instructions to debug processing block 32 to interrupt the execution of those processes. .
  • the exception handler included in OS20 is executed.
  • a step execution end event is detected, a process execution interruption instruction including the PID of the process related to the step execution end event is passed to the debug process management unit 30b.
  • the debug process management unit 30b is based on the parent-child relationship table. The process determines which process should be interrupted and issues a debug instruction to the debug processing block 32 to interrupt the execution of those processes.
  • debug process management unit 30b will be further described with reference to FIG.
  • the debug process management unit 30b includes a parent-child relationship table update unit 40, a parent-child relationship table storage unit 42, an instruction issue process list storage unit 44, an instruction target process selection unit 46, and an instruction unit 48. It has been.
  • the parent-child relationship table storage unit 42 includes the memory of the target computer 14 and stores a parent-child relationship table indicating the parent-child relationship of the process to be debugged.
  • FIG. 4 is a diagram illustrating an example of a parent-child relationship of a plurality of processes being executed on the target computer 12, and
  • FIG. 5 is a diagram illustrating a parent-child relationship table indicating a parent-child relationship. As shown in Fig.
  • the parent-child relationship table stores the management target PID, the parent process PID, and the child process PID in association with each other.
  • the managed PID is identification information (PID) that identifies the process that manages the parent-child relationship, that is, the process that is being debugged.
  • the parent process PID is identification information (PID) that identifies the parent process of the process identified by the corresponding managed PID. If the parent process does not exist or is not known, a null value (indicated by a horizontal line in the figure) is stored.
  • the child process PID is identification information (PID) that identifies the child process of the process identified by the corresponding managed PID. If no child process exists or is not found, a null value (indicated by a horizontal line in the figure) is stored.
  • the parent-child relation table update unit 40 adds a record having the generated process PID as a managed PID to the parent-child relation table. Then, store the PID of the created parent process in the parent process PID column of the record in the parent-child relationship table. Also, a null value is stored in the child process PID column of the same record. Furthermore, the PID of the created process is referred to as the management target PID and the registered record is referenced, and the PID of the created process is stored in the child process PID column. The above processing will be described in detail later as parent-child relationship registration processing.
  • the parent-child relationship table update unit 40 deletes the record having the PID of the extinguished process as the management target PID from the parent-child relationship table. Furthermore, the disappeared professional Delete the PID of the process from the parent process PID column and child process PID column of other records
  • the instruction target process selection section 46 directly processes the process identified by the PID included in those instructions. Read PID of child process from parent-child relationship table. Further, the PID of the direct child process of the process identified by the read PID (indirect child process as viewed from the process identified by the original PID) is read from the parent-child relationship table. By repeating this process, PID can be obtained for all direct or indirect child processes. These PIDs are sequentially stored in an instruction issue process list storage unit 44 that includes the memory of the target computer 12.
  • the instruction unit 48 reads the PIDs stored in the instruction issue process list storage unit 44, and processes execution interruption instructions or processes passed from the event processing block 34 or the command analysis unit 30a to the processes identified by these PIDs.
  • a debug instruction is issued to debug processing block 32 to execute the resume execution instruction.
  • a process execution interruption instruction is passed from the event processing block 34 or the command analysis unit 30a, the execution of all direct or indirect child processes of the process identified by the PID included in those instructions is interrupted. be able to.
  • a process execution resumption instruction is passed from the command analysis unit 30a, it is possible to resume the execution of all direct or indirect child processes of the process identified by the PID included in the instruction.
  • FIG. 6 is a flowchart showing a parent-child relationship registration process by the debug agent program 18.
  • the parent-child relationship registration process shown in the figure is executed by the parent-child relationship table update unit 40 included in the debug process management unit 30b when it is notified from the event processing block 34 that a process generation event has been detected. Is.
  • event information of a process generation event is first acquired (S101).
  • the event information includes the PID of the generated process, and it is checked whether this PID is already stored in the management target PID column of any record in the parent-child relationship table (S102). If it is stored, the parent-child relationship registration process is terminated.
  • the OS 20 is inquired and acquired for the PID parent-child relationship data included in the acquired event information (S103).
  • the parent-child relationship data includes the PID of the parent process and the child process identified by the PID included in the event information acquired in S101. Then, it is checked whether the PID of the parent process included in the parent-child relationship data is already stored in the management target PID column of any record in the parent-child relationship table (S104). If it is stored, the PID included in the event information acquired in S101 is stored in the child process PID column of the record (S105). If not stored, this S105 process is skipped. Finally, a new record is added to the parent-child relationship table, and the PID included in the event information acquired in the management target PID field S101 is stored. At this time, null values are stored in the parent process column and the child process column.
  • the parent-child relationship regarding the process can be stored in the parent-child relationship table.
  • FIG. 7 is a flowchart showing debugging processing by the debug agent program 18. This process is executed when a debug instruction is input from the host debugger program 26 and the debug instruction is transmitted to the debug agent program 18 by the debug communication program 24.
  • the receiving unit 28c first receives a debug instruction (S201), and the protocol decode unit 28d decodes the debug instruction (S202).
  • the command analysis unit 30a analyzes the decoded debug instruction and acquires the type of the instruction (S203). At this time, if the type of instruction is a specific one, that is, if it is a process execution interruption instruction or an execution resumption instruction (S204), multiple process instruction processing is executed (S205).
  • the debug instruction is de-processed so that the execution suspension process or the execution restart process is executed for all direct or indirect child processes of the process identified by the PID included in the execution suspension instruction or the execution resume instruction. Issued to bag processing block 32.
  • the instruction type is not specific, the instruction contents inputted from the host debugger program 26 are not changed, and the debug instruction is issued to the debug processing block 32 (S206). Thereafter, the protocol encoding unit 28b decodes the processing result of the debug instruction (S207), and the transmission unit 28a transmits it to the host computer 14.
  • FIG. 8 is a flowchart showing multi-process instruction processing by the debug agent program 18.
  • the processing shown in the figure is executed in S205 in FIG. 7 and S403 in FIG.
  • the PID of the process to be directly commanded is acquired (S301).
  • the record in which the PID is stored in the management target PID column is read from the parent-child relationship table, and the child process PID column force also reads the PID (S302).
  • These PIDs are stored in the instruction issue process list storage unit 44 (S303). Further, it is checked whether or not the record in which the PID stored in the instruction issue process list storage unit 44 is stored in the parent process PID column exists in the parent-child relationship table (S304).
  • the PID is acquired from the child process PID column of the record, and additionally stored in the instruction issue process list storage unit 44 (S305). In this case, the process of S304 is executed again. If it is determined in S304 that there is no record, the command unit 48 issues a process execution interruption command or a process execution restart command for the PID stored in the command issuing process list 44 (S306).
  • the PID when a certain PID is acquired, the PID can be surely acquired for all direct or indirect child processes of the process identified by the PID. it can.
  • FIG. 9 is a flowchart showing event processing by the debug agent program 18.
  • the processing shown in the figure is executed centering on the event processing block 34.
  • S401 an event occurrence is detected (S401)
  • S402 it is determined whether or not it is a specific event (S402). If the event is a specific event, that is, a break hit event or a step execution end event, the debug process management unit 30b is caused to execute the multi-process instruction processing shown in FIG. 8 (S403). Thereafter, the debug processing block 32 acquires the result of the instruction, and the protocol encoding unit 28b encodes it (S404). Then, the encoded instruction result is transmitted to the host computer 14 (S405).
  • the event processing block 34 notifies the protocol encoding unit 28b of the event occurrence.
  • the protocol encoding unit 28b encodes data indicating the occurrence of an event, and the transmission unit 28a transmits the data to the host computer 14 (S406).
  • a parent-child relationship table indicating a parent-child relationship of some or all of a plurality of processes executed by the program to be debugged is stored in the parent-child relationship table storage unit 42. Then, a PID for identifying the process to be debugged is acquired, and all direct or indirect child processes of the process identified by this PID are selected based on the parent-child relationship table. Then, a debugging process is performed for the selected processes.
  • the process identified by the acquired P ID but also all direct or indirect child processes selected based on the parent-child relationship table can be debugged. This makes debugging work more efficient.
  • the host debugger program 26 is executed on the host computer 14 different from the target computer 12.
  • the host debugger program 26 or an equivalent program may be executed on the target computer 12. Good. In this way, you can debug the program on one computer.

Abstract

There is provided a program capable of effectively performing debug of a program for executing a plurality of processes on a computer. The program for debugging the program executing a plurality of processes on a computer causes the computer to function as a parent-child relationship table storing unit (42) for storing a parent-child relationship table indicating the parent-child relationship of some or all the processes, an instruction object process selection unit (46) for acquiring a process identifier for identifying a process to be debugged and selecting a related process of the process selected by the process identifier acquired, and a command unit (48) for debugging the selected related process.

Description

プログラムデバッグ装置、プログラムデバッグ方法及び情報記憶媒体 技術分野  Program debugging apparatus, program debugging method, and information storage medium
[0001] 本発明はプログラムデバッグ装置、プログラムデバッグ方法及び情報記憶媒体に関 し、特にマルチプロセスデバッガに関する。  The present invention relates to a program debugging device, a program debugging method, and an information storage medium, and more particularly to a multi-process debugger.
背景技術  Background art
[0002] デバッガは、コンピュータプログラムの不具合 (バグ)の発見を支援するためのコンビ ユータプログラムである。デバッガ (シンボリックデバッガ)を用いることにより、ユーザ が任意にソースプログラム中にブレークポイントを設定して、該ブレークポイントに対 応する命令箇所でプログラムの実行を中断させることができる(ブレークポイント機能) 。さらに、決まった処理量 (例えば 1命令)ずつプログラムを実行させたり(ステップ実 行機能)、或いはプログラム実行中にレジスタやメモリの内容を確認したりすることもで きるようになる(ウォッチ機能 (又はトレース機能))。  [0002] A debugger is a computer program for supporting the discovery of a bug (bug) in a computer program. By using a debugger (symbolic debugger), the user can arbitrarily set a breakpoint in the source program and interrupt the execution of the program at the instruction location corresponding to the breakpoint (breakpoint function). In addition, the program can be executed by a fixed amount of processing (for example, one instruction) (step execution function), or the contents of registers and memory can be checked during program execution (watch function ( Or trace function)).
[0003] 特に、下記非特許文献 1に開示された GDB (The GNU Source-Level Debugger)で は、コンピュータで実行される複数のプロセスうち一部又は全部を任意に指定して、 それら指定されたプロセスの実行を中断させたり、それらの実行を再開させたりするこ とがでさる。 [0003] In particular, in GDB (The GNU Source-Level Debugger) disclosed in Non-Patent Document 1 below, some or all of a plurality of processes executed on a computer are arbitrarily specified, and these are specified. You can interrupt the execution of processes or resume their execution.
非特許文献 1 :リチャード ストールマン,ポーランド ペッシュ,スタン シェブス他、,, Debugging with GDB", [online],平成 12年 3月、 [平成 12年 12月 21日検索]、インタ ~~ネットく URL:nttp://www.asahi— net.or.jp/ wg5k— ickw/html/ online/ gdb— 5.0/ gdb-ja —toc.html〉  Non-Patent Document 1: Richard Stallman, Polish Pesch, Stan Chebbs et al., Debugging with GDB ", [online], March 2000, [Searched December 21, 2000], Internet ~~ net URL : nttp: //www.asahi— net.or.jp/ wg5k— ickw / html / online / gdb— 5.0 / gdb-ja —toc.html>
発明の開示  Disclosure of the invention
発明が解決しょうとする課題  Problems to be solved by the invention
[0004] し力しながら、コンピュータ上で複数のプロセスが実行されるプログラムのデバッグ 作業を従来のデバッガを用いて行うと、次のような問題がある。すなわち、あるプロセ スにブレークポイントを設定すると、そのブレークポイントに対応する命令箇所で同プ 口セスの実行が中断されるに過ぎなカゝつたり、或いは実行中の全プロセスの実行が 中断されてしまったりする。このため、ブレークポイントを設定したプロセスの子プロセ スに不具合がある場合には、いずれにしても、その不具合を発見することが困難であ つた o However, if a conventional debugger is used to debug a program in which a plurality of processes are executed on a computer, there are the following problems. In other words, when a breakpoint is set in a process, the execution of the same process is simply interrupted at the instruction location corresponding to the breakpoint, or the execution of all the processes being executed is interrupted. It will be interrupted. For this reason, if there is a defect in the child process of the process that set the breakpoint, it is difficult to find the defect anyway.
[0005] 本発明は上記課題に鑑みてなされたものであって、その目的は、コンピュータ上で 複数のプロセスが実行されるプログラムのデバッグ作業を効率的に行うことができる プログラムデバッグ装置、プログラムデバッグ方法及び情報記憶媒体を提供すること にある。  [0005] The present invention has been made in view of the above problems, and an object of the present invention is to provide a program debugging apparatus and program debugging capable of efficiently performing a debugging operation of a program in which a plurality of processes are executed on a computer. It is to provide a method and an information storage medium.
課題を解決するための手段  Means for solving the problem
[0006] 上記課題を解決するために、本発明に係るプログラムデバッグ装置は、コンビユー タ上で複数のプロセスを実行するプログラムに対してデバッグ処理を行うためのプロ グラムデバッグ装置であって、前記複数のプロセスの一部又は全部の親子関係を示 す親子関係テーブルを記憶する親子関係テーブル記憶手段と、前記デバッグ処理 の対象となるプロセスを識別するプロセス識別情報を取得するプロセス識別情報取 得手段と、前記親子関係テーブルに基づいて、前記プロセス識別情報取得手段によ り取得されるプロセス識別情報により識別されるプロセスの関連プロセスを選出する 関連プロセス選出手段と、前記関連プロセス選出手段により選出される関連プロセス に対して、前記デバッグ処理を行うデバッグ処理手段と、を含むことを特徴とする。 [0006] In order to solve the above problems, a program debug device according to the present invention is a program debug device for performing debug processing on a program that executes a plurality of processes on a computer, A parent-child relationship table storage unit for storing a parent-child relationship table indicating a part or all of the parent-child relationship of the process; and a process identification information acquisition unit for acquiring process identification information for identifying the process to be debugged. Based on the parent-child relationship table, a related process selection means for selecting a related process of the process identified by the process identification information acquired by the process identification information acquisition means, and a selection by the related process selection means Debug processing means for performing the debug processing on an associated process. The features.
[0007] また、本発明に係るプログラムデバッグ方法は、コンピュータ上で複数のプロセスを 実行するプログラムに対してデバッグ処理を行うためのプログラムデバッグ方法であ つて、前記複数のプロセスの一部又は全部の親子関係を示す親子関係テーブルを 記憶手段に記憶する親子関係テーブルステップと、前記デバッグ処理の対象となる プロセスを識別するプロセス識別情報を取得するプロセス識別情報取得ステップと、 前記親子関係テーブルに基づ 、て、前記プロセス識別情報取得ステップで取得され るプロセス識別情報により識別されるプロセスの関連プロセスを選出する関連プロセ ス選出ステップと、前記関連プロセス選出ステップで選出される関連プロセスに対し て、前記デバッグ処理を行うデバッグ処理ステップと、を含むことを特徴とする。 [0007] Further, a program debugging method according to the present invention is a program debugging method for performing a debugging process on a program that executes a plurality of processes on a computer, and includes a part or all of the plurality of processes. Based on the parent-child relationship table, a parent-child relationship table step for storing a parent-child relationship table in the storage means, a process identification information acquisition step for acquiring process identification information for identifying the process to be debugged, and the parent-child relationship table For the related process selection step for selecting a related process of the process identified by the process identification information acquired in the process identification information acquisition step, and for the related process selected in the related process selection step, A debugging process step for performing a debugging process. It is characterized by that.
[0008] さらに、本発明に係る情報記憶媒体は、複数のプロセスを実行するプログラムに対 してデバッグ処理を行うためのプログラムであって、前記複数のプロセスの一部又は 全部の親子関係を示す親子関係テーブルを記憶する親子関係テーブル記憶手段、 前記デバッグ処理の対象となるプロセスを識別するプロセス識別情報を取得するプロ セス識別情報取得手段、前記親子関係テーブルに基づいて、前記プロセス識別情 報取得手段により取得されるプロセス識別情報により識別されるプロセスの関連プロ セスを選出する関連プロセス選出手段、及び前記関連プロセス選出手段により選出 される関連プロセスに対して、前記デバッグ処理を行うデバッグ処理手段としてコンビ ユータを機能させるための情報記憶媒体である。 [0008] Furthermore, an information storage medium according to the present invention is a program for performing a debugging process on a program that executes a plurality of processes, and a part of the plurality of processes or Based on the parent-child relationship table storage means for storing a parent-child relationship table indicating all parent-child relationships, a process identification information acquisition means for acquiring process identification information for identifying the process to be debugged, and the parent-child relationship table, The related process selection means for selecting a related process of the process identified by the process identification information acquired by the process identification information acquisition means, and the debug process for the related process selected by the related process selection means. This is an information storage medium for causing a computer to function as a debugging processing means for performing the above.
[0009] 本発明によれば、デバッグ対象であるプログラムにより実行される複数のプロセスの うち一部又は全部の親子関係を示す親子関係テーブルが記憶される。そして、デバ ッグ処理の対象となるプロセスを識別するプロセス識別情報が取得され、このプロセ ス識別情報により識別されるプロセスの関連プロセスが、親子関係テーブルに基づ いて選出される。このとき、親子関係テーブルに基づいて、プロセス識別情報取得手 段により取得されるプロセス識別情報により識別されるプロセス、及び該プロセスの直 接並びに間接の子プロセスを関連プロセスとして選出するようにしてもよい。そして、 選出される関連プロセスに対してデバッグ処理が行われる。こうすれば、プロセス識 別情報により識別されるプロセスのみならず、親子関係テーブルに基づいて選出さ れる関連プロセスに対してまで、デバッグ処理を行うことができ、デバッグ作業を効率 ィ匕することがでさる。  [0009] According to the present invention, a parent-child relationship table indicating a parent-child relationship of some or all of a plurality of processes executed by a program to be debugged is stored. Then, process identification information for identifying a process to be debugged is acquired, and a related process of the process identified by the process identification information is selected based on the parent-child relationship table. At this time, based on the parent-child relationship table, the process identified by the process identification information acquired by the process identification information acquisition means, and the direct and indirect child processes of the process may be selected as related processes. Good. Then, debug processing is performed for the selected related process. In this way, not only the process identified by the process identification information but also the related process selected based on the parent-child relationship table can be debugged, and the debugging work can be made efficient. I'll do it.
[0010] 本発明の一態様では、前記デバッグ処理は、前記関連プロセス選出手段により選 出される関連プロセスの実行停止又は実行再開のための処理である。こうすれば、 関連プロセスの実行を一括して停止又は再開させることができる。  In one aspect of the present invention, the debugging process is a process for stopping or restarting execution of a related process selected by the related process selection unit. In this way, execution of related processes can be stopped or restarted in a batch.
[0011] また、本発明の一態様では、前記複数のプロセスのうち前記コンピュータ上で実行 中のプロセスの親子関係を示す親子関係データを取得するとともに、該親子関係デ ータに基づいて前記親子関係テーブル記憶手段に記憶される前記親子関係テープ ルを更新する親子関係更新手段をさらに含む。こうすれば、現にコンピュータで実行 中のプロセスの親子関係に基づき、親子関係テーブルを更新できるようになる。  [0011] Further, in one aspect of the present invention, parent-child relationship data indicating a parent-child relationship of a process being executed on the computer among the plurality of processes is acquired, and the parent-child relationship data is acquired based on the parent-child relationship data. It further includes parent-child relationship updating means for updating the parent-child relationship table stored in the relationship table storage means. In this way, the parent-child relationship table can be updated based on the parent-child relationship of the processes currently running on the computer.
[0012] この態様では、前記親子関係更新手段は、前記コンピュータ上で新規にプロセス が生成される場合に、該プロセスの親子関係を示す親子関係データを取得するとと もに、該親子関係データに基づいて前記親子関係テーブル記憶手段に記憶される 前記親子関係テーブルを更新するようにしてもよい。こうすれば、新規にプロセスが 生成される場合に、速やかに親子関係テーブルを更新することができる。 [0012] In this aspect, the parent-child relationship update means obtains parent-child relationship data indicating the parent-child relationship of the process when a process is newly generated on the computer. In addition, the parent-child relationship table stored in the parent-child relationship table storage means may be updated based on the parent-child relationship data. In this way, the parent-child relationship table can be quickly updated when a new process is created.
[0013] また、本発明の一態様では、前記親子関係更新手段は、前記コンピュータ上で既 に実行されているプロセスが消滅する場合に、該プロセスに関するデータを前記親 子関係テーブル記憶手段に記憶される前記親子関係テーブルから削除する。こうす れば、プロセスが消滅する場合に、速やかに親子関係テーブルを更新することがで きる。  [0013] Further, according to one aspect of the present invention, when the process already executed on the computer disappears, the parent-child relationship update unit stores data related to the process in the parent-child relationship table storage unit. Deleted from the parent-child relationship table. In this way, when the process disappears, the parent-child relationship table can be quickly updated.
[0014] また、本発明の一態様では、前記プロセス識別情報取得手段は、ユーザにより入 力される前記デバッグ処理に関する命令に含まれるプロセス識別情報を取得する。こ うすれば、ユーザによる命令の入力に応じて、該命令に含まれるプロセス識別情報に よって識別されるプロセスの関連プロセスに対してデバッグ処理を行うことができる。  [0014] In one aspect of the present invention, the process identification information acquisition unit acquires process identification information included in a command related to the debug process input by a user. In this way, according to the input of the instruction by the user, it is possible to perform the debugging process on the process related to the process identified by the process identification information included in the instruction.
[0015] また、本発明の一態様では、前記プロセス識別情報取得手段は、前記コンピュータ 上で発生する特定種類のイベントに関連するプロセスを識別するプロセス識別情報 を取得する。こうすれば、特定種類のイベントの発生に応じて、該イベントに関連する プロセスの関連プロセスに対してデバッグ処理を行うことができる。  In one aspect of the present invention, the process identification information acquisition unit acquires process identification information for identifying a process related to a specific type of event that occurs on the computer. In this way, according to the occurrence of a specific type of event, the debugging process can be performed on the related process of the process related to the event.
図面の簡単な説明  Brief Description of Drawings
[0016] [図 1]本発明の実施形態に係るプログラム開発環境を示す図である。 FIG. 1 is a diagram showing a program development environment according to an embodiment of the present invention.
[図 2]ターゲットコンピュータにおいてデバッグエージェントプログラムによって実現さ れる機能を示す機能ブロック図である。  FIG. 2 is a functional block diagram showing functions realized by a debug agent program in a target computer.
[図 3]デバッグプロセス管理部の機能ブロック図である。  FIG. 3 is a functional block diagram of a debug process management unit.
[図 4]ターゲットコンピュータで実行中の複数のプロセスの親子関係の一例を示す図 である。  FIG. 4 is a diagram showing an example of a parent-child relationship of a plurality of processes being executed on a target computer.
[図 5]図 4に示される複数のプロセスの親子関係を示す親子関係テーブルを示す図 である。  FIG. 5 is a diagram showing a parent-child relationship table showing parent-child relationships of a plurality of processes shown in FIG.
[図 6]親子関係登録処理を示すフロー図である。  FIG. 6 is a flowchart showing parent-child relationship registration processing.
[図 7]デバッグ処理を示すフロー図である。  FIG. 7 is a flowchart showing debugging processing.
[図 8]複数プロセス命令処理を示すフロー図である。 [図 9]イベント処理を示すフロー図である。 FIG. 8 is a flowchart showing a multi-process instruction process. FIG. 9 is a flowchart showing event processing.
発明を実施するための最良の形態  BEST MODE FOR CARRYING OUT THE INVENTION
[0017] 以下、本発明の一実施形態について図面に基づき詳細に説明する。 Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0018] 図 1は、本発明の一実施形態に係るプログラム開発環境の一例を示す図である。こ のプログラム開発環境 10は、本発明の一実施形態に係るプログラムデバッグ方法を 適用したものであり、図示しないデータ通信ネットワークによって通信接続されたター ゲットコンピュータ 12及びホストコンピュータ 14を含んで構成されている。ターゲットコ ンピュータ 12は、本発明の一実施形態に係るプログラムデバッグ装置として機能する コンピュータであり、ホストコンピュータ 14はターゲットコンピュータ 12上で実行される プログラムのデバッグを行うためのコンピュータである。これらのコンピュータとしては、 例えば公知のパーソナルコンピュータシステム、或いはワークステーション等を用い て構成することができる。 FIG. 1 is a diagram showing an example of a program development environment according to an embodiment of the present invention. This program development environment 10 applies a program debugging method according to an embodiment of the present invention, and includes a target computer 12 and a host computer 14 that are communicably connected by a data communication network (not shown). Yes. The target computer 12 is a computer that functions as a program debugging apparatus according to an embodiment of the present invention, and the host computer 14 is a computer for debugging a program executed on the target computer 12. These computers can be configured using, for example, a known personal computer system or a workstation.
[0019] ターゲットコンピュータ 12では、 OS (オペレーティングシステム) 20が動作しており、 ユーザアプリケーションプログラム 16とデバッグエージェントプログラム 18がインスト一 ルされている。そして、 OS20上で、ユーザアプリケーションプログラム 16とデバッグ エージェントプログラム 18が実行される。ユーザアプリケーションプログラム 16は、複 数のプロセスを実行するプログラムであり、ユーザのデバッグ作業の対象である。デ バッグエージェントプログラム 18は、 OS20上で動作する一種のアプリケーションプロ グラムであって、ホストコンピュータ 14からの制御に従って動作し、また OS20から取 得したデバッグ用の各種データをホストコンピュータ 14に送信するようになっている。 OS20は、各種デバッグ用のプログラムを含んでおり、デバッグエージェントプロダラ ム 18ではこれらのプログラムを利用してユーザアプリケーションプログラム 16のデバ ッグ (各プロセスの実行中断、実行再開、メモリやレジスタの内容確認等)を行うことが できるようになつている。なお、各プログラムは、 CD— ROMや DVD— ROM等のコ ンピュータ読み取り可能な情報記憶媒体に格納されて配布されてよい。この場合、情 報記憶媒体力 各プログラムが読み出され、ターゲットコンピュータ 12やホストコンビ ユータ 14にインストールされる。  In the target computer 12, an OS (operating system) 20 is operating, and a user application program 16 and a debug agent program 18 are installed. Then, the user application program 16 and the debug agent program 18 are executed on the OS 20. The user application program 16 is a program that executes a plurality of processes, and is a target of user debugging work. The debug agent program 18 is a kind of application program that runs on the OS 20, operates according to the control from the host computer 14, and transmits various types of debugging data obtained from the OS 20 to the host computer 14. It has become. OS20 includes various debugging programs, and debug agent program 18 uses these programs to debug user application program 16 (execution of each process is suspended, execution resumed, contents of memory and registers). Confirmation, etc.). Each program may be stored and distributed in a computer-readable information storage medium such as a CD-ROM or DVD-ROM. In this case, each program of the information storage medium is read and installed in the target computer 12 or the host computer 14.
[0020] ホストコンピュータ 14では、 OS22が動作しており、該 OS22上でデバッグ通信プロ グラム 24及びホストデバッガプログラム 26が実行される。ホストデバッガプログラム 26 は、ユーザアプリケーションプログラム 16のデバッグ作業を行うための一種のアプリケ ーシヨンプログラムであり、ユーザアプリケーションプログラム 16により起動されるプロ セスのうち一部又は全部を指定して、その実行中断や実行再開を指示することがで きる。また、ユーザアプリケーションプログラム 16の任意の命令箇所にブレークポイン トを設定したり、ターゲットコンピュータ 12のメモリやレジスタにデータを書き込み、又 そこ力 データを読み出したり、プロセスリストの取得やプロセスの状態情報の取得を 行ったりすることができる。さらに、デバッグエージェントプログラム 18では、ユーザァ プリケーシヨンプログラム 16に設定されたブレークポイントの到来(ヒットイベント)、プ ログラム例外の発生、ステップ実行の終了を監視するようになっている。そして、これ らの事象が生じた場合には、それを示すデータをホストデバッガプログラム 26に通知 する。ホストデバッガプログラム 26では、こうして通知される各種のデータをディスプレ ィ等に表示する。 [0020] In the host computer 14, an OS 22 is operating, and a debug communication program is executed on the OS 22. The program 24 and the host debugger program 26 are executed. The host debugger program 26 is a kind of application program for debugging the user application program 16, and designates part or all of the processes started by the user application program 16 and interrupts the execution thereof. And can resume execution. In addition, a breakpoint can be set at an arbitrary instruction location of the user application program 16, data can be written to the memory or register of the target computer 12, and the corresponding data can be read, process list acquisition and process status information can be obtained. You can get it. Furthermore, the debug agent program 18 monitors the arrival of breakpoints (hit events) set in the user application program 16, the occurrence of program exceptions, and the end of step execution. If these events occur, the host debugger program 26 is notified of the data indicating them. The host debugger program 26 displays various data thus notified on a display or the like.
[0021] デバッグ通信プログラム 24は、ホストデバッガプログラム 26とデバッグエージェント プログラム 18とのデータ通信を中継するものであり、ホストデバッガプログラム 26のデ ータをデバッグエージェントプログラム 18で処理可能なデータに変換し、或いは逆に 、デバッグエージェントプログラム 18のデータをホストデバッガプログラム 26で処理可 能なデータに変換して 、る。  [0021] The debug communication program 24 relays data communication between the host debugger program 26 and the debug agent program 18, and converts the data of the host debugger program 26 into data that can be processed by the debug agent program 18. Conversely, the data of the debug agent program 18 is converted into data that can be processed by the host debugger program 26.
[0022] ここで、デバッグエージェントプログラム 18の機能構成について説明する。図 2は、 ターゲットコンピュータ 12上でデバッグエージェントプログラム 18によって実現される 機能を示す機能ブロック図である。デバッグエージェントプログラム 18は、ターゲット コンピュータ 12によって実行されることで、デバッグプロトコル送受信ブロック 28、プロ セス制御ブロック 30、デバッグ処理ブロック 32及びイベント処理ブロック 34の機能を 実現するものである。デバッグプロトコル送受信ブロック 28は、送信部 28a、プロトコ ルエンコード部 28b、受信部 28c及びプロトコルデコード部 28dを含んで構成されて いる。プロセス制御ブロック 30は、コマンド解析部 30a及びデバッグプロセス管理部 3 Obを含んで構成されている。デバッグ処理ブロック 32は、静的情報処理部 32a及び 実行制御部 32bを含んで構成されて ヽる。 [0023] まず、デバッグプロトコル送受信ブロック 28は、データ通信ネットワークを介してホス トコンピュータ 14上で実行されて 、るデバッグ通信プログラム 24と通信を行う。具体 的には、プロトコルエンコード部 28bは、デバッグ処理ブロック 32から渡される処理結 果をデバッグ通信プログラム 24で解釈可能なデータに変換する。送信部 28aは、プ ロトコルエンコード部 28bによりエンコードされたデバッグ処理ブロック 32の処理結果 をデバッグ通信プログラム 24に送信する。ホストデバッガプログラム 26では、こうして デバッグ通信プログラム 24に送信される処理結果を表示等する。受信部 28cは、デ バッグ通信プログラム 24から送信されるデータを受信する。このデータは、ホストデバ ッガプログラム 26から入力されるものであり、実行中断命令、実行再開命令、メモリ読 み出し命令、レジスタ読み出し命令等を示す。実行中断命令や実行再開命令は、実 行中断又は実行再開すべきプロセスを識別するプロセス ID (識別情報)を含む。プロ トコルデコード部 28dは、受信部 28cにより受信されるデータをプロセス制御ブロック 3 0で解釈可能なデータに変換する。こうして変換されたデータはプロセス制御ブロック 30に渡される。 Here, a functional configuration of the debug agent program 18 will be described. FIG. 2 is a functional block diagram showing functions realized by the debug agent program 18 on the target computer 12. The debug agent program 18 is executed by the target computer 12 to realize the functions of the debug protocol transmission / reception block 28, the process control block 30, the debug processing block 32, and the event processing block 34. The debug protocol transmission / reception block 28 includes a transmission unit 28a, a protocol encoding unit 28b, a reception unit 28c, and a protocol decoding unit 28d. The process control block 30 includes a command analysis unit 30a and a debug process management unit 3 Ob. The debug processing block 32 includes a static information processing unit 32a and an execution control unit 32b. First, the debug protocol transmission / reception block 28 is executed on the host computer 14 via the data communication network to communicate with the debug communication program 24. Specifically, the protocol encoding unit 28 b converts the processing result passed from the debug processing block 32 into data that can be interpreted by the debug communication program 24. The transmission unit 28a transmits the processing result of the debug processing block 32 encoded by the protocol encoding unit 28b to the debug communication program 24. The host debugger program 26 displays the processing result transmitted to the debug communication program 24 in this way. The receiving unit 28c receives data transmitted from the debug communication program 24. This data is input from the host debugger program 26, and indicates an execution interruption instruction, an execution restart instruction, a memory read instruction, a register read instruction, and the like. The execution suspension instruction and the execution resume instruction include a process ID (identification information) for identifying a process to be suspended or resumed. The protocol decoding unit 28d converts the data received by the receiving unit 28c into data that can be interpreted by the process control block 30. The converted data is passed to the process control block 30.
[0024] プロセス制御ブロック 30は、デバッグプロトコル送受信ブロック 28から渡されるデー タを解析し、該データが示す命令に応じたデバッグ命令をデバッグ処理ブロック 32に 発行する。具体的には、コマンド解析部 30aはプロトコルデコード部 28dから渡される データを解析し、該データが示す命令が実行中断命令、実行再開命令、メモリ読み 出し命令、レジスタ読み出し命令等のいずれであるかを判断する。メモリ読み出し命 令やレジスタ読み出し命令であれば、そのままデバッグ処理ブロック 32に対してそれ らの命令に応じたデバッグ命令を発行する。一方、実行中断命令や実行再開命令で あれば、それらの命令の内容をデバッグプロセス管理部 30bに渡す。  The process control block 30 analyzes the data passed from the debug protocol transmission / reception block 28 and issues a debug instruction corresponding to the instruction indicated by the data to the debug processing block 32. Specifically, the command analysis unit 30a analyzes the data passed from the protocol decoding unit 28d, and whether the instruction indicated by the data is an execution interruption instruction, an execution restart instruction, a memory read instruction, a register read instruction, or the like Judging. If it is a memory read instruction or a register read instruction, a debug instruction corresponding to the instruction is issued to the debug processing block 32 as it is. On the other hand, if it is an execution interruption instruction or an execution resumption instruction, the contents of those instructions are passed to the debug process management unit 30b.
[0025] デバッグプロセス管理部 30bは、実行中断命令や実行再開命令に含まれるプロセ ス IDを後述する親子関係テーブルに照査し、該プロセス IDにより識別されるプロセス の関連プロセスを選出する。この関連プロセスは、具体的には直接又は間接の子プ 口セスの全てである。デバッグプロセス管理部 30bは、こうして選出する関連プロセス (実行中断命令や実行再開命令に含まれるプロセス IDによって識別されるプロセス を含む。)の実行中断や実行再開のためのデバッグ命令をデバッグ処理ブロック 32 に対して発行する。 [0025] The debug process management unit 30b checks a process ID included in the execution suspension instruction and the execution restart instruction in a parent-child relation table described later, and selects a related process of the process identified by the process ID. This related process is specifically all direct or indirect child processes. The debug process management unit 30b outputs a debug instruction for suspending or resuming execution of the related process (including a process identified by the process ID included in the execution suspend instruction or execution resume instruction) selected in this way. Issued against.
[0026] デバッグ処理ブロック 32は、コマンド解析部 30a又はデバッグ処理ブロック 32により 発行されるデバッグ命令に従い、デバッグ処理を実行する。すなわち、静的情報処 理部 32aは、コマンド解析部 30aにより発行されるデバッグ命令に応じてメモリやレジ スタの読み出しを行い、その内容をデバッグプロトコル送受信ブロック 28のプロトコル エンコード部 28bに渡す。実行制御部 32bは、デバッグ処理ブロック 32により発行さ れるデバッグ命令に応じて複数プロセスの実行中断や実行再開を行う。  The debug processing block 32 executes debug processing according to the debug instruction issued by the command analysis unit 30a or the debug processing block 32. That is, the static information processing unit 32a reads the memory and the register in accordance with the debug instruction issued by the command analysis unit 30a, and passes the contents to the protocol encoding unit 28b of the debug protocol transmission / reception block 28. The execution control unit 32b suspends execution or resumes execution of a plurality of processes according to the debug instruction issued by the debug processing block 32.
[0027] イベント処理ブロック 34は、 OS20での特定イベントの発生を検知する。特定ィベン トは、ここではスレッドの生成イベント、スレッドの消滅イベント、プロセスの生成ィベン ト、プロセスの消滅イベント、予めユーザアプリケーションプログラム 16に設定したブ レークポイントに対応する命令箇所の到来 (ブレークのヒットイベント)、プログラム例 外、ステップ実行の終了イベントである。スレッドの生成イベントやスレッドの消滅ィべ ントの発生を検知すると、その旨をデバッグプロトコル送受信ブロック 28に渡す。これ によりこれらイベントの発生がホストコンピュータ 14 (さらに特定的にはホストデバッガ プログラム 26)に通知される。一方、プロセスの生成イベントの発生を検知すると、そ の旨をプロセス制御ブロック 30のデバッグプロセス管理部 30bに渡す。これにより、新 たに発生したプロセスの親子関係の管理がデバッグプロセス管理部 30bにて開始さ れる。プロセスの消滅イベントの発生を検知した場合も、その旨をデバッグプロセス管 理部 30bに渡す。これにより、消滅したプロセスの親子関係の管理がデバッグプロセ ス管理部 30bにて終了される。ブレークのヒットイベントの発生を検知すると、該ヒット イベントに係るブレークポイントが設定されたプロセスの PID (プロセス ID)を含むプロ セス実行中断命令をデバッグプロセス管理部 30bに渡す。デバッグプロセス管理部 3 Obでは、親子関係テーブルに基づき、どのプロセスに対して実行中断処理を行うベ きかを判断し、それらのプロセスの実行を中断させるためのデバッグ命令をデバッグ 処理ブロック 32に発行する。プログラム例外を検知すると、 OS20に含まれる例外ハ ンドラを実行する。また、ステップ実行の終了イベントを検知すると、該ステップ実行 の終了イベントに係るプロセスの PIDを含むプロセス実行中断命令をデバッグプロセ ス管理部 30bに渡す。デバッグプロセス管理部 30bでは、親子関係テーブルに基づ き、どのプロセスに対して中断処理を行うべきかを判断し、それらのプロセスの実行を 中断させるためのデバッグ命令をデバッグ処理ブロック 32に発行する。 [0027] The event processing block 34 detects the occurrence of a specific event in the OS 20. Here, the specific event is a thread creation event, a thread disappearance event, a process creation event, a process disappearance event, or the arrival of an instruction point corresponding to a breakpoint set in the user application program 16 in advance (break hit Event), program exception, and step execution end event. When the occurrence of a thread creation event or a thread disappearance event is detected, the fact is passed to the debug protocol transmission / reception block 28. As a result, the occurrence of these events is notified to the host computer 14 (more specifically, the host debugger program 26). On the other hand, when the occurrence of the process generation event is detected, the fact is passed to the debug process management unit 30b of the process control block 30. As a result, management of the parent-child relationship of the newly generated process is started by the debug process management unit 30b. When the occurrence of a process extinction event is detected, that fact is passed to the debug process management unit 30b. As a result, management of the parent-child relationship of the extinguished process is terminated in the debug process management unit 30b. When the occurrence of a break hit event is detected, a process execution interruption instruction including the PID (process ID) of the process in which the breakpoint related to the hit event is set is passed to the debug process management unit 30b. Debug process management unit 3 Ob determines which process should be interrupted based on the parent-child relationship table, and issues debug instructions to debug processing block 32 to interrupt the execution of those processes. . When a program exception is detected, the exception handler included in OS20 is executed. When a step execution end event is detected, a process execution interruption instruction including the PID of the process related to the step execution end event is passed to the debug process management unit 30b. The debug process management unit 30b is based on the parent-child relationship table. The process determines which process should be interrupted and issues a debug instruction to the debug processing block 32 to interrupt the execution of those processes.
[0028] ここで、図 3を参照しながらデバッグプロセス管理部 30bについてさらに説明する。 Here, the debug process management unit 30b will be further described with reference to FIG.
同図に示すように、デバッグプロセス管理部 30bは、親子関係テーブル更新部 40、 親子関係テーブル記憶部 42、命令発行プロセスリスト記憶部 44、命令対象プロセス 選択部 46及び命令部 48を含んで構成されて 、る。親子関係テーブル記憶部 42は 、ターゲットコンピュータ 14のメモリを含んで構成されるものであり、デバッグ対象とな るプロセスの親子関係を示す親子関係テーブルを記憶する。図 4は、ターゲットコン ピュータ 12で実行中の複数のプロセスの親子関係の一例を示す図であり、図 5は、 親子関係を示す親子関係テーブルを示す図である。図 5に示すように、親子関係テ 一ブルは、管理対象 PIDと親プロセス PIDと子プロセス PIDとを対応づけて記憶して いる。管理対象 PIDは、親子関係の管理を行うプロセス、すなわちデバッグ対象であ る実行中のプロセスを識別する識別情報 (PID)である。親プロセス PIDは、対応する 管理対象 PIDにより識別されるプロセスの親プロセスを識別する識別情報 (PID)で ある。親プロセスが存在しない場合、或いは判明しない場合にはヌル値(図中横線で 示される。)が格納される。子プロセス PIDは、対応する管理対象 PIDにより識別され るプロセスの子プロセスを識別する識別情報 (PID)である。子プロセスが存在しな ヽ 場合、或いは判明しない場合にはヌル値(図中横線で示される。)が格納される。  As shown in the figure, the debug process management unit 30b includes a parent-child relationship table update unit 40, a parent-child relationship table storage unit 42, an instruction issue process list storage unit 44, an instruction target process selection unit 46, and an instruction unit 48. It has been. The parent-child relationship table storage unit 42 includes the memory of the target computer 14 and stores a parent-child relationship table indicating the parent-child relationship of the process to be debugged. FIG. 4 is a diagram illustrating an example of a parent-child relationship of a plurality of processes being executed on the target computer 12, and FIG. 5 is a diagram illustrating a parent-child relationship table indicating a parent-child relationship. As shown in Fig. 5, the parent-child relationship table stores the management target PID, the parent process PID, and the child process PID in association with each other. The managed PID is identification information (PID) that identifies the process that manages the parent-child relationship, that is, the process that is being debugged. The parent process PID is identification information (PID) that identifies the parent process of the process identified by the corresponding managed PID. If the parent process does not exist or is not known, a null value (indicated by a horizontal line in the figure) is stored. The child process PID is identification information (PID) that identifies the child process of the process identified by the corresponding managed PID. If no child process exists or is not found, a null value (indicated by a horizontal line in the figure) is stored.
[0029] 親子関係テーブル更新部 40は、イベント処理ブロック 34からプロセスの生成ィベン トの発生が通知される場合に、その生成されたプロセスの PIDを管理対象 PIDとする レコードを親子関係テーブルに追カ卩し、その生成されたプロセスの親プロセスの PID を親子関係テーブルの当該レコードの親プロセス PID欄に格納する。また、同レコー ドの子プロセス PID欄にヌル値を格納する。さらに、生成されたプロセスの親プロセス の PIDを管理対象 PIDとする、登録済みのレコードを参照し、その子プロセス PID欄 に生成されたプロセスの PIDを格納する。以上の処理は、親子関係登録処理として 後に詳述する。親子関係テーブル更新部 40では、イベント処理ブロック 34からプロ セスの消滅イベントの発生が通知される場合に、その消滅したプロセスの PIDを管理 対象 PIDとするレコードを親子関係テーブルから削除する。さらに、その消滅したプロ セスの PIDをその他のレコードの親プロセス PID欄や子プロセス PID欄から削除する [0029] When the event processing block 34 notifies the occurrence of a process generation event from the event processing block 34, the parent-child relation table update unit 40 adds a record having the generated process PID as a managed PID to the parent-child relation table. Then, store the PID of the created parent process in the parent process PID column of the record in the parent-child relationship table. Also, a null value is stored in the child process PID column of the same record. Furthermore, the PID of the created process is referred to as the management target PID and the registered record is referenced, and the PID of the created process is stored in the child process PID column. The above processing will be described in detail later as parent-child relationship registration processing. When the event processing block 34 notifies the occurrence of a process extinction event, the parent-child relationship table update unit 40 deletes the record having the PID of the extinguished process as the management target PID from the parent-child relationship table. Furthermore, the disappeared professional Delete the PID of the process from the parent process PID column and child process PID column of other records
[0030] 命令対象プロセス選択部 46は、イベント処理ブロック 34やコマンド解析部 30aから プロセス実行中断命令又はプロセス実行再開命令を渡される場合に、それら命令に 含まれる PIDにより識別されるプロセスの直接の子プロセスの PIDを親子関係テープ ルから読み出す。さらに、その読み出した PIDにより識別されるプロセスの直接の子 プロセス(元の PIDにより識別されるプロセスから見て間接の子プロセス)の PIDを親 子関係テーブルから読み出す。この処理を繰り返すことにより、直接又は間接の子プ 口セスの全てについて PIDを取得することができる。これらの PIDは、ターゲットコンビ ユータ 12のメモリを含んで構成された命令発行プロセスリスト記憶部 44に順次記憶さ れる。命令部 48は、命令発行プロセスリスト記憶部 44に記憶された PIDを読み出し、 それら PIDにより識別されるプロセスに対して、イベント処理ブロック 34やコマンド解 析部 30aから渡されるプロセス実行中断命令又はプロセス実行再開命令を実行する よう、デバッグ命令をデバッグ処理ブロック 32に発行する。こうして、イベント処理ブロ ック 34やコマンド解析部 30aからプロセス実行中断命令が渡される場合に、それら命 令に含まれる PIDによって識別されるプロセスの直接又は間接の子プロセスの全て の実行を中断させることができる。また、コマンド解析部 30aからプロセス実行再開命 令が渡される場合に、それら命令に含まれる PIDによって識別されるプロセスの直接 又は間接の子プロセスの全ての実行を再開させることができる。 [0030] When a process execution suspension instruction or a process execution restart instruction is passed from the event processing block 34 or the command analysis section 30a, the instruction target process selection section 46 directly processes the process identified by the PID included in those instructions. Read PID of child process from parent-child relationship table. Further, the PID of the direct child process of the process identified by the read PID (indirect child process as viewed from the process identified by the original PID) is read from the parent-child relationship table. By repeating this process, PID can be obtained for all direct or indirect child processes. These PIDs are sequentially stored in an instruction issue process list storage unit 44 that includes the memory of the target computer 12. The instruction unit 48 reads the PIDs stored in the instruction issue process list storage unit 44, and processes execution interruption instructions or processes passed from the event processing block 34 or the command analysis unit 30a to the processes identified by these PIDs. A debug instruction is issued to debug processing block 32 to execute the resume execution instruction. In this way, when a process execution interruption instruction is passed from the event processing block 34 or the command analysis unit 30a, the execution of all direct or indirect child processes of the process identified by the PID included in those instructions is interrupted. be able to. In addition, when a process execution resumption instruction is passed from the command analysis unit 30a, it is possible to resume the execution of all direct or indirect child processes of the process identified by the PID included in the instruction.
[0031] ここで、デバッグエージェントプログラム 18の主要な処理をフロー図に基づいて説 明する。図 6は、デバッグエージェントプログラム 18による親子関係登録処理を示す フロー図である。同図に示す親子関係登録処理は、イベント処理ブロック 34からプロ セスの生成イベントの発生が検知されたことが通知されると、デバッグプロセス管理部 30bに含まれる親子関係テーブル更新部 40により実行されるものである。この処理 では、まずプロセスの生成イベントのイベント情報を取得する(S101)。イベント情報 は、生成されたプロセスの PIDを含んでおり、この PIDが親子関係テーブルのいずれ かのレコードの管理対象 PID欄に既に記憶されている力否かを調べる(S102)。そし て、記憶されていれば親子関係登録処理を終了する。一方、記憶されていなければ 、 S 101にお 、て取得したイベント情報に含まれる PIDの親子関係データを OS 20に 問い合わせ、取得する(S103)。親子関係データは、 S 101において取得したィベン ト情報に含まれる PIDによって識別されるプロセスの親プロセス及び子プロセスの PI Dを含んでいる。そして、親子関係データに含まれる親プロセスの PIDが、親子関係 テーブルのいずれかのレコードの管理対象 PID欄に既に記憶されているか否かを調 ベる(S104)。そして、記憶されていれば、そのレコードの子プロセス PID欄に、 S10 1で取得したイベント情報に含まれる PIDを格納する(S105)。記憶されていなけれ ば、この S105の処理をスキップする。最後に、親子関係テーブルに新規レコードを 追加し、その管理対象 PID欄〖こ S 101で取得したイベント情報に含まれる PIDを格納 する。このとき、親プロセス欄及び子プロセス欄にはヌル値を格納する。 Here, the main processing of the debug agent program 18 will be described based on a flowchart. FIG. 6 is a flowchart showing a parent-child relationship registration process by the debug agent program 18. The parent-child relationship registration process shown in the figure is executed by the parent-child relationship table update unit 40 included in the debug process management unit 30b when it is notified from the event processing block 34 that a process generation event has been detected. Is. In this process, event information of a process generation event is first acquired (S101). The event information includes the PID of the generated process, and it is checked whether this PID is already stored in the management target PID column of any record in the parent-child relationship table (S102). If it is stored, the parent-child relationship registration process is terminated. On the other hand, if not remembered In S101, the OS 20 is inquired and acquired for the PID parent-child relationship data included in the acquired event information (S103). The parent-child relationship data includes the PID of the parent process and the child process identified by the PID included in the event information acquired in S101. Then, it is checked whether the PID of the parent process included in the parent-child relationship data is already stored in the management target PID column of any record in the parent-child relationship table (S104). If it is stored, the PID included in the event information acquired in S101 is stored in the child process PID column of the record (S105). If not stored, this S105 process is skipped. Finally, a new record is added to the parent-child relationship table, and the PID included in the event information acquired in the management target PID field S101 is stored. At this time, null values are stored in the parent process column and the child process column.
[0032] 以上のようにして、新たにプロセスが生成された場合に該プロセスに関する親子関 係を親子関係テーブルに記憶させることができる。  [0032] As described above, when a process is newly generated, the parent-child relationship regarding the process can be stored in the parent-child relationship table.
[0033] 次に、図 7は、デバッグエージェントプログラム 18によるデバッグ処理を示すフロー 図である。この処理は、ホストデバッガプログラム 26からデバッグ命令が入力され、該 デバッグ命令がデバッグ通信プログラム 24によってデバッグエージェントプログラム 1 8に送信される場合に実行されるものである。同図に示すように、この処理では、まず 受信部 28cがデバッグ命令を受信し(S201)、このデバッグ命令をプロトコルデコード 部 28dがデコードする(S202)。次に、コマンド解析部 30aは、デコードされたデバッ グ命令を解析し、その命令の種類を取得する(S203)。このとき、命令の種類が特定 のもの、すなわちプロセスの実行中断命令又は実行再開命令であれば (S204)、複 数プロセス命令処理を実行する(S205)。この処理により、実行中断命令や実行再 開命令に含まれる PIDによって識別されるプロセスの直接又は間接の子プロセスの 全てに対して、実行中断処理又は実行再開処理を実行するよう、デバッグ命令がデ バッグ処理ブロック 32に発行される。一方、命令の種類が特定のものでなければ、ホ ストデバッガプログラム 26から入力された命令内容を変えず、デバッグ命令をデバッ グ処理ブロック 32に発行する(S206)。その後、プロトコルエンコード部 28bは、デバ ッグ命令の処理結果をデコードし (S207)、それを送信部 28aがホストコンピュータ 1 4に送信する。 [0034] 以上の処理によれば、特にプロセスの実行中断命令又は実行再開命令がホストデ ノ ッガプログラム 26に入力される場合に、それらの命令に含まれる PIDによって識別 されるプロセスのみならず、その直接又は間接の子プロセスの全てについて実行中 断処理又は実行再開処理が実行されるようになる。 Next, FIG. 7 is a flowchart showing debugging processing by the debug agent program 18. This process is executed when a debug instruction is input from the host debugger program 26 and the debug instruction is transmitted to the debug agent program 18 by the debug communication program 24. As shown in the figure, in this process, the receiving unit 28c first receives a debug instruction (S201), and the protocol decode unit 28d decodes the debug instruction (S202). Next, the command analysis unit 30a analyzes the decoded debug instruction and acquires the type of the instruction (S203). At this time, if the type of instruction is a specific one, that is, if it is a process execution interruption instruction or an execution resumption instruction (S204), multiple process instruction processing is executed (S205). With this process, the debug instruction is de-processed so that the execution suspension process or the execution restart process is executed for all direct or indirect child processes of the process identified by the PID included in the execution suspension instruction or the execution resume instruction. Issued to bag processing block 32. On the other hand, if the instruction type is not specific, the instruction contents inputted from the host debugger program 26 are not changed, and the debug instruction is issued to the debug processing block 32 (S206). Thereafter, the protocol encoding unit 28b decodes the processing result of the debug instruction (S207), and the transmission unit 28a transmits it to the host computer 14. [0034] According to the above processing, in particular, when a process execution interruption instruction or execution resumption instruction is input to the host debugger program 26, not only the process identified by the PID included in those instructions but also its process directly. Alternatively, execution interruption processing or execution resumption processing is executed for all indirect child processes.
[0035] 図 8は、デバッグエージェントプログラム 18による複数プロセス命令処理を示すフロ 一図である。同図に示す処理は、図 7の S205や図 9の S403で実行されるものである 。図 8に示すように、この処理では、まず直接の命令対象となるプロセスの PIDを取得 する(S301)。そして、この PIDが管理対象 PID欄に格納されたレコードを親子関係 テーブルから読み出し、その子プロセス PID欄力も PIDをよみだす(S302)。そして、 それらの PIDを命令発行プロセスリスト記憶部 44に格納する(S303)。さらに、命令 発行プロセスリスト記憶部 44に格納された PIDが親プロセス PID欄に格納されたレコ ードが親子関係テーブルに存在するカゝ否かを調べる(S304)。そして、このようなレコ ードがあれば、そのレコードの子プロセス PID欄から PIDを取得して命令発行プロセ スリスト記憶部 44に追加記憶する(S305)。この場合、 S304の処理を再び実行する 。 S304においてレコードが存在しないと判断すると、命令部 48は命令発行プロセス リスト 44に記憶された PIDについて、プロセス実行中断命令やプロセス実行再開命 令を発行する(S306)。  FIG. 8 is a flowchart showing multi-process instruction processing by the debug agent program 18. The processing shown in the figure is executed in S205 in FIG. 7 and S403 in FIG. As shown in FIG. 8, in this process, first, the PID of the process to be directly commanded is acquired (S301). Then, the record in which the PID is stored in the management target PID column is read from the parent-child relationship table, and the child process PID column force also reads the PID (S302). These PIDs are stored in the instruction issue process list storage unit 44 (S303). Further, it is checked whether or not the record in which the PID stored in the instruction issue process list storage unit 44 is stored in the parent process PID column exists in the parent-child relationship table (S304). If there is such a record, the PID is acquired from the child process PID column of the record, and additionally stored in the instruction issue process list storage unit 44 (S305). In this case, the process of S304 is executed again. If it is determined in S304 that there is no record, the command unit 48 issues a process execution interruption command or a process execution restart command for the PID stored in the command issuing process list 44 (S306).
[0036] 以上の処理によれば、ある PIDが取得される場合にその PIDにより識別されるプロ セスの直接又は間接の子プロセスの全てにっ 、て、それらの PIDを確実に取得する ことができる。  [0036] According to the above processing, when a certain PID is acquired, the PID can be surely acquired for all direct or indirect child processes of the process identified by the PID. it can.
[0037] 最後に、図 9は、デバッグエージェントプログラム 18によるイベント処理を示すフロー 図である。同図に示す処理は、イベント処理ブロック 34を中心に実行されるものであ り、イベント発生を検出すると (S401)、それが特定イベントである力否かを判断する( S402)。そして、特定イベント、すなわちブレークのヒットイベント又はステップ実行の 終了イベントであれば、デバッグプロセス管理部 30bに対して、図 8に示す複数プロ セス命令処理を実行させる(S403)。その後、デバッグ処理ブロック 32が命令の結果 を取得し、それをプロトコルエンコード部 28bがエンコードする(S404)。そして、ェン コードされた命令結果をホストコンピュータ 14に送信する(S405)。一方、 S402にお いて、イベントが特定イベントでないと判断されると、イベント処理ブロック 34はプロト コルエンコード部 28bにイベント発生を通知する。これにより、プロトコルエンコード部 28bがイベント発生を示すデータをエンコードし、それを送信部 28aがホストコンビュ ータ 14に送信する(S406)。 Finally, FIG. 9 is a flowchart showing event processing by the debug agent program 18. The processing shown in the figure is executed centering on the event processing block 34. When an event occurrence is detected (S401), it is determined whether or not it is a specific event (S402). If the event is a specific event, that is, a break hit event or a step execution end event, the debug process management unit 30b is caused to execute the multi-process instruction processing shown in FIG. 8 (S403). Thereafter, the debug processing block 32 acquires the result of the instruction, and the protocol encoding unit 28b encodes it (S404). Then, the encoded instruction result is transmitted to the host computer 14 (S405). Meanwhile, in S402 If it is determined that the event is not a specific event, the event processing block 34 notifies the protocol encoding unit 28b of the event occurrence. As a result, the protocol encoding unit 28b encodes data indicating the occurrence of an event, and the transmission unit 28a transmits the data to the host computer 14 (S406).
[0038] 以上の処理によれば、 OS20においてブレークのヒットイベントやステップ実行の終 了イベントが発生すれば、それらのイベントに関連するプロセスの直接又は間接の子 プロセスの全てに対して、それらの実行を中断させることができる。  [0038] According to the above processing, if a break hit event or a step execution end event occurs in OS20, all direct or indirect child processes of the process related to those events will be ignored. Execution can be interrupted.
[0039] 以上説明した実施形態では、デバッグ対象であるプログラムにより実行される複数 のプロセスのうち一部又は全部の親子関係を示す親子関係テーブルが親子関係テ 一ブル記憶部 42に記憶される。そして、デバッグ処理の対象となるプロセスを識別す る PIDが取得され、この PIDにより識別されるプロセスの直接又は間接の子プロセス の全てが、親子関係テーブルに基づいて選出される。そして、それら選出されるプロ セスに対してデバッグ処理が行われる。こうして、本実施形態によれば、取得された P IDにより識別されるプロセスのみならず、親子関係テーブルに基づいて選出される 直接又は間接の子プロセスの全てに対してまで、デバッグ処理を行うことができ、デ バッグ作業を効率ィ匕することができる。  In the embodiment described above, a parent-child relationship table indicating a parent-child relationship of some or all of a plurality of processes executed by the program to be debugged is stored in the parent-child relationship table storage unit 42. Then, a PID for identifying the process to be debugged is acquired, and all direct or indirect child processes of the process identified by this PID are selected based on the parent-child relationship table. Then, a debugging process is performed for the selected processes. Thus, according to the present embodiment, not only the process identified by the acquired P ID but also all direct or indirect child processes selected based on the parent-child relationship table can be debugged. This makes debugging work more efficient.
[0040] なお、本発明は上記実施形態に限定されるものではなぐ種々の変形実施が可能 である。例えば、以上の説明ではターゲットコンピュータ 12とは異なるホストコンビュ ータ 14においてホストデバッガプログラム 26を実行するようにした力 ターゲットコン ピュータ 12においてホストデバッガプログラム 26又はそれと同等のプログラムを実行 させるようにしてもよい。こうすれば、 1つのコンピュータでプログラムのデバッグ作業 を行うことができる。  [0040] It should be noted that the present invention is not limited to the above-described embodiment, and various modifications can be made. For example, in the above description, the host debugger program 26 is executed on the host computer 14 different from the target computer 12. The host debugger program 26 or an equivalent program may be executed on the target computer 12. Good. In this way, you can debug the program on one computer.

Claims

請求の範囲 The scope of the claims
[1] コンピュータ上で複数のプロセスを実行するプログラムに対してデバッグ処理を行う ためのプログラムデバッグ装置であって、  [1] A program debugging apparatus for performing debugging processing on a program that executes a plurality of processes on a computer,
前記複数のプロセスの一部又は全部の親子関係を示す親子関係テーブルを記憶 する親子関係テーブル記憶手段と、  A parent-child relationship table storage means for storing a parent-child relationship table showing a parent-child relationship of all or part of the plurality of processes;
前記デバッグ処理の対象となるプロセスを識別するプロセス識別情報を取得するプ ロセス識別情報取得手段と、  Process identification information acquisition means for acquiring process identification information for identifying a process to be debugged;
前記親子関係テーブルに基づ 、て、前記プロセス識別情報取得手段により取得さ れるプロセス識別情報により識別されるプロセスの関連プロセスを選出する関連プロ セス選出手段と、  A related process selection means for selecting a related process of the process identified by the process identification information acquired by the process identification information acquisition means based on the parent-child relationship table;
前記関連プロセス選出手段により選出される関連プロセスに対して、前記デバッグ 処理を行うデバッグ処理手段と、  Debug processing means for performing the debug processing on the related process selected by the related process selection means;
を含むことを特徴とするプログラムデバッグ装置。  A program debugging apparatus comprising:
[2] 請求の範囲第 1項に記載のプログラムデバッグ装置にぉ 、て、  [2] In the program debugging device according to claim 1,
前記デバッグ処理は、前記関連プロセス選出手段により選出される関連プロセスの 実行停止又は実行再開のための処理である、  The debugging process is a process for stopping or resuming execution of a related process selected by the related process selection means.
ことを特徴とするプログラムデバッグ装置。  A program debugging apparatus.
[3] 請求の範囲第 1項又は第 2項に記載のプログラムデバッグ装置において、 [3] In the program debugging device according to claim 1 or 2,
前記複数のプロセスのうち前記コンピュータ上で実行中のプロセスの親子関係を示 す親子関係データを取得するとともに、該親子関係データに基づいて前記親子関係 テーブル記憶手段に記憶される前記親子関係テーブルを更新する親子関係更新手 段をさらに含む、  The parent-child relationship data indicating the parent-child relationship of a process being executed on the computer among the plurality of processes is acquired, and the parent-child relationship table stored in the parent-child relationship table storage means based on the parent-child relationship data is acquired. It further includes a parent-child relationship update method to be updated,
ことを特徴とするプログラムデバッグ装置。  A program debugging apparatus.
[4] 請求の範囲第 3項に記載のプログラムデバッグ装置にぉ 、て、 [4] In the program debugging device according to claim 3,
前記親子関係更新手段は、前記コンピュータ上で新規にプロセスが生成される場 合に、該プロセスの親子関係を示す親子関係データを取得するとともに、該親子関 係データに基づいて前記親子関係テーブル記憶手段に記憶される前記親子関係テ 一ブルを更新する、 ことを特徴とするプログラムデバッグ装置。 The parent-child relationship updating means acquires parent-child relationship data indicating a parent-child relationship of the process when a process is newly generated on the computer, and stores the parent-child relationship table based on the parent-child relationship data. Updating the parent-child relationship table stored in the means; A program debugging apparatus.
[5] 請求の範囲第 3項に記載のプログラムデバッグ装置にぉ 、て、 [5] In the program debugging device according to claim 3,
前記親子関係更新手段は、前記コンピュータ上で既に実行されて!ヽるプロセスが 消滅する場合に、該プロセスに関するデータを前記親子関係テーブル記憶手段に 記憶される前記親子関係テーブルから削除する、  The parent-child relationship updating means has already been executed on the computer! When a process to be extinguished disappears from the parent-child relationship table stored in the parent-child relationship table storage means, data relating to the process;
ことを特徴とするプログラムデバッグ装置。  A program debugging apparatus.
[6] 請求の範囲第 1項に記載のプログラムデバッグ装置にぉ 、て、 [6] In the program debugging device according to claim 1,
前記プロセス識別情報取得手段は、ユーザにより入力される前記デバッグ処理に 関する命令に含まれるプロセス識別情報を取得する、  The process identification information acquisition means acquires process identification information included in an instruction related to the debug process input by a user;
ことを特徴とするプログラムデバッグ装置。  A program debugging apparatus.
[7] 請求の範囲第 1項に記載のプログラムデバッグ装置にぉ 、て、 [7] In the program debugging device according to claim 1,
前記プロセス識別情報取得手段は、前記コンピュータ上で発生する特定種類のィ ベントに関連するプロセスを識別するプロセス識別情報を取得する、  The process identification information acquisition means acquires process identification information for identifying a process related to a specific type of event generated on the computer.
ことを特徴とするプログラムデバッグ装置。  A program debugging apparatus.
[8] 請求の範囲第 1項に記載のプログラムデバッグ装置にぉ 、て、 [8] In the program debugging device according to claim 1,
前記関連プロセス選出手段は、前記親子関係テーブルに基づいて、前記プロセス 識別情報取得手段により取得されるプロセス識別情報により識別されるプロセス、及 び該プロセスの直接並びに間接の子プロセスを前記関連プロセスとして選出する、 ことを特徴とするプログラムデバッグ装置。  The related process selection means, based on the parent-child relationship table, processes identified by the process identification information acquired by the process identification information acquisition means, and direct and indirect child processes of the process as the related processes. A program debugging device characterized by being selected.
[9] コンピュータ上で複数のプロセスを実行するプログラムに対してデバッグ処理を行う ためのプログラムデバッグ方法であって、 [9] A program debugging method for performing debugging on a program that executes a plurality of processes on a computer,
前記複数のプロセスの一部又は全部の親子関係を示す親子関係テーブルを記憶 手段に記憶する親子関係テーブルステップと、  A parent-child relationship table step of storing in a storage means a parent-child relationship table indicating a parent-child relationship of all or part of the plurality of processes;
前記デバッグ処理の対象となるプロセスを識別するプロセス識別情報を取得するプ ロセス識別情報取得ステップと、  A process identification information acquisition step for acquiring process identification information for identifying a process to be debugged;
前記親子関係テーブルに基づ 、て、前記プロセス識別情報取得ステップで取得さ れるプロセス識別情報により識別されるプロセスの関連プロセスを選出する関連プロ セス選出ステップと、 前記関連プロセス選出ステップで選出される関連プロセスに対して、前記デバッグ 処理を行うデバッグ処理ステップと、 A related process selection step for selecting a related process of the process identified by the process identification information acquired in the process identification information acquisition step based on the parent-child relationship table; A debug process step for performing the debug process on the related process selected in the related process selection step;
を含むことを特徴とするプログラムデバッグ方法。  A program debugging method comprising:
複数のプロセスを実行するプログラムに対してデバッグ処理を行うためのプログラム を記憶したコンピュータ読み取り可能な情報記憶媒体であって、  A computer-readable information storage medium storing a program for performing debug processing on a program executing a plurality of processes,
前記複数のプロセスの一部又は全部の親子関係を示す親子関係テーブルを記憶 する親子関係テーブル記憶手段、  A parent-child relationship table storage means for storing a parent-child relationship table showing a parent-child relationship of all or part of the plurality of processes;
前記デバッグ処理の対象となるプロセスを識別するプロセス識別情報を取得するプ ロセス識別情報取得手段、  Process identification information acquisition means for acquiring process identification information for identifying a process to be debugged;
前記親子関係テーブルに基づ 、て、前記プロセス識別情報取得手段により取得さ れるプロセス識別情報により識別されるプロセスの関連プロセスを選出する関連プロ セス選出手段、及び  A related process selection means for selecting a related process of the process identified by the process identification information acquired by the process identification information acquisition means based on the parent-child relationship table; and
前記関連プロセス選出手段により選出される関連プロセスに対して、前記デバッグ 処理を行うデバッグ処理手段  Debug processing means for performing the debug processing on the related process selected by the related process selecting means
としてコンピュータを機能させるためのプログラムを記憶したコンピュータ読み取り可 能な情報記憶媒体。  A computer-readable information storage medium storing a program for causing a computer to function as a computer.
PCT/JP2005/016492 2004-12-28 2005-09-08 Program debug device, program debug method, and information storage medium WO2006070510A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004380801A JP2006185360A (en) 2004-12-28 2004-12-28 Program debugging device, program debugging method, and program
JP2004-380801 2004-12-28

Publications (1)

Publication Number Publication Date
WO2006070510A1 true WO2006070510A1 (en) 2006-07-06

Family

ID=36614637

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/016492 WO2006070510A1 (en) 2004-12-28 2005-09-08 Program debug device, program debug method, and information storage medium

Country Status (3)

Country Link
JP (1) JP2006185360A (en)
TW (1) TW200634515A (en)
WO (1) WO2006070510A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9395983B2 (en) 2008-08-20 2016-07-19 Freescale Semiconductor, Inc. Debug instruction for execution by a first thread to generate a debug event in a second thread to cause a halting operation

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012079130A (en) * 2010-10-01 2012-04-19 Fujitsu Ltd Debug support program, debug support device and debug support method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02118733A (en) * 1988-10-28 1990-05-07 Nec Corp System for controlling execution of task
JPH03257633A (en) * 1990-03-08 1991-11-18 Hitachi Ltd Process control method
JPH04338836A (en) * 1991-05-16 1992-11-26 Ricoh Co Ltd Control system for image forming device
JPH0546431A (en) * 1991-08-07 1993-02-26 Nec Corp Multiprocess debugger
JPH064361A (en) * 1992-06-18 1994-01-14 Hokuriku Nippon Denki Software Kk Trace information collecting system
JPH07200347A (en) * 1993-12-28 1995-08-04 Nec Corp Process compatible debug system
JPH086813A (en) * 1994-06-23 1996-01-12 Hitachi Ltd Trace control system
JPH08320809A (en) * 1995-05-25 1996-12-03 Hitachi Ltd Disturbance process exclusion system
JPH09259002A (en) * 1996-03-22 1997-10-03 Hitachi Ltd Debug support device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03247633A (en) * 1990-02-26 1991-11-05 Du Pont Mitsui Fluorochem Co Ltd Volatile foaming agent for expansion of thermoplastic resin

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02118733A (en) * 1988-10-28 1990-05-07 Nec Corp System for controlling execution of task
JPH03257633A (en) * 1990-03-08 1991-11-18 Hitachi Ltd Process control method
JPH04338836A (en) * 1991-05-16 1992-11-26 Ricoh Co Ltd Control system for image forming device
JPH0546431A (en) * 1991-08-07 1993-02-26 Nec Corp Multiprocess debugger
JPH064361A (en) * 1992-06-18 1994-01-14 Hokuriku Nippon Denki Software Kk Trace information collecting system
JPH07200347A (en) * 1993-12-28 1995-08-04 Nec Corp Process compatible debug system
JPH086813A (en) * 1994-06-23 1996-01-12 Hitachi Ltd Trace control system
JPH08320809A (en) * 1995-05-25 1996-12-03 Hitachi Ltd Disturbance process exclusion system
JPH09259002A (en) * 1996-03-22 1997-10-03 Hitachi Ltd Debug support device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9395983B2 (en) 2008-08-20 2016-07-19 Freescale Semiconductor, Inc. Debug instruction for execution by a first thread to generate a debug event in a second thread to cause a halting operation

Also Published As

Publication number Publication date
JP2006185360A (en) 2006-07-13
TW200634515A (en) 2006-10-01

Similar Documents

Publication Publication Date Title
JP4388518B2 (en) Thread debugging device, thread debugging method and program
KR100715704B1 (en) Interrupt control apparatus and method
US7992042B2 (en) Debug support device, and program for directing computer to perform debugging method
US20070168972A1 (en) Debugging a computer program
US20090164976A1 (en) Multi-threaded debugger support
WO2012016438A1 (en) Debugger and debugging method thereof
US6543049B1 (en) Ranked break points and method for debugging a computer program
KR102025078B1 (en) Diagnosing code using single step execution
US20130096880A1 (en) System test method
US8701094B2 (en) Event management in a non-stop debugging environment
US20110126175A1 (en) Debugging method and debugging device using hardware breakpoints
WO2006070510A1 (en) Program debug device, program debug method, and information storage medium
JP2006039763A (en) Guest os debug supporting method and virtual computer manager
JP2008257438A (en) Exception processor used for control of debugging device, exception processing method, exception processing program, and television and cellphone incorporated with the exception processor
US7716529B2 (en) System LSI
JPH11134204A (en) Stack protecting device
JP2007213396A (en) Debugging system, operation system, debugging method, and program
JP2001166966A (en) Method for managing execution environment of program to be tested in debugger
JP2004318658A (en) Debugging control device and control method thereof
JPH06161817A (en) Thread on-line debugging device
JPH01145740A (en) Emulator for multi-process
JP2001147830A (en) Method for changing state of real time os
JPS638946A (en) Program debug supporting system
JP2001325122A (en) Debugging system and its method
JPH0395638A (en) Debugging device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 05778597

Country of ref document: EP

Kind code of ref document: A1

WWW Wipo information: withdrawn in national office

Ref document number: 5778597

Country of ref document: EP