Search Images Maps Play YouTube News Gmail Drive More »
Sign in
Screen reader users: click this link for accessible mode. Accessible mode has the same essential features but works better with your reader.

Patents

  1. Advanced Patent Search
Publication numberCN1437110 A
Publication typeApplication
Application numberCN 03104230
Publication date20 Aug 2003
Filing date8 Feb 2003
Priority date7 Feb 2002
Also published asEP1335292A2, EP1335292A3, US7134115, US20030149961
Publication number03104230.9, CN 03104230, CN 1437110 A, CN 1437110A, CN-A-1437110, CN03104230, CN03104230.9, CN1437110 A, CN1437110A
Inventors河合正树, 川本琢二
Applicant松下电器产业株式会社
Export CitationBiBTeX, EndNote, RefMan
External Links: SIPO, Espacenet
Arrangement and method for break-point setting
CN 1437110 A
Abstract  translated from Chinese
公开了一种断点设定装置,能够设定断点,不需给程序员增加负担。 Discloses a breakpoint setting device can set breakpoints, the programmer does not need to increase the burden. 该断点设定装置包括一个被编辑的行表管理器115,用于管理源代码中被编辑的行的地址,和一个断点设定/禁止子单元106,其用于在被编辑的行表管理器115中存储的地址设定断点。 The breakpoint setting means comprises a row of the table being edited manager 115 for managing the address line of the source code to be edited, and a breakpoint setting / inhibition subunit 106 for the row to be edited Table manager 115 stored in the address setting breakpoints. 该断点设定装置在程序员进行编辑的每一行上设定一个断点,不需要程序员给出任何特定指令。 The breakpoint setting means setting a breakpoint in the programmer, the programmer does not need to give any specific instructions on each line editing.
Claims(17)  translated from Chinese
1.一种断点设定装置,包括:一个加载单元,可操作加载相应于源代码产生的目标代码;一个存储单元,可操作存储表示组成源代码的每一部件和在目标代码中的相应位置之间的关系的信息;一个获取单元,当对源代码进行特定的编辑时,可操作自动获取和存储指定经受特定编辑的部件的编辑信息;和一个设定单元,可操作自动在目标代码中在相应于由编辑信息指定的部件的位置处设定断点。 A breakpoint setting apparatus, comprising: a loading unit operable to load the object code corresponding to the generated source code; a storage unit operable to store the source code representing the composition of each part and in the object code of the corresponding information on the relationship between the positions; an acquisition unit, when the source code specific editing, operable to automatically obtain the editing information and the storage-specifying subjected to specific editing member; and a setting unit operable automatically in object code set a breakpoint at the position corresponding to the information specified by the editing part.
2.权利要求1的断点设定装置,其中,每一部件是组成源代码的一行,并且每一行可以由分配给它的行号唯一标识,存储单元存储源代码的每一行号和在目标代码中的相应位置之间的关系,以及获取单元获取作为编辑信息的标识源代码中经受特定编辑的行的行号。 Each line number breakpoint setting apparatus according to claim 1, wherein each member is a single line of the source code, and each line may be assigned to it by the line number that uniquely identifies the storage unit stores the source code and the target the relationship between the positions of the corresponding code, as well as edit the information acquisition unit acquires identification source code editing undergo specific line number.
3.权利要求2的断点设定装置,其中,特定编辑是删除换行符,和所述断点设定装置另外包括一个更新单元,当编辑源代码删除一个换行符时,可操作更新在获取单元中存储的编辑信息,使得大于指定的行号的每一行号减1。 Breakpoint setting device according to claim 2, wherein the specific edit delete line breaks, and the breakpoint setting device further comprises an update unit, when editing the source code to remove a newline, the operational update in obtaining Edit the information in the storage unit, making greater than the specified line number for each line number minus one.
4.权利要求2的断点设定装置,另外包括一个更新单元,当编辑源代码在一行的行首增加一个换行符时,可操作更新在获取单元中存储的编辑信息,使得不小于标识被编辑的行的行号的每一行号加1。 Breakpoint setting device according to claim 2, further comprising an update unit, when editing the source code line by line to add a newline, the operational update in acquiring unit edit information stored, so as not to be less than the identity Each row number plus editing of a line number.
5.权利要求2的断点设定装置,另外包括一个更新单元,当编辑源代码在一行的末尾增加一个换行符时,可操作更新在获取单元中存储的编辑信息,使得大于标识被编辑的行的行号的每一行号加1。 Breakpoint claim 2 setting means additionally includes an update unit, when editing source code at the end of a line when a line feed is increased, obtaining unit operable to update stored in the editing information, so that the edited flag is greater than each line number plus line number 1.
6.权利要求2的断点设定装置,其中,特定编辑是在源代码的一行的中间增加一个换行符,和断点设定装置另外包括一个更新单元,当编辑源代码在一行的中间增加一个换行符时,可操作更新在获取单元中存储的编辑信息,使得大于指定的行号的每一行号加1,并且通过给指定的行号加1获得的行号被另外存储在编辑信息中。 Breakpoint setting device according to claim 2, wherein the specific source code editor is in the middle of a line to add a newline, and breakpoint setting device further comprises an update unit, when editing source code increases in the middle of a line When a line breaks, operational update in acquiring unit edit information stored, making more than a specified number of lines each line number plus one, and through to the specified line number plus a line number obtained is stored in the editing information in addition .
7.权利要求2的断点设定装置,其中,特定编辑是修改字符串而不对换行符进行任何修改。 Breakpoint setting device according to claim 2, wherein the specific editor to modify a string without any modification to the line breaks.
8.权利要求2的断点设定装置,其中,源代码可以用控制块构成,控制块又由多个行构成,获取单元另外存储表示每一控制块的边界的块边界信息,每一边界由一个行号指定,以及设定单元在目标代码中在相应于由块边界信息表示的每一控制块的第一行的位置设定断点。 Breakpoint setting apparatus of claim 2, wherein the source code can be used to control blocks, the control block in turn is composed of a plurality of rows, each acquisition unit additionally stores data representing the control block of the block border information boundaries, each boundary specified by a line number, and a setting section in the object code corresponding to the information represented by the block boundary for each position of the first row of the control block set breakpoint.
9.权利要求2的断点设定装置,其中,当在获取单元中存储的编辑信息包括多个连续的行号时,设定单元在目标代码中只在相应于该多个行号的第一行号的位置设定断点。 Breakpoint setting apparatus of claim 2, wherein, when the acquisition unit stored in the editing information comprises a plurality of consecutive line number setting unit only in the object code corresponding to the plurality of line numbers position line number set breakpoints.
10.权利要求1的断点设定装置,另外为由设定单元设定的每一断点产生错误页,并把所产生的错误页通过用户接口提交给用户,所述错误页包括用户输入的关于对源代码在相应于断点的部件进行的编辑的信息。 Breakpoint setting apparatus according to claim 1, additionally by setting each of the breakpoint setting unit generates an error page and the error page generated by the user interface presented to the user, the error page includes a user input Information about the editing of the source code corresponding to the components of the breakpoint.
11.权利要求10的断点设定装置,另外在产生错误页时,从调试程序获取由该调试程序解码和执行源代码被编辑部件的次数的计数,并且将该计数连同用户输入的信息一起提交给用户。 Breakpoint setting apparatus according to claim 10, additionally when an error page, acquired by the debugger program source code is decoded and executed number of counts of edited components from the debugger, and the count along with the information entered by the user together presented to the user.
12.权利要求1的断点设定装置,其中,获取单元仅当没有其它指定经受特定编辑的部件的编辑信息已被获取和存储时才存储指定该同一部件的编辑信息。 Breakpoint setting apparatus of claim 1, wherein the acquisition unit only when no other specified components subjected to a particular edit edit information has been acquired and stored when the edit information storing specified same member.
13.权利要求2的断点设定装置,其中,获取单元另外存储表示每一控制块的边界的块边界信息,每一边界由一个行号指定,并且设定单元在目标代码中只在相应于从每一控制块首行开始的第一特定编辑行的位置设定断点。 Breakpoint setting apparatus of claim 2, wherein the acquiring unit additionally stores data representing each control block boundary of the block border information, each of the boundary is specified by a line number, and the setting unit in the object code only in the corresponding in the first row from the first line of a particular edit each control block position began to set breakpoints.
14.一种断点设定方法,包括:加载相应于源代码产生的目标代码的加载步骤;存储表示组成源代码的每一部件和在目标代码中相应位置之间的关系的信息的存储步骤;当对源代码进行特定的编辑时,自动获取和存储指定经受特定编辑的部件的编辑信息的获取步骤;和自动在目标代码中在相应于由编辑信息指定的部件的位置设定断点的设定步骤。 14. A breakpoint setting method, comprising: loading object code corresponding to the source code generated by the loading step; storage step stores data representing the relationship between the composition of the source code of each member and the corresponding location in the object code of information between ; When a specific source code editing, automatic acquisition and storage designated withstand edit information specific to edit parts of the acquisition step; and automatically in the object code in the position corresponding to the specified component by editing information set breakpoints setting procedure.
15.在一种用于写和编辑可执行代码的计算机系统中,对自动断点设定装置所做的改进,该装置可以在编辑/调试操作期间被驱动,包括:一个存储单元,可操作存储预定数量要编辑的代码;一个显示单元,可操作显示至少一部分代码,以允许由程序员编辑该代码;一个获取单元,可操作监视对显示的代码的任何修改并自动获取和存储相对于初始存储的预定数量的代码的修改和修改位置;一个设定单元,响应获取单元,可操作在最后修改过的数量的代码中自动设定断点,指示所进行的修改,从而当程序员编辑存储的数量的代码时允许计算机系统自动提供预定数量代码的位置和修改的表示,而不需由程序员输入另外的命令。 15. In a computer system for writing and editing of executable code, the breakpoint setting the improvements made to the automatic apparatus, the apparatus may be driven in the editing / debugging during operation, comprising: a storage unit operable storing a predetermined code number to be edited; a display unit operable to display at least a part of the code, to allow the programmer to edit the code; an acquisition unit operable to monitor any changes to the code displayed automatically captured and stored with respect to the initial modifications and modify a predetermined number of the stored position code; a setting unit, in response acquisition unit operable in the final modified code number is automatically set breakpoints, indicating that the changes carried out, so that when the programmer to edit stored When the amount of code allows a computer system to automatically provide a predetermined number of positions and modify code representation without additional command input by a programmer.
16.权利要求15的断点设定装置,其中,存储单元存储表示源代码行和在目标代码中的相应位置之间关系的数据,并且当获取单元获取标识源代码中被修改的行的编辑信息时,设定单元在目标代码中在相应于源代码中一行的位置自动设定一个断点。 Breakpoint setting apparatus of claim 15, wherein the relationship between the data storage unit stores data representing source lines, and the corresponding location in the object code, and when the acquisition unit acquires the line identification source code editor modified When information setting unit in the object code corresponding to the location of the source code line automatically set a breakpoint.
17.权利要求16的断点设定装置,另外包括一个错误页产生器单元,可操作为由设定单元设定的每一断点产生一个错误页,并把产生的错误页通过用户接口提交给用户,错误页包括用户输入的关于对相应于每一设定的断点的源代码的行进行的编辑的信息。 Breakpoint setting apparatus of claim 16, further comprising an error page generator unit, each operable by the breakpoint setting unit sets generates an error page and the error page generated by a user interface to submit to the user, the user enters the wrong page contains information about editing the row corresponding to each set breakpoints in the source code of conduct.
Description  translated from Chinese
用于断点设定的装置和方法 Breakpoint setting apparatus and method for

本发明基于在日本提交的申请No.2002-31372,其内容结合在此作为参考。 The present invention is based on application No.2002-31372 filed in Japan, the contents of which are incorporated herein by reference.

技术领域 FIELD

本发明涉及用于程序开发的调试程序工具的断点设定功能的一种改进。 The present invention relates to an improved application development tool for debugging breakpoint setting function.

背景技术 BACKGROUND

调试程序是一类支持软件,用于发现和改正程序中的错误或故障。 Debugger is a class supports software program used to find and correct errors or failures. 调试程序提供例如在源代码的一定的点停止程序执行的功能,和输出在中断点变量中保持的值。 Debugger provides value at a certain point such as source code, stop program execution function, and the output remains in the break variables. 使程序的执行停止的点称为断点。 So stop program execution point called breakpoints.

断点由程序员在源代码中在要进行修改的点设定。 Breakpoints in the source code by the programmer to modify the point where you want to set. 大多数已知的调试程序允许程序员容易地在编辑器上显示的源代码中设定断点。 Most known debugger allows programmers to easily displayed on the editor's source code to set breakpoints. 在一个例子中,允许程序员在源代码中用鼠标点击在编辑器上显示的源代码中的任何一点设定断点。 In one example, allows a programmer in the source code using the mouse to click on the editor to display the source code to set breakpoints at any point. 设定的断点用在编辑器上显示的标记或其它符号指示。 Set a breakpoint on the editor's marks or other symbols displayed instructions.

更具体说,调试程序例如在程序中在相应于由程序员设定的断点的点处插入一条中断指令。 More specifically, for example, in the program debugger corresponding to the breakpoint set by the programmer at the point of insertion of an interrupt instruction. 其结果,控制在中断指令处传递给调试程序,使得可以在此时检查变量或堆栈。 As a result, control is passed to the interrupt instruction debugger makes it possible at this time to check the variable or stack. 为恢复在停止当时的处理,调试程序从程序中删除中断命令而使其回到原来的状态,使得程序重新起动。 In the stop time for recovery processing, the debugger removed from the program interrupt command and bring it back to its original state, so that the program is restarted.

如上所述,常规调试程序需要程序员在需要时设定断点,它给程序员增加了负担。 As mentioned above, the conventional debugger requires the programmer to set a breakpoint when needed, which increases the burden on the programmer. 例如,为在要进行修改的点设定断点,需要程序员为每一个要进行的改正设定断点,或在完成所有改正后为每一改正的点一次设定所有断点。 For example, at the point to be modified to set breakpoints, programmers need to be performed for each correct setting breakpoints, or after the completion of all the correct point for each correct time setting all breakpoints. 这两种过程都给程序员增加负担,因为前者需要程序员交替经历调试全过程和断点设定,而后者需要程序员记忆他所进行的全部修改。 Both processes give programmers a burden, because the former requires the programmer to debug alternately through the whole process and set breakpoints, while the latter requires the programmer to modify all the memories he carried.

发明内容 SUMMARY

鉴于上述限制,本发明的一个目的是提供一种断点设定装置,它能够设定断点而不需要程序员做任何具体的操作。 In view of the above limitations, an object of the present invention is to provide a breakpoint setting means, it is possible to set a breakpoint without requiring the programmer to make any particular operation.

为实现上述目的,本发明的断点设定装置包括:加载单元,可操作加载相应于源代码产生的目标代码;存储单元,可操作存储表示组成源代码的每一部件和在目标代码中的相应位置之间的关系的信息;获取单元,当对源代码进行特定的编辑时,可操作自动获取和存储指定经受特定编辑的部件的编辑信息;和设定单元,可操作自动在目标代码中在相应于由编辑信息指定的部件的位置处设定断点。 To achieve the above object, the present invention is the breakpoint setting apparatus comprising: a loading unit operable to load the corresponding object code from source code; a storage unit operable to store each of the components represents the source code and object code of the information on the relationship between the corresponding position; acquisition unit, when the source code editing specific, actionable automatically captures and stores the specified withstand edit information specific to edit parts; and setting unit operable automatically in the object code set a breakpoint at the location specified by the corresponding edit information components.

使用所述结构,该断点设定装置管理表示源代码中位置的信息,在这些位置处用户(也称为操作员或程序员)曾进行编辑。 Using the structure, the breakpoint setting device management information indicating the position of the source code, the user at these locations (also called an operator or programmer) has been edited. 通过信息的管理,断点设定装置决定源代码中曾经进行编辑的位置,并在每一位置设定断点。 Through the management of information, the breakpoint setting device determines the position in the source code once edited, and set a breakpoint at each location. 这消除了操作员为断点设定或为指定要设定断点的位置需要进行的操作。 This eliminates the need for the operator to set breakpoints or to specify the location of the breakpoint setting operation needs to be done.

这里,每一部件可以是组成源代码的一行,并且每一行可以由分配给它的行号唯一标识。 Here, each component may be a single line of the source code, and each line may be assigned to it by the line number that uniquely identifies. 存储单元可以存储源代码的每一行号和在目标代码中的相应位置之间的关系。 You can store the relationship between each source code line numbers and the corresponding position in the target code between the storage unit. 获取单元可以获取作为编辑信息的标识源代码中经受特定编辑的行的行号。 Acquisition unit can obtain information about the identity of a source code editor subjected to specific line number to edit.

此外,特定编辑可以是删除换行符。 In addition, specific editing may be deleted newline. 该断点设定装置可以另外包括一个更新单元,当编辑源代码删除一个换行符时,更新单元可操作更新在获取单元中存储的编辑信息,使得大于指定行号的每一行号减1。 The breakpoint setting apparatus may further include an update unit, when editing the source code to remove a newline, the update unit operable to update stored in acquiring unit edit information, making more than the specified line number for each line number minus one.

另外,断点设定装置可以另外包括一个更新单元,当编辑源代码在一行的行首增加一个换行符时,更新单元可操作更新在获取单元中存储的编辑信息,使得不小于标识被编辑的行的行号的每一行号加1。 In addition, the breakpoint setting means may additionally comprise an update unit, when editing source code in a row to increase the line when a line breaks, the updating unit operable to update stored in the acquisition unit editing information, so that the edited flag is not less than each line number plus line number 1.

另外,断点设定装置可以另外包括一个更新单元,当编辑源代码在一行的末尾增加一个换行符时,更新单元可操作更新在获取单元中存储的编辑信息,使得大于标识被编辑的行的行号的每一行号加1。 In addition, the breakpoint setting means may additionally comprise an updating unit, when the edit source code at the end of a line when a line feed is increased, the updating unit operable to update stored in the acquisition unit editing information, so that the row is greater than the identification being edited Each line number of the line number plus 1.

另外,特定编辑可以是在源代码的一行的中间增加一个换行符。 In addition, specific editing may be in the middle of a line of source code to add a line break. 断点设定装置可以另外包括一个更新单元,当编辑源代码在一行的中间增加一个换行符时,可操作更新在获取单元中存储的编辑信息,使得大于被指定的行号的每一行号加1,并且通过给指定的行号加1获得的行号另外存储在编辑信息中。 Breakpoint setting device may further include an update unit, when editing the source code in the middle of a line to add a newline, the operational update in acquiring unit edit information stored, making more than the specified number of lines each line number plus 1, and through to the specified line number plus a line number to obtain additional information stored in the editing.

另外,特定的编辑可以是修改字符串而对换行符不做任何修改。 In addition, a specific string editing can be modified while the line breaks without any modification.

使用所述构造,断点设定装置总是决定源代码中曾经进行编辑的位置,甚至在编辑包括删除换行符、或在一行的行首、中间、或末尾增加换行符,使得组成源代码的行增加或减少的场合。 Using the structure, the breakpoint setting means always determine the source code editing position once, even in the editing includes deleting line breaks, or in the first row of the row, middle, or end of a line break, so that the composition of the source code lines to increase or decrease the occasion. 结果,断点设定装置在适当的位置设定断点而不需为断点设定或指定要设定断点的位置采取专门的用户操作。 As a result, the breakpoint setting means sets a breakpoint in place without the need for setting breakpoints or specify the location you want to set a breakpoint to take specific user actions.

另外,源代码可以用控制块构成,控制块由多个行构成。 In addition, the source code can be used to control blocks, the control block is composed of a plurality of rows. 获取单元可以另外存储表示每一控制块的边界的块边界信息,每一边界由一个行号指定。 Acquisition unit may further store information indicating for each block boundary information control block boundaries, each boundary is specified by a line number. 设定单元可以在目标代码中在相应于由块边界信息表示的每一控制块的第一行的位置设定断点。 The setting unit in the object code corresponding to the location indicated by the block boundary information for each of the first row of the control blocks is set breakpoint.

使用所述构造,断点设定装置只在每一控制块中首次出现的编辑的行设定断点。 Using the structure, line editing breakpoint setting means only the first occurrence of each control block set breakpoints.

另外,当在获取单元中存储的编辑信息包括多个连续的行号时,设定单元可以只在目标代码中在相应于该多个行号的第一行号的位置设定断点。 Further, when the acquiring unit stored in the editing information comprises a plurality of consecutive line number setting unit may only set a breakpoint in the object code corresponding to the plurality of line numbers of the first line number of the location.

使用所述构造,当在源代码有多于两个的连续行曾被编辑时,断点设定装置只在该连续被编辑的行的第一行设定断点。 Using the structure, when the source code has been more than two consecutive lines editing, breakpoint setting means only the first line of the continuous line being edited set breakpoints.

另外,断点设定装置可以另外为由设定单元设定的每一断点产生错误页,并把所产生的错误页通过用户接口提交给用户。 In addition, the breakpoint setting device can additionally be set by each breakpoint setting unit generates an error page and the resulting error page presented to the user via the user interface. 该错误页包括用户输入的关于对源代码在相应于断点的部件进行的编辑的信息。 The error page includes information entered by the user on editing the source code corresponding to the components of the breakpoint.

使用所述构造,断点设定装置管理表示源代码中用户曾经进行编辑的位置的信息。 Using the structure, the breakpoint setting device management, said the source code location information the user has edited. 通过管理该信息,断点设定装置决定源代码中曾经进行编辑的位置,并在每一位置设定一个断点。 By managing the information, the breakpoint setting means has decided to edit the source code of the position, and set a breakpoint at each position. 另外,断点设定装置为每一断点产生一个错误页。 In addition, for each breakpoint breakpoint setting device generates an error page. 这消除了操作员产生错误页的需要,从而减少给操作员施加的负担。 This eliminates the need for the operator to generate an error page, thereby reducing the burden imposed by the operator.

附图说明 Brief Description

从下面对本发明的说明,结合附图,本发明的这些以及其它目的、优点和特征将十分显然,附图表示本发明的具体实施例。 From the following description of the invention, the accompanying drawings, these and other objects, advantages and features of the invention will be very apparent, the drawings showing a specific embodiment of the present invention.

附图中:图1是根据本发明的一个实施例1的调试装置的方框图;图2是一个视图,表示由断点显示器109显示的断点的一个例子;图3是一个视图,表示一个被编辑的行表的例子;图4是一个流程图,表示响应由命令输入单元102接收的编辑命令执行的处理;图5是一个流程图,表示响应由命令输入单元102接收的调试开始命令执行的处理;图6是一个流程图,表示响应由命令输入单元102接收的调试结束命令执行的处理;图7是根据本发明的一个实施例2的调试装置20的方框图;图8是一个视图,表示由调试装置20产生和使用的转移-目的地行表的一个例子;图9是一个流程图,表示响应由命令输入单元102接收的调试开始命令执行的处理;图10是一个流程图,表示在步骤S805为产生转移-目的地行表执行的详细的处理;图11A是一个流程图,表示在步骤S908执行的字分析的细节;图11B是表示分类成组1-6的字;图12是根据本发明的一个实施例3的调试装置30的方框图;图13是表示错误页表的一个例子的视图;图14是一个流程图,表示响应由命令输入单元102接收的调试结束命令执行的处理;图15是一个流程图,表示响应由命令输入单元102接收的调试开始命令执行的处理;图16是一个流程图,表示响应由命令输入单元102接收的断点设定命令执行的处理;图17是一个流程图,表示响应由命令输入单元102接收的断点禁止命令执行的处理;图18是一个流程图,详细表示错误页关闭处理;图19是表示一个程序的例子的视图;图20是一个视图,表示源代码分成字的例子。 In the drawings: FIG. 1 is a block diagram of a debugging device according to one embodiment of the present invention; FIG. 2 is a view showing an example of a breakpoint breakpoint display 109 by the display; Figure 3 is a view showing an Examples of the editing table row; FIG. 4 is a flowchart showing response processing command received by the input unit 102 editing commands executed; FIG. 5 is a flowchart showing response to receiving a command input unit 102 by the execution of the debug start command processing; FIG. 6 is a flowchart showing the response received by the command input unit 102 terminates the processing of the debug command; Figure 7 is a block diagram of fitting apparatus 20 of the embodiment 2 in accordance with one embodiment of the present invention; FIG. 8 is a view showing transfer generated and used by the debug unit 20 - an example of a destination row of the table; Fig. 9 is a flowchart showing processing in response to a command received by the input unit 102 debug start command execution; Figure 10 is a flow chart illustrating the To generate the transfer step S805 - the destination row of the table of the detailed implementation of the processing; FIG. 11A is a flowchart showing details of the word analysis performed in step S908; Fig. 11B is classified into groups 1-6 of the word; FIG. 12 is Example 3 a block diagram of fitting apparatus 30 according to an embodiment of the present invention; FIG. 13 is a diagram showing an example of the error page table view; FIG. 14 is a flowchart showing a command response received by the input unit 102 terminates the processing of the debug command execution ; FIG. 15 is a flowchart showing response processing command received by the input unit 102 debug start command execution; FIG. 16 is a flowchart showing the response to the command input unit 102 receives a breakpoint setting process of command execution; Figure 17 is a flowchart showing the response unit 102 receives a command entered by the inhibition processing command execution breakpoint; FIG. 18 is a flow chart showing in detail an error page close processing; FIG. 19 is a view of an example of a program; Fig. 20 is a view showing an example of the source code into words.

具体实施方式 DETAILED DESCRIPTION

实施例1以下,结合附图,对根据本发明的实施例1的调试装置进行说明。 Example 1 Hereinafter, the accompanying drawings, according to embodiments of the present invention to debug apparatus 1 will be described.

图1是一个方框图,表示实施例1的调试装置10。 Figure 1 is a block diagram showing an example of the debugging apparatus 10 embodiment.

在该图中,调试装置10包括一个命令输入单元102,用于接收由操作员外部输入的命令;一个用于分析该命令的命令分析单元103;一个用于执行制作处理的制作单元(make unit)11;一个用于执行调试处理的调试单元12;和一个用于执行编辑的编辑单元13。 In this figure, the fitting apparatus 10 includes a command input unit 102, for receiving commands from an external input by the operator; analyzes the command of a command analyzing unit 103 is used; a production unit creation processing executed (make unit for ) 11; a process for performing debug debug unit 12; and editing unit for 13 executive editor.

制作单元11包括一个可执行文件管理器104,用于产生和存储一个可执行文件的最新版本。 Production unit 11 includes an executable file manager 104 for generating and storing the latest version of an executable file.

调试单元12包括一个加载器105,用于加载可执行文件的最新版本,一个断点设定/禁止子单元106,用于设定和禁止断点,一个执行控制器107,用于控制可执行文件的执行,一个源代码显示器108,用于例如在显示器屏幕上显示源代码,一个断点显示器109,用于显示指示在源代码中设定断点的地方的标记,一个中断指令处理器110,用于当程序的执行到在断点处停止时执行预定处理,一个断点表管理器111,用于存储关于当前设定的断点的信息,和一个设定子单元116,用于在源代码中进行过某些编辑的点亦即进行修改、增加、删除的点处自动设定断点。 Debug unit 12 comprises a loader 105 for loading the latest version of the executable file, a breakpoint setting / inhibition subunit 106, for setting and disabling the breakpoint, an execution controller 107 for controlling the executable executable file, a source code display 108 for example, to display the source code on the display screen, a breakpoint display 109 for displaying the flag indicates the set breakpoints in the source code places an interrupt instruction processor 110 , for when the program is executed to stop executing the predetermined processing at a breakpoint, a breakpoint table manager 111, for storing information about the current setting of breakpoints, and a setting sub-unit 116, for been some source code editing point that is to be modified to increase, at the point deleted automatically set breakpoints. 以下,由操作员进行的对源代码的改变,亦即更改、增加或删除源代码,称为对源代码的编辑或修改。 Below, by the operator of the source code change, that change, add, or delete the source code, known as source code editing or modification.

编辑单元13包括一个源代码编辑器112,用于根据由操作员输入的编辑命令编辑源代码,一个被编辑的行表管理器115,用于存储源代码的文件名和编辑所进行的行的行号,一个源代码显示器113,用于例如在显示器屏幕上显示读出的源代码,和一个源代码文件管理器114,用于存储源代码文件。 Editing unit 13 includes a source code editor 112 for input by the operator in accordance with editing commands to edit the source code, a row of the table being edited manager 115 for row storage source code file name and line editing conducted number, a source code display 113, for example, displayed on a display screen is read out of the source code, and a source code file manager 114 for storing the source code files.

这里,下面的一点可以适用,即分别包括在编辑单元13和调试单元12中的源代码显示器108和源代码显示器113可以是作为两者共用的同一个。 Here, it can be applied to the following, which were included in the editing unit 13 and the debug unit 12 displays the source code and source code 108 display 113 may be the same as the two shared.

命令输入单元102从操作员接收命令,诸如“打开编辑文件命令”、“保存编辑文件命令”、“编辑命令”、“调试开始命令”、“断点设定命令”、“断点禁止命令”、“程序执行命令”、和“调试结束命令”。 Command input unit 102 receives commands from the operator, such as "command to open the Edit File", "Save the edited file commands", "Edit command", "debug start command," "breakpoint setting command," "breakpoint disable command." "execution order", and "Debug end command." 注意,为显示处理和有关的设定的命令对本发明不特别相关,因此省略对它们的说明。 Note that, for the display processing and setting commands related to the present invention is not particularly relevant, so the description thereof is omitted.

命令分析单元103分析由命令输入单元102接收的命令,并根据该分析控制每一单元和部件,以便该命令被执行。 Command analysis unit 103 analysis unit 102 receives commands from the command input, and control each unit and components based on the analysis, so that the command is executed.

以下,首先说明常规已知的命令:“打开编辑文件命令”、“保存编辑文件命令”、“断点设定命令”、“断点禁止命令”、和“程序执行命令”。 Below, the first known description of the conventional command: "Open the Edit File command", "Save the edited file commands," "breakpoint setting command," "breakpoint disable command," and "execution order." 因为这些命令是现有技术的一部分,因此只简要说明,不给出附图。 Because these commands are part of the prior art, so only a brief description, the drawings will not be given. 参考附图说明“编辑命令”、“调试开始命令”、和“调试结束命令”,它们是本发明的特征所在的命令。 Reference to the drawings "editing commands," "Debugging start command", and the command "debug end command," which is a feature of the invention resides.

<打开编辑文件命令> & Lt; open the Edit File command & gt;

步骤11:命令输入单元102从操作员接收一个打开编辑文件命令,该命令指定要编辑的源代码文件的名字。 Step 11: The command input unit 102 receives an open command from the operator to edit the file, specify the name of the command you want to edit the source code files.

步骤12:源代码编辑器112请求源代码文件管理器114在指定的文件中读源代码。 Step 12: 112 requests source code editor source code file manager 114 reads the source code in the specified file.

步骤13:源代码文件管理器114从存储源代码文件的记录介质中读请求的源代码,并传送读取的源代码给源代码编辑器112。 Step 13: The source code file manager 114 from the recording medium for storing the source code files in a read request source code and send it to read the source code to the source code editor 112.

步骤14:源代码编辑器112请求源代码显示器113显示读取的源代码。 Step 14: The source code editor 112 requests to read the source code display 113 displays the source code.

步骤15:源代码显示器113在显示器屏幕上显示请求的源代码。 Step 15: The source code display 113 displays the source code of the request on the display screen.

<保存编辑文件命令> & Lt; Save the edited file command & gt;

步骤31:命令输入单元102从操作员接收一个保存编辑文件命令,该命令指定要保存的源代码文件的名字。 Step 31: The command input unit 102 receives a save from the operator to edit the file command, which specifies the name you want to save the source code files.

步骤32:源代码编辑器112请求源代码文件管理器114保存相应于指定文件名的源代码。 Step 32: 112 requests source code editor source code file manager 114 corresponding to the specified file name to save the source code.

步骤33:源代码文件管理器114在记录介质中写请求的源代码。 Step 33: the source code file manager 114 requests write source code in a recording medium.

<断点设定命令> & Lt; breakpoint setting command & gt;

步骤51:命令输入单元102从操作员接收一个断点设定命令,该命令指定源代码文件的名字和要设定断点的地方的行号。 Step 51: The command input unit 102 receives a command from the operator to set a breakpoint, the command to specify the source code file name and where you want to set a breakpoint line number. 更具体说,操作员通过用鼠标指点器指向在屏幕上显示的源代码的任何行并点击鼠标输入断点设定命令。 More specifically, the operator by pointing with the mouse pointer on the screen in any line of source code and click the mouse to enter a breakpoint setting command. 作为响应,命令输入单元102接收指定行号和正被显示的源代码的文件名的断点设定命令。 In response, a command input unit 102 receives the specified line number being displayed and the source code file name breakpoint setting command.

步骤52:加载器105请求断点设定/禁止子单元106按照指定设定一个断点。 Step 52: loader 105 requests the breakpoint setting / disabling sub unit 106 according to a specified set a breakpoint.

步骤53:断点设定/禁止子单元106参考已经加载的可执行文件中的调试信息,以便获取表示在可执行文件中要设定断点的地方的地址。 Step 53: breakpoint setting / disabling sub unit 106 reference executable file already loaded in the debugging information in order to obtain the address shown in the executable file you want to set a breakpoint in place.

步骤54:断点设定/禁止子单元106请求断点表管理器111在断点表中记录这样获取的地址和在可执行文件中在该地址处的指令。 Step 54: breakpoint setting / disabling sub unit 106 requests the breakpoint table manager 111 records the address of such acquisition and instruction at the address in the executable file in the breakpoint table.

断点表由地址列和指令列组成,所述地址列用于存储指示在可执行文件中设定断点的地方的每一地址,指令列用于临时存储驻留在地址列中存储的地址处的每一条指令。 Breakpoint instruction table consists of columns and columns address, the address is listed for each of the addresses stored in the instruction set breakpoints where the executable file, the command line is used to temporarily store resides stored in the address column address at each instruction. 另外,每一地址和相应的指令以升序排列。 Further, each of the address and the corresponding instruction in ascending order.

步骤55:断点设定/禁止子单元106请求源代码显示器108以反映当前执行的命令处理的方式显示具有断点的源代码。 Step 55: breakpoint setting / disabling sub unit 106 requests the source code display 108 to reflect the way the command displays the currently executing process breakpoint source code.

步骤S56:断点表管理器111在断点表中记录由断点设定/禁止子单元106请求的地址连同相应的指令。 Step S56: Breakpoint Table Manager 111 recording from a breakpoint set / disable address sub-unit 106 requests together with the corresponding instruction at the breakpoint table. 接着,断点表管理器111修改源代码,使得驻留在该地址处的指令用一条中断指令代替。 Then, the breakpoint table manager 111 to modify the source code, so that the instruction resides in the address instead of using an interrupt instruction.

步骤57:源代码显示器108从源代码管理器114中读取请求显示的源代码文件,并显示源代码。 Step 57: The source code display 108 read from the source code manager 114 requests to display the source code file and displays the source code. 另外,源代码显示器108请求断点显示器109显示在该指定文件中当前设定的断点。 In addition, the source code display 108 is displayed in the display 109 requesting the breakpoint specified file currently set breakpoint.

步骤58:断点显示器109从断点表管理器111中读取用于指定的源代码文件的断点表并根据该断点表显示断点。 Step 58: Breakpoints display reads 109 breakpoint table is used to specify the source code files from the breakpoint table manager 111 and displays breakpoints as the breakpoint table.

作为一个例子,图2表示由断点显示器109显示的断点。 As an example, Figure 2 shows a breakpoint breakpoint display 109 by the display.

如图所示,在编辑前的源代码中读为“j=500”的行被改变为“j=10”,增加读为“printf(“i=%d”,i):”,“printf(“next_i=%d”,i+1);”,和“printf(“continue¥n”);”。 As shown, the reading before editing the source code for the "j = 500" line is changed to "j = 10", increase read as "printf (" i =% d ", i):", "printf ("next_i =% d", i + 1); ", and" printf ("continue n"); ". 其结果,在编辑后的源代码中,表示断点的黑点在读为“j=10”的行的左边显示,并在读为“printf(“i=%d”,i):”的行的左边显示。 As a result, after editing the source code to indicate breakpoints black dot in the left line read as "j = 10" display and read as "printf (" i =% d ", i):" The line displayed on the left.

<断点禁止命令> & Lt; breakpoint disable command & gt;

步骤61:命令输入单元102从操作员接收一个断点禁止命令,该命令指定要由源代码文件的名字和行号禁止的断点。 Step 61: The command input unit 102 receives a breakpoint disable command from the operator, the command to specify banned by name and line number in the source code files breakpoints. 更具体说,操作员通过用鼠标指点器指向在屏幕上显示的源代码的一行设定的任何断点并点击鼠标而输入断点禁止命令。 More specifically, the operator by using the mouse pointer to point at any breakpoint line displayed on the screen of the source code and click the mouse to set a breakpoint disable command input. 作为响应,命令输入单元102接收该断点禁止命令,禁止在该行设定的断点。 In response, the command input unit receives the breakpoint disable command 102, prohibits the bank to set breakpoints.

步骤62:加载器105请求断点设定/禁止子单元106禁止该断点。 Step 62: loader 105 requests the breakpoint setting / disabling sub unit 106 disables the breakpoint.

步骤63:断点设定/禁止子单元106参考已经加载的可执行文件中的调试信息,以便获取表示在可执行文件中指定断点驻留的地方的地址。 Step 63: breakpoint setting / disabling sub unit 106 reference executable file already loaded in the debugging information in order to obtain an indication that the address where the breakpoint resides in the executable file. 然后断点设定/禁止子单元106请求断点表管理器111从断点表中删除要被禁止的断点的地址,连同相应指令。 Then breakpoint setting / disabling sub unit 106 requests deletion breakpoints table manager 111 to be banned from the breakpoint address breakpoint table, together with the corresponding instructions. 另外,断点设定/禁止子单元106请求源代码显示器108以反映当前执行的命令处理的方式显示带有断点的源代码。 In addition, the breakpoint setting / disabling sub unit 106 requests the source code display 108 to reflect the way the command displays the currently executing processing source code with breakpoints.

步骤64:断点表管理器111修改可执行文件,使得曾由中断指令代替的指令恢复回到原来的位置,然后从断点表中删除该地址和指令。 Step 64: Breakpoint table manager 111 to modify an executable file so that the instruction has been replaced by an interrupt instruction to revert back to its original position, and then delete the address and instructions from the breakpoint table.

步骤65:源代码显示器108从在源代码文件管理器114中的记录介质中读取请求的源代码文件,并显示这样读取的源代码文件。 Step 65: The source code to read the source code files display 108 requests from the source code file manager 114 in a recording medium, and displays the source code files so read. 然后源代码显示器108请求断点显示器109显示在指定的源代码文件中当前设定的断点。 Then the source code display monitor 109 108 requests a breakpoint is displayed in the specified source file is currently set breakpoints.

步骤66:断点显示器109从断点表管理器111中读取断点表并根据该断点表显示断点。 Step 66: Breakpoints display reads 109 breakpoint from the breakpoint table management table 111 and displayed according to the breakpoint breakpoint table.

<程序执行命令> & Lt; program execution command & gt;

步骤71:命令输入单元102从操作员接收程序执行命令,以便调试装置10执行可执行文件。 Step 71: Run the command input unit 102 receives the program from the operator in order to debug device 10 executes the executable file.

步骤72:加载器105请求执行控制器107执行可执行文件。 Step 72: loader 105 requests execution controller 107 executes the executable file.

步骤73:执行控制器107逐条指令地解释可执行文件以执行。 Step 73: instruction by instruction execution controller 107 to explain the executable file to execute. 当碰到中断指令时,执行控制器107停止执行,请求中断指令处理器110执行该中断指令。 When it comes to interrupt instruction execution controller 107 stops execution request interrupt instruction processor 110 executes the interrupt instruction. 接着,执行控制器107请求源代码显示器108显示相应于执行被停止的地方的一部分源代码。 Subsequently, the execution controller 107 requests the display 108 displays the source code corresponding to the place where execution was stopped part of the source code.

步骤74:中断指令处理器110从断点表管理器111中取最初位于停止执行的地方的地址处的指令,并把取得的指令传送给执行控制器107,作为当程序重新起动时的第一条要执行的指令。 Step 74: Interrupt instruction processor 110 stops executing instruction fetch originally located at the address where the breakpoint table manager 111, and transfers made to execute an instruction controller 107, first as the time when the program is restarted of instructions to be executed.

步骤75:源代码显示器108从源代码文件管理器114中读取请求的源代码文件以显示。 Step 75: The source code files from the source code displays the source code file manager 108 114 read requests to display. 然后,断点显示器109为指定的源代码文件读取断点表,并显示分别表示在源代码中相应位置处的断点的标记。 Then, the breakpoint display 109 for the specified breakpoint table to read the source code files, and display marks respectively breakpoint location in the source code accordingly.

现在,在说明具有本发明的特征的命令前说明一个被编辑的行表。 Now, before the description of the present invention is characterized by having a description of an edit command line table.

图3是表示该被编辑的行表的一个例子的视图。 Figure 3 shows an example of the row of the table being edited view.

被编辑的行表是一个行号表,每一行号相应于源代码中操作员曾经进行编辑的一行。 Edited row table is a line number table, each row of numbers corresponding to the source code, the operator had to edit the line. 这样,在该表中存储的行号是要设定断点的地方。 Thus, this table is stored in the line number where the breakpoint is to be set. 在该表中,行号以升序排列,没有重号。 In this table, the line numbers in ascending order, no heavy numbers. 该表为每一源代码文件单独产生和存储。 The table for each source code file generated and stored separately.

现在,说明“编辑命令”、“调试开始命令”和“调试结束命令”。 Now, that "editing commands," "Debugging start command" and "Debug end command."

<编辑命令> & Lt; editing commands & gt;

图4是一个流程图,表示响应由命令输入单元102接收的编辑命令执行的处理。 Figure 4 is a flowchart showing response processing unit 102 receives a command entered by the edit command execution. 当源代码文件正由一个打开编辑文件命令显示时编辑命令有效。 When the source code file being edited by an Open File command to display when editing commands.

步骤S301:源代码编辑器112判断调试是否已经结束。 Step S301: the source code editor 112 determines whether debugging has ended.

步骤S302:当在步骤S301判定调试尚未结束时,源代码编辑器112给命令输入单元102发布一个“调试结束命令”,使得调试结束。 Step S302: When debugging determination in step S301 is not over yet, the source code editor to the command input unit 102 112 issued a "Debug end command", making debugging end.

步骤S303:源代码编辑器112判断请求进行的编辑是删除还是增加一个换行符。 Step S303: the source code editor 112 determines that the request is to delete or editors to add a line break. 删除一个换行符不仅指单独删除一个换行符,而且指涉及删除一个换行符的任何编辑。 Deleting a single newline character refers not only to remove the line breaks, but any editor to remove a newline involved. 另外,增加一个换行符不仅指单独增加一个换行符,而且指涉及增加一个换行符的任何编辑。 Also, add a newline character refers not only to add a single line breaks, but any editing involves adding a newline. 自然,有不是上述编辑中任何一个的编辑,它们是任何不删除和增加换行符而可以进行的编辑。 Naturally, there is not any one of the above-described edit editing, they are not deleted and any line break and can be edited.

步骤S304:当编辑与换行符不相干时,源代码编辑器112只在被编辑的行表中记录相应于请求进行编辑的行的行号。 Step S304: When editing and line breaks irrelevant, source code editor 112 records corresponding to the request for editing the line number in the edited rows in the table.

步骤S305:当编辑是删除一个换行符时,源代码编辑器112首先在被编辑的行表中记录相应于要进行编辑的行的行号,然后修改被编辑的行表,使得大于新记录的行号的每一行号减1。 Step S305: When editing is to delete a line break, the source code editor 112 first record to be edited in the corresponding row of the table you want to edit the line number, and then modify the edited row of the table, making a new record of more than Each line number line number minus one.

步骤S306:当编辑是在一行的行首增加一个换行符时,源代码编辑器112修改被编辑的行表,使得不小于所请求的行号(亦即相应于请求被编辑的行的行号)的每一行号加1。 Step S306: When editing is the first to add a line break in the line of the line, the source code editor to modify the edited 112 rows in the table, so that no less than the requested line number (ie corresponding to the request line is edited line number ) of each line number plus one.

步骤S307:当编辑是在一行的末尾增加一个换行符时,源代码编辑器112修改被编辑的行表,使得大于所请求的行号的每一行号加1。 Step S307: When editing is to add a newline at the end of a line, the source code editor to modify the edited 112 rows in the table, so that the line is greater than the requested number of each line number plus one.

步骤S308:当编辑是在一行的中间某处,亦即既不在该行的行首也不在末尾增加一个换行符时,源代码编辑器112修改被编辑的行表,使得大于所请求的行号的每一行号加1。 Step S308: When editing is somewhere in the middle of a line, that is neither the end nor the beginning of the line to add a line break in the line, the source code editor to modify the edited 112 rows in the table, so that the line number is greater than the requested Each line number plus one. 另外,源代码编辑器112在该被编辑的行表中记录所请求的行号和由所请求的行号加1得到的另一行号。 In addition, the source code editor 112 rows number plus one other line number was requested by the line number and requested to be edited in the rows in the table.

步骤S309:源代码编辑器112使对被显示的源代码进行请求的编辑,然后请求源代码显示器108更新源代码的显示。 Step S309: the source code editor 112 is displayed on the source code editing request, then the request to update the source code display 108 displays the source code.

步骤S310:源代码显示器108相应于进行的编辑更新源代码的显示。 Step S310: the source code editor updates the display 108 corresponding to the display of the source code.

以上述方式,源代码编辑器112在被编辑的行表中记录被编辑的行的行号,从而管理源代码中进行编辑的位置。 The manner described above, the source code editor 112 records were edited line number of rows in the table being edited, so the position of managing editor for source code conduct.

在本实施例中,一直监视对源代码的编辑,以便在每次进行编辑时更新被编辑的行表。 In the present embodiment, the source code has been monitoring editor, to update the rows of the table being edited at each editing. 不过,本发明不限于此,它可以适用于在所有编辑进行后通过比较编辑前的源代码和编辑后的源代码而产生一个被编辑的行表。 However, the present invention is not limited, it can be applied in all source code editors and editing by comparing before editing the source code generated after a row in the table being edited.

<调试开始命令> & Lt; debug start command & gt;

图5是一个流程图,表示响应由命令输入单元102接收的调试开始命令执行的处理。 Figure 5 is a flowchart showing response processing unit 102 is received by command input debug command execution begins. 注意,虽然在图5中省略,但是在步骤S400前要执行下面的步骤S41-S43。 Note that although omitted in Figure 5, but in step S400 to perform the following steps before S41-S43.

步骤S41:当有一个源代码当前正被编辑时,加载器105发布一个保存编辑文件命令保存该源代码。 Step S41: When there is a source code is currently being edited, the loader 105 issued a command to save the edited file to save the source code. 然后加载器105请求可执行文件管理器104读可执行文件的最新版本。 Then load 105 requests executable file manager 104 reads the latest version of the executable file.

步骤S42:可执行文件管理器104参考源代码管理器114查找该源代码文件的日期和时间,以便判断是否存在一个源代码文件,它在该可执行文件的最新版本产生之后产生或修改。 Step S42: Executable File Manager 104 114 Reference source code manager to find the date and time of the source code files, in order to determine whether there is a source code file, it is created or modified after the latest version of the executable file generation.

步骤S43:当在步骤S42判定,存在这样的源代码文件时,可执行文件管理器104编译该源代码以产生该可执行文件的最新版本,并把如此产生的可执行文件传送给加载器105。 Step S43: When it is determined in step S42, there is a source code file, the executable file manager 104 to compile the source code to produce the latest version of the executable file and the executable file transfer thus generated to the loader 105 .

另一方面,当在步骤S42判定,不存在这样的源代码文件时,可执行文件管理器104把一个在现有可执行文件中间是最新版本的一个可执行文件传送给加载器105。 On the other hand, when the determination at step S42, there is no such source code files, executable file manager 104 in the middle of an existing transmitting the latest version of the executable file is an executable file to loader 105.

步骤S400:加载器105加载传送来的可执行文件,并请求设定子单元116在该可执行文件中在相应于列在被编辑的行表中的行号的每一行设定一个断点。 Step S400: loader 105 loads transferred to the executable file and set the sub-unit 116 requests in the executable file corresponding to the columns in the edited line number of rows in the table for each row to set a breakpoint.

步骤S401:设定子单元116判断被编辑的行表管理器115是否包括尚未读取的被编辑的行表。 Step S401: set the sub-unit 116 determines that the edited row table manager 115 includes a row of the table is not yet read is edited.

步骤S402:当判定存在这样的被编辑的行表时,设定子单元116读该被编辑的行表。 Step S402: when it is determined there is a row of the table being edited, setting sub unit 116 reads the row of the table being edited.

步骤S403:设定子单元116判断所读取的被编辑的行表是否包括至少一个行号。 Step S403: set the sub-row of the table the read unit 116 determines whether the edited includes at least one line number.

步骤S404:当判定存在至少一个行号时,设定子单元116选择列在被编辑的行号表的首行行号作为目标。 Step S404: when it is determined there is at least one line number, setting sub-unit 116 selects a column to be edited in the first line number of the line number table as the target. 设定子单元116发布一个断点设定命令,使得在源代码中在由该目标行号指定的行处设定断点。 Setting sub unit 116 is set to release a breakpoint command, so that the source code in the target specified by setting a breakpoint at line line number.

步骤S405:设定子单元116从首行逐个检查列在被编辑的行表中的每一个行号以便判断是否尚有未被选择作为目标的行号。 Step S405: setting sub unit 116 one by one from the first line to be edited in the check column in each row of the table in order to determine whether there are line numbers is not selected as the target line number.

步骤S406:当判定存在尚未被选择的行号时,设定子单元116选择跟随当前目标行号的一个行号作为下一目标。 Step S406: when it is determined there is no more selected line number, setting sub-unit 116 selects a line number following the current line number of the target as the next target.

步骤S407:设定子单元116发布一个断点设定命令,使得在源代码中在由该目标行号指定的行处设定断点。 Step S407: setting subunit 116 issues a command to set a breakpoint, so that in the source code in the target specified by setting a breakpoint at line line number.

步骤S408:当在每一被编辑的行上完成断点设定时,设定子单元116从被编辑的行表管理器115中删除该被编辑的行表。 Step S408: When finished setting a breakpoint on the line each being edited, set the sub-unit 116 to delete the rows in the table to be edited from the edited row table manager 115.

以上述方式,设定子单元116顺序发布断点设定命令,指定列在被编辑的行号表中的每一行号,使得断点设定/禁止子单元106在相应于被指定的行号的行上设定断点。 In the above manner, setting release sub-unit 116 sequentially breakpoint setting command, the designated column in the line number to be edited in the table for each line number, so that the breakpoint setting / inhibition subunit 106 corresponding to the specified line number in set a breakpoint on the line.

在上面的说明中,在预定处理后删除被编辑的行表。 In the above description, after a predetermined processing has been edited to delete rows of a table. 反之,下面的方式也适用,即紧在根据在处理调试结束命令中的断点表产生一个被编辑的行表之前删除该断点表的不必要的部分。 Conversely, the following also apply that to produce a tightly edited in a row in the table based on the processing end command debug breakpoint table before deleting the unnecessary parts of the breakpoint table.

<调试结束命令> & Lt; debugging end command & gt;

图6是一个流程图,表示响应由命令输入单元102接收的一个调试结束命令而执行的处理。 Figure 6 is a flowchart showing the response received by the command input unit 102 performs a debugging process end command.

步骤S501:加载器105请求被编辑的行表管理器115根据在断点表管理器111中存储的断点表产生一个被编辑的行表。 Step S501: 105 requests loader is edited row table manager 115 according to generate an editable table rows in the table at the breakpoint manager 111 stored in the breakpoint table. 作为响应,被编辑的行表管理器115参考在加载的可执行文件中的调试信息以便变换在断点表中列出的每一断点的地址为一个文件名和相应于该断点的一个行号。 In response, the edited row table manager 115 reference debugging information in the loaded executable file to transform each breakpoint address listed in the breakpoint table for a file name and corresponding to the breakpoint of a row number. 然后被编辑的行表管理器115为每一文件产生一个被编辑的行表。 Is then edited row table manager 115 generates a file for each row of the table being edited.

步骤S502:加载器105请求断点表管理器111删除该断点表,以使断点表管理器111删除该断点表。 Step S502: loader 105 requests the breakpoint table manager 111 to remove the breakpoint table so that the breakpoint table manager 111 deletes the breakpoint table.

步骤S503:加载器105卸载可执行文件。 Step S503: 105 uninstall executable file loader.

使用上述安排,不再需要程序员在他曾经进行过某些编辑的行上设定断点。 Use the above arrangements, no longer need a programmer he had been on some editorial line set breakpoints. 其结果,程序员从断点设定这种繁琐的过程中解脱出来,使得以高效率进行调试。 As a result, programmers from this tedious process breakpoint set freed, making debugging with high efficiency. 另外,当由程序员手工设定断点时,程序员有可能未在他所进行过编辑的每一行上设定断点。 In addition, when the programmer manually set breakpoints, programmers may not set a breakpoint on his been edited for each row. 相反,由调试装置10设定断点保证在所有编辑过的行上设定断点,使得程序的执行在每一必要的点处被检查。 Instead, guaranteed by setting breakpoints device 10 set breakpoints on all edited line, making the implementation of the program needed to be checked at each point.

实施例2图7是一个方框图,表示根据本发明的实施例2的调试装置20。 Example 2 Figure 7 is a block diagram showing debugging apparatus 20 according to an embodiment 2 of the present invention.

在该图中,调试装置20在调试装置10的部件外另外包括一个分割/优化子单元617。 In the figure, the debug unit 20 in the outer member fitting apparatus 10 further includes a segmentation / optimization sub-unit 617. 以下,主要对不同的地方进行说明,省略与调试装置10相似的构造的说明。 Hereinafter, mainly different places will be described below, omitting description of similar construction and debugging apparatus 10.

图9是一个流程图,表示响应由命令输入单元102接收的调试开始命令执行的处理。 Figure 9 is a flowchart showing response processing unit 102 is received by command input debug command execution begins.

注意,虽然在图9中省略,但是在步骤S800之前执行上面参考图5说明的步骤S41-S43。 Note that, although omitted in FIG. 9, but the steps described above with reference to FIG. 5 of S41-S43 prior to step S800. 另外,步骤S800-S804和S812分别和图5中的步骤S400-S404和S408基本相似。 Further, Step S800-S804 and S812 in FIG. 5, respectively, and the step S400-S404 and S408 are similar. 因此,省略对这些步骤的说明。 Therefore, the description of these steps is omitted. 下面将给出步骤S805和随后各步骤的说明。 The following description will be given of step S805 and subsequent steps.

步骤S805:分割/优化子单元617产生一个转移-目的地行表。 Step S805: Split / optimization sub-unit 617 generates a transfer - destination row table. 这一步骤的详情后面参考图10给出。 The details of this step 10 is given later with reference to FIG.

这里,说明转移-目的地行表。 Here, the transfer - the destination row table.

图8表示一个转移-目的地行表的例子,其由本实施例的调试装置20产生和使用。 Figure 8 shows a transfer - examples destination row of the table, which fitting apparatus 20 of the present embodiment of the generation and use.

一个转移-目的地行指得是这样的一行,它可以随在源代码中不紧接列在它上面的一行执行。 A transfer - Destination line refers to the line so that it can follow in the source code is not executed immediately column row above it. 一个转移地-目的行的例子是作为一个分支(brunch)指令的分支目标指定的行。 A shift to - the purpose of the line is an example of the branch target as a branch (brunch) instruction specified line. 在从首行开始的源代码中,包括转移-目的地行和驻留在该转移-目的地行和另一转移-目的地行之间的行的一组行统称为一个控制块。 From the beginning of the first line in the source code, including the transfer - destination row and reside in the branch - line and another transfer destination - the destination of the line between a group of rows rows collectively referred to as a control block. 转移-目的地行表存储行号,它表示每一控制决的第一行在源代码中所在的地方,以便表示每一控制块的边界。 Transfer - Destination row table to store the line number, which represents the summary of each control where the first line of the source code is located, to represent each control block boundaries.

图8表示的转移-目的地行表由存储行号的列和存储转移-目的地标志的列组成,所述标志分别指表示相应行是否是一个转移-目的地行。 Figure 8 shows the transfer - destination table row by row number of columns and the storage memory transfer - destination mark columns, respectively, refer to the flag indicates whether the corresponding line is a shift - destination row. 当一个相应行是转移-目的地行时,转移-目的地标志设定为“1”,否则设定为“0”。 When a line is the corresponding shift - destination row, the transfer - the destination flag is set to "1", otherwise set to "0." 注意,源代码的第一行总是指定为一个转移-目的地行。 Note that the first line of the source code is always designated as a transfer - the destination line. 为每一源代码文件产生一个转移-目的地行表。 For each source code file to generate a transfer - destination row table.

步骤S806:设定子单元116从顶部逐个检查被编辑的行表中的每个号码以判断是否存在尚未选择作为目标的行号。 Step S806: setting subunit 116 checks being edited row in the table from the top of each number individually to determine whether there has not been selected as the target line number.

步骤S807:当判定存在尚未选择作为目标的行号时,设定子单元116选择跟随当前被选择的目标行号排列的行号作为下一个目标。 Step S807: when it is determined the presence of the target has not been selected as the line number, setting sub unit 116 follows the currently selected selection target row number arrangement of the line number as the next target.

步骤S808:设定子单元116参考转移-目的地行表判断相应于该下一目标的转移-目的地标志是否设定为“1”。 Step S808: setting subunit 116 reference transfer - Destination row of the table corresponds to the judge to transfer the next target - the destination flag is set to "1."

步骤S809:当在步骤S808的判断产生负的结果时,分割/优化子单元617判断下一目标的行号是否等于通过在当前被选择的目标的行号上加1得到的值。 Step S809: When a negative result in the determination in step S808, dividing / optimization sub-unit 617 determines the next target row number is equal to the value of the currently selected target row number obtained by adding 1. 这是判断当前目标行和下一目标行是否是两个连续行。 This is to determine whether the current target line and the next line is the target of two consecutive lines.

步骤S810:当在步骤S808的判断产生肯定的结果或当在步骤S809的判断产生否定的结果时,分割/优化子单元617发布一个断点设定命令,使得在源代码中在下一目标行上设定一个断点。 Step S810: When the resulting positive result of determination at step S808 or in step S809 when generating a negative determination, dividing / optimizing subunit 617 issues a breakpoint setting command, so that in the source code on the next line of the target Set a breakpoint.

步骤S811:分割/优化子单元617现在选择下一目标行作为目标行,并返回步骤S806。 Step S811: Split / optimizing subunit 617 now select the next target line as the target line, and returns to step S806.

以上述方式,分割/优化子单元617在一个是转移-目的地行的被编辑的行上设定一个断点或者在一个其行号在被编辑的行表中与紧在其前的被编辑的行的行号不相连续的被编辑的行上设定一个断点。 In the above-described manner, segmentation / optimization in one sub-unit 617 is transferred - to set a breakpoint on a line to be edited in a destination line or row number in the row of the table being edited is edited in the immediately prior to its The line number not in a continuous line is edited to set a breakpoint. 换句话说,分割/优化子单元617既不在是转移-目的地的被编辑的行上设定断点,也不在其行号与紧在其前的被编辑的行的行号连续的被编辑行上设定断点。 In other words, dividing / optimizing subunit 617 neither is the transfer - set a breakpoint on the line to be edited destination, nor its line number with tight continuous edited in the edited line number in front set a breakpoint on the line.

注意,分割/优化子单元617在构造中可以如下简化。 Note that dividing / optimizing subunit 617 in the constructor can be simplified as follows. 亦即,分割/优化子单元617可以这样构造,使得在被编辑的行表中列出的且其在转移-目的地行表中的转移-目的地标志设定为1的每一行上设定一个断点。 That is, the dividing / optimizing subunit 617 can be configured such that listed in the rows of the table being edited and its metastasis - the destination of the transfer line of the table - the destination flag is set to 1 is set on each row a breakpoint. 另外,分割/优化子单元617可以这样构造,使得不在紧随源代码另一被编辑的行的被编辑的行上设定断点。 In addition, dividing / optimizing subunit 617 can be configured such that the line is not followed by another line of the source code is edited by editing the set breakpoint.

或者,可以这样构造分割/优化子单元617,使得仅在每一控制块的第一个被编辑的行上设定断点。 Alternatively, it may be configured dividing / optimizing subunit 617, such that a breakpoint is set only on the first line of each control block is edited.

另外,可以这样构造分割/优化子单元617,使得在一个控制块包括一个被编辑的行的场合在该控制块的第一行上设定一个断点。 In addition, it can be constructed split / optimization sub-unit 617, so as to include the case of a line to be edited to set a breakpoint in a control block in the first line of the control block. 这里,省略在被编辑的行上设定断点,而在该控制块的首行上设定断点。 Here, set a breakpoint on the line omitted to be edited, and set a breakpoint on the first line of the control block. 或者,可以这样构造分割/优化子单元617,使得仅在连续驻留在一个控制块中的多于两个的被编辑行中的第一行上设定断点。 Alternatively, it may be configured dividing / optimizing subunit 617, so that only the continuous reside on more than one control block is edited in two rows in the first row to the breakpoint.

图10是一个流程图,表示为产生转移-目的地行表在步骤S805执行的详细的处理。 FIG 10 is a flowchart showing the transfer to generate - Detail of processing the destination row of the table in step S805 executed.

步骤S901:分割/优化子单元617为已经读取的被编辑的行表读源代码。 Step S901: Split / optimization sub-unit 617 is being edited row table read source code has been read.

步骤S902:分割/优化子单元617初始化每一变量,为以后要执行的字分析做准备。 Step S902: Split / optimizing subunit 617 each variable is initialized to prepare for the word to be executed later analysis. 更具体说,分割/优化子单元617设定当前行为0、转移-目的地标志为1、下一行首标志为0、中间标志为0、和括号计数为-1。 More specifically, the dividing / optimizing subunit 617 sets the current behavior of 0, the transfer - the destination flag is 1, the first sign of the next row is 0, the middle flag is 0, and -1 in parentheses count.

步骤S903:分割/优化子单元617判断在源代码中是否存在一行,其相应于由“当前行+1”得到的行号。 Step S903: Split / optimization sub-unit 617 determines whether there is a line in the source code, which corresponds to the "current row +1" to get the line number.

步骤S904:当在步骤S903判定存在一个相应于当前行+1的行时,分割/优化子单元选择该行作为当前行。 Step S904: When in step S903 determines that there is a line corresponding to the current row +1, dividing / optimizing subunit select the row as the current row.

步骤S905:分割/优化子单元617在定界符处分割当前行为字。 Step S905: Split / optimizing subunit 617 split the current behavior of the word delimiters.

这里,定界符是预定的字符串,包括下面的字符。 Here, the delimiter is a predetermined character string, including the following character.

(1) 空格(2) 控制字符(3) //...行末尾(4) /*…*/(5) “…”(6) (,)(7) {,}(8) :注意,这里使用的“…”指示任意字符串。 (1) a space (2) control characters (3) // ... end of the line (4) / * ... * / (5) "..." (6) (,) (7) {,} (8): Note "..." indicates an arbitrary string used here. 在上面的定界符中,(6)、(7)和(8)特别称为字定界符。 In the above delimiters, (6), (7) and (8) in particular is called word delimiter. 每一字由两种方式构成: (i)一个字符或由定界符分割的字符串和(ii)定界符。 Each word constituted by two ways: (i) a character or a character string divided by delimiter and (ii) delimiter. 图19和20分别表示源代码分割为字的例子。 Figures 19 and 20 represent the source code is divided into word examples.

步骤S906:分割/优化子单元617从当前行首顺序检测字。 Step S906: Split / optimization sub-unit 617 from the current line sequence detection word.

步骤S907:分割/优化子单元617判断是否检测到任何字。 Step S907: Split / optimization sub-unit 617 determines whether or not detect any words.

步骤S908:如果在步骤S907判定检测到一个字,则分割/优化子单元617执行字分析,其在后面参考图11A详细说明。 Step S908: S907 determine if a word is detected in step, the division / sub-unit 617 performs a word optimization analysis, the reference to Figure 11A detail later.

步骤S909:分割/优化子单元617继续检测当前行查找另一个字,和返回步骤S907。 Step S909: Split / optimization sub-unit 617 continues to detect the current line to find another word, and returns to step S907.

步骤S910:当在步骤S907判定未检测到字时,分割/优化子单元617分配在转移-目的地标志中保存的值给相应于当前行的转移-目的地标志,接着设定该转移-目的地标志为0。 Step S910: When the judgment in step S907 is not detected word segmentation / optimizing subunit 617 allocated in the transfer - the value stored in the destination sign corresponding to the current shift to the line - destination signs, then set the transfer - Purpose mark of zero. 然后,处理返回到步骤S903。 Then, the process returns to step S903.

图11A是一个流程图,表示在步骤S908执行的字分析的细节。 11A is a flowchart showing details of the word analysis executed in step S908. 在字分析中,每一个字被分类到组1-6和“其它”组中,并根据该分类经受不同的处理。 In word analysis, each word is classified into groups 1-6 and the "other" group, and subjected to different treatment based on the classification. 图11B表示分类在组1-6中的字。 11B shows the classification of the word in the group 1-6.

步骤S1001:分割/优化子单元617判断括号计数是否大于-1。 Step S1001: Split / optimization sub-unit 617 to determine whether the count is greater than -1 brackets.

步骤S1008:当在步骤S1001判定括号计数不大于-1并且该字被分类到组1时,亦即该字包括“:”或“}”,分割/优化子单元617设定下一行首标志为1。 Step S1008: When in step S1001 the determination count is not greater than -1 and brackets the word is classified to 1 group, i.e., the word comprising ":" or "}", segmentation / optimization sub-unit 617 to set the first flag for the next line 1.

步骤S1009:当在步骤S1001判定括号计数不大于-1和该字被分类到组2时,分割/优化子单元617设定括号计数为0和中间标志为1。 Step S1009: When the judgment in step S1001 parentheses count is not greater than 1, and the words are classified into group 2, dividing / optimizing subunit 617 is set to 0 and the intermediate brackets count flag is 1.

步骤S1010:当在步骤S1001判定括号计数不大于-1和该字被分类到组3时,分割/优化子单元617设定下一行首标志和中间标志两者都为1。 Step S1010: When the judgment in step S1001 parentheses count is not greater than 1, and the words are classified into three groups, dividing / optimizing subunit 617 to set the first flag and the flags of both the middle of the next row is 1.

步骤S1011:当在步骤S1001判定括号计数不大于-1和该字被分类到组5时,分割/优化子单元617设定中间标志为0。 Step S1011: When the judgment in step S1001 parentheses count is not greater than 1, and the words are classified into groups 5:00, dividing / optimizing subunit 617 middle flag is set to 0.

步骤S1012:当在步骤S1001判定括号计数不大于-1和该字被分类到组4时,分割/优化子单元617进一步判断下一行首标志是否设定为1。 Step S1012: When in step S1001 the determination count is not greater than -1 and brackets the word is classified into the group 4, segmentation / optimization sub-unit 617 further determines whether the next line of the first flag is set to 1.

步骤S1013:当在步骤S1012判定下一行首标志设定为1时,分割/优化子单元617设定转移-目的地标志为1,和下一行首标志为0。 Step S1013: When the first signs determination in step S1012 next line is set to 1, the division / sub-unit 617 is set to optimize the transfer - the destination flag is 1, and the next line of the first flag is 0.

步骤S1014:分割/优化子单元617然后判断中间标志是否设定为1。 Step S1014: Split / optimization sub-unit 617 and then determine whether the middle flag is set to 1.

步骤S1015:当在步骤S1014判定中间标志设定为1时,分割/优化子单元617设定下一行首标志为1和中间标志为0。 Step S1015: When the determination in step S1014 middle flag is set to 1, the dividing / optimizing subunit 617 first flag is set to 1 and the middle of the next line flag is 0.

注意,当在步骤S1001判定括号计数不大于-1和字不归于组1-5中的任何一组时,不执行任何另外的处理。 Note that when the determination in step S1001 brackets and the word count is not greater than -1 is not attributable to any one group of 1-5 groups, does not perform any additional processing.

步骤S1002:当在步骤S1001判定括号计数大于-1时,分割/优化子单元617判断该字是否分类到组6。 Step S1002: When the judgment in step S1001 brackets count is greater than -1, the dividing / optimizing subunit 617 determines whether the word is classified into six groups.

步骤S1003:当在步骤S1002判定该字分类到组6时,分割/优化子单元617进一步判断该字是否包括“(”。 Step S1003: When the word is determined in step S1002 classified into six groups, dividing / optimizing subunit 617 further determines whether to include the word "(."

步骤S1004:当在步骤S1003判定该字包括“(”时,分割/优化子单元617给括号计数增加1。 Step S1004: When the judgment in step S1003 includes the word "(", the dividing / optimizing subunit 617 to the brackets count increased by one.

步骤S1005:当在步骤S1003判定该字不包括“(”时,分割/优化子单元617使括号计数减1。 Step S1005: When in step S1003 determines that the word does not include "(" Split / optimization sub-unit 617 so that the brackets count by one.

步骤S1006:分割/优化子单元617判断括号计数是否等于0。 Step S1006: Split / optimizing subunit 617 judges brackets count is equal to zero.

步骤S1007:当在步骤S1006判定括号计数等于0时,分割/优化子单元617设定括号计数等于-1。 Step S1007: When in step S1006 the determination brackets count equals 0, the segmentation / optimization sub-unit 617 is set equal to -1 brackets count.

注意,上述组1-6的分类适合用C语言写的源代码。 Note that the above group classification for 1-6 written in C language source code. 为适合用Java写的源代码,组1另外包括“catch”和“finally”。 Suitable for source code written in Java, the group additionally includes a "catch" and "finally".

在图10和11所示流程图中,字从源代码首行顺序分析,在下述情况1和2的任何一种情况下,一行被确定为是一个转移-目的地。 In the flow chart shown in Figures 10 and 11, the word order of the first line from the source code analysis, in the following cases 1 and 2 in any case, the line is determined to be a transfer - destination.

情况1:分割/优化子单元617从源代码的开始顺序分析字。 Case 1: Split / optimization sub-unit 617 from the beginning of the sequence analysis of the source code word. 要选择的是这样的行,其中组4中的字“;”在组1中的字“:”或“}”后首先出现或在组3中的字“else”出现。 To choose is this line, where the group 4 of the word ";" In the group 1 the word ":" or "}" first appeared or in group 3 of the word "else" after. 这样选择的行指定作为一个转移-目的地。 Line specifies this choice as a transfer - destination.

情况2:分割/优化子单元617从源代码的开始顺序分析字。 Case 2: Split / optimization sub-unit 617 from the beginning of the sequence analysis of the source code word. 要选择的是这样的行,其中组4中的字“;”在组4中的字“;”后首先出现,同时中间标志被设定为1。 To be selected is such a row, wherein the group 4 of the word ";" in the group 4 of the word ";" first appears, while the middle flag is set to 1. 这样选择的行指定作为一个转移-目的地。 Line specifies this choice as a transfer - destination.

这里,中间标志被设定为1的状态指示,在组3或4中的字之一,亦即“if”、“for”、“while”和“else”前面已经出现。 Here, the intermediate state flag is set to 1, indicates that, in a group of 3 or 4 in one word, that "if", "for", "while" and "else" already appears. 注意,在包括“if”、“for”和“while”的条件表达式内的字被舍弃,使得在情况2中要选择的行不是条件表达式自身。 Note that the word in the included "if", "for" and "while" the conditional expression is discarded, so that in the case of two rows to be selected is not conditional expression itself.

在上述情况1或2中,当有一个“{”或“}”时,第一个被发现包括组4中的字“;”的行被视为是一个转移-目的地,即使它不是在“if”、“for”或“while”之后发现。 In the case of 1 or 2, when there is a "{" or "}", the first one was found in the group comprising four words ";" The line is considered a transfer - the destination, even if it is not in "if", "for" or "while" after the discovery. 这可以导致产生比实际有的额外多的控制块。 This may lead to some additional and more than the actual control block. 然而,有这样的好处,所有转移-目的地使用相对简单的算法可靠发现而不会遗漏任何转移-目的地行。 However, there are such benefits, all transfers - destinations using a relatively simple and reliable algorithm found without missing any transfer - destination row.

实施例3图12是一个方框图,表示根据本发明的实施例3的调试装置30。 Example 3 Figure 12 is a block diagram showing fitting apparatus 30 according to a third embodiment of the present invention.

在该图中,在调试装置20的部件以外,调试装置30另外包括一个错误页表管理器1118。 In this figure, the outside member 20 of the debugging apparatus, fitting apparatus 30 additionally includes an error page table manager 1118. 以下,主要对发现的不同之处进行说明,省略对相似于调试装置20的构造的说明。 Hereinafter, mainly differs from the discovery will be described, similar to the debug configuration of apparatus 20 is omitted.

图13表示一个错误页表的例子。 Figure 13 shows an example of an error page table.

错误页表包括多个错误页,每一错误页包括一个唯一标识该错误页的错误页号,一个注解,和一个重复数。 Error page table includes a plurality of error pages, each page includes a unique identifier wrong wrong wrong page number of the page, a note, and a number of repetitions.

注解由下面关于至少一个断点的信息组成。 Notes by the following information about the composition of at least one breakpoint. 亦即,有关包括断点被设定的行的源代码文件的名字的、该行的行号的和由操作员输入的注解的信息。 That is, about the name, including a line breakpoint is set in the source code files, and comments entered by the operator of the information about the line number of. 对一个断点的每一注解例如是关于所进行的编辑并由操作员在设定该断点时输入的信息。 Each annotation on a breakpoint for example, information about editing conducted by the operator when setting the breakpoint input. 另外,可以做这样的安排,使得注解可以另外包括自动输入的数据诸如编辑日期和/或为进行该编辑占用的时间期间。 In addition, such an arrangement can be done, making annotations may additionally include automatic data input and / or during the time occupied by the editor to edit the date of such conduct.

重复数表示执行在该断点驻留的指令的次数。 Repeat number indicates the number of executions in the breakpoint instruction resides.

图14是一个流程图,表示响应由命令输入单元102接收的调试结束命令执行的处理。 FIG 14 is a flowchart showing the response received by the debug command input unit 102 terminates the processing command execution.

步骤S1301:加载器105请求被编辑的行表管理器115参考存储在断点表管理器111中的断点表产生一个被编辑的行表。 Step S1301: breakpoint table 105 requests loader is edited row table manager 115 reference stored in the breakpoint table manager 111 produces a row of the table being edited. 接着,被编辑的行表管理器115参考在加载的可执行文件中的调试信息以便获取文件名和相应于在断点表中列出的每一断点的行号。 Then, the edited row table manager 115 reference debugging information in the loaded executable file to get the file name, and corresponding to each breakpoint listed in the breakpoint table line number. 然后被编辑的行表管理器115为每一源代码文件建立一个被编辑的行表。 Then edited row table manager 115 for each source code file to be edited to create a row in the table.

步骤S1302:加载器105请求断点表管理器111删除该断点表,以使断点表管理器111删除断点表。 Step S1302: loader 105 requests the breakpoint table manager 111 to remove the breakpoint table so that the breakpoint table manager 111 to delete a breakpoint table.

步骤S1303:加载器105给在错误页中列出的每一断点地址分配0。 Step S1303: loader 105 to each breakpoint address listed in the error page is assigned zero.

图15是一个流程图,表示响应由命令输入单元102接收的调试开始命令执行的处理。 FIG 15 is a flowchart showing response processing unit 102 is received by command input debug command execution begins.

在该图中,在步骤S801前和在步骤S801的判断产生“是”后执行的步骤以及步骤S812和在图9所示它们相应的步骤相同。 In this figure, at step S801 before and produces a "yes" and step performed after step S812 in FIG. 9 and their corresponding step of the same is determined in step S801. 因此,流程图15部分省略。 Thus, the flowchart 15 parts omitted. 另外,省略对这些同样的步骤的说明,下面对步骤S1401和1402说明,它们是与图9所示的任何步骤不同的步骤。 In addition, these same steps are omitted for the description, the following description of steps S1401 and 1402, they are any of the steps shown in FIG. 9 different steps.

步骤S1401:加载器105判断是否存在一个不是最后错误页的错误页,其内所列断点地址保存持值0。 Step S1401: loader 105 determines whether there is an error page instead of the last error page break address listed in the preservation hold its value to 0.

步骤S1402:当在步骤S401的判断产生肯定结果时,加载器105为该错误页执行图18所示错误页关闭处理。 Step S1402: When generating a positive result in the determination in step S401, the error page 105 shown in Fig 18 for the error page loader close processing performed in FIG.

图16是一个流程图,表示响应由命令输入单元102接收的断点设定命令执行的处理。 FIG 16 is a flowchart showing the response unit 102 receives a command entered by the breakpoint setting process to be executed.

步骤S1501:当命令输入单元102接收一个断点设定命令时,加载器105请求断点设定/禁止子单元106设定一个断点。 Step S1501: When the command input unit 102 to set a breakpoint command received 105 requests loader breakpoint setting / disabling sub unit 106 to set a breakpoint. 作为响应,断点设定/禁止子单元106参考在加载的可执行文件中的调试信息以获取指定在可执行文件中要设定断点的行所在的位置的地址。 In response, the breakpoint setting / disabling sub unit 106 reference debugging information in the executable file is loaded for the specified location in the executable file line where you want to set a breakpoint address.

步骤S1502:错误页表管理器1118判断这样指定的断点地址要记录到其中的一个错误页是否是一个尚未列在错误页表里的新错误页。 Step S1502: Error Page Table Manager 1118 judge so designated breakpoint address to be recorded in the error page if one is not already listed on an error page list of new error page.

步骤S1503:当在步骤S1502判定,要记录该断点地址的错误页是新的时,错误页表管理器1118在该错误页中记录该断点地址,该错误页列在错误页表的末尾。 Step S1503: When the judgment in step S1502, to record the breakpoint address error page is new, the error page Table Manager 1118 to record the break address in the error page, the error page error pages listed at the end of the table . 另外,错误页表管理器118在该错误页中记录一个文件名和相应于该断点地址的行号。 In addition, the error 118 page table management record corresponding to a file name and line number of the breakpoint address in the error page.

步骤S1504:错误页表管理器1118在这样记录的文件名和行号旁边记录由操作员输入的注解。 Step S1504: Error Page Table Manager 1118 next to the file name and line number of such records by the operator input record comments.

步骤S1505:错误页表管理器1118在错误页表的末尾产生一个新错误页。 Step S1505: Error Page Table Manager 1118 error at the end of a page table to produce a new error page. 在这一阶段,新产生的错误页只包括一个顺序分配的错误页号。 At this stage, the newly generated error page includes only one sequence number assigned to the wrong page.

步骤S1506:当在步骤S1502判定,要记录断点地址的错误页已经列在错误页表中时,错误页表管理器1118查阅该错误页表以检测目标是记录断点地址的错误页表。 Step S1506: When it is determined in step S1502, to record the error page breakpoint address is already listed in the error page table, the error page Table Manager 1118 review of the error page table to detect the target is to record the error page table breakpoint addresses.

步骤S1507:错误页表管理器1118在这样检测到的错误页中写断点设定地址,然后写文件名和相应于该断点地址的行号。 Step S1507: Error Page Table Manager 1118 write breakpoints detected errors in this setting page address, and then write the file name and line number corresponding to the breakpoint address.

步骤S1508:错误页表管理器1118在这样写的文件名和行号旁边写由操作员输入的注解。 Step S1508: Error Page Table Manager 1118 next to the file name and line number written like this written by the operator to enter comments.

步骤S1509:错误页表管理器1118判断是否存在另一其中要记录断点地址的错误页。 Step S1509: Error Page Table Manager 1118 to determine whether there is another in which you want to record the breakpoint address error page.

步骤S1510:断点表管理器111在断点表中记录该断点地址连同位于该地址处的指令,然后用中断指令代替该指令。 Step S1510: Breakpoint Table Manager breakpoint table 111 recorded in the break address along with instructions located at the address, and then interrupt instruction instead of the instruction.

步骤S1511:源代码显示器108从源代码文件管理器114读请求的源代码文件并显示如此读取的文件。 Step S1511: the source code from the source code files 108 monitor source code file manager 114 reads and displays the file requested so read. 源代码显示器108然后请求断点显示器109显示在指定文件中当前设定的断点。 Source code display 108 then request a breakpoint display 109 displays in the specified file is currently set breakpoints. 作为响应,断点显示器109从断点表管理器111中读指定的源代码文件的断点信息,并根据读取的信息显示断点。 In response, the breakpoint breakpoint information display 109 reads the specified source code files from the breakpoint table manager 111, and displays the information read breakpoint.

图17是一个流程图,表示响应由命令输入单元102接收的断点禁止命令执行的处理。 FIG 17 is a flowchart showing the response unit 102 receives a command entered by the inhibition processing command execution breakpoint.

步骤S1601:加载器105请求断点设定/禁止子单元106禁止由该命令指定的断点。 Step S1601: loader 105 requests the breakpoint setting / disabling sub unit 106 prohibits specified by the command breakpoint. 作为响应,断点设定/禁止子单元106参考加载的可执行文件以获取要被禁止的断点的地址。 In response, the breakpoint setting / disabling sub unit 106 reference loaded executable file to get the address of the breakpoint is to be prohibited. 然后断点设定/禁止子单元106请求错误页表管理器1118从错误页中删除要被禁止的断点的地址。 Then breakpoint setting / disabling sub unit 106 request error page Table Manager 1118 to delete the breakpoint to be banned from the error page address. 接着,断点设定/禁止子单元106请求断点表管理器111修改断点表,使得要被禁止的断点的地址连同相应指令一起被删除。 Then, set a breakpoint / disable breakpoint request subunit 106 111 Table Manager to modify the breakpoint table, making breakpoint address to be banned together with the corresponding command is removed together. 最后,断点设定/禁止子单元106请求源代码显示器108更新显示,使得正被显示的源代码与删除后的源代码一致。 Finally, the breakpoint setting / disabling sub unit 106 requests to update the display 108 displays the source code, so that is consistent with the deletion of the source code after the source code being displayed.

步骤S1602:错误页表管理器1118选择列在错误页表首行的错误页作为目标。 Step S1602: Error Page Table Manager 1118 are listed in the error page select the first line of the table as the target error page.

步骤S1603:错误页表管理器1118然后查阅该目标错误页,从记录在其内的断点表地址中间检测要被禁止的断点的地址。 Step S1603: Error Page Table Manager 1118 and then inspect the target error page detection to be banned from the breakpoint address is recorded in its breakpoint table address within the middle.

步骤S1604:错误页表管理器1118判断要被禁止的断点的地址是否在步骤S1603在目标错误页中检测到。 Step S1604: Error page table manager 1118 determines whether the address of the breakpoint to be disabled in step S1603 whether the detected error in the target page.

步骤S1605:当判定要被禁止的断点的地址在目标错误页中被检测到时,错误页表管理器1118选择该错误页作为目标。 Step S1605: when it is determined to be prohibited in the target breakpoint address error page is detected, an error page table manager 1118 to select the error page as the target.

步骤S1606:错误页表管理器1118从目标错误页删除要被禁止的断点的地址。 Step S1606: Error Page Table Manager 1118 to delete the address breakpoint to be banned from the target error page.

步骤S1607:错误页表管理器1118判断目标错误页是否不再存储任何断点地址。 Step S1607: Error Page Table Manager 1118 to determine whether the target error page is no longer stored in any breakpoint address.

步骤S1608:当判定目标错误页还存储有断点地址时,错误页表管理器1118进一步判断在目标错误页旁边是否存在另一个错误页。 Step S1608: When determining the target error page also stores the breakpoint address, the error page Table Manager 1118 further to determine whether there is another error page next target error page.

步骤S1609:当在步骤S1608判定存在下一错误页时,错误页表管理器1118现在指定该下一错误页作为目标。 Step S1609: When it is determined there is a next step error page S1608, an error page Table Manager 1118 is now designated as the target of the next error page.

步骤S1610:当在步骤S1607判定目标错误页不再存储任何断点地址时,错误页表管理器1118执行图18所示错误页关闭处理。 Step S1610: When determining the target in step S1607 error page does not store any breakpoint address, an error page shown in the table on page 18 Error Manager 1118 execution figure close processing.

步骤S1611:断点表管理器111恢复原来位于要被禁止的断点的地址处的指令,然后修改断点表,以便删除该地址和指令。 Step S1611: Breakpoint Table Manager 111 recovery instructions originally located at the address of the breakpoint is to be prohibited, and then modify the breakpoint table to delete the address and instructions.

步骤S1612:源代码显示器108从源代码管理器114读指定的源代码文件,以显示。 Step S1612: the source code from source control display 108 114 read the source code of the specified file to be displayed. 源代码显示器108然后请求断点显示器109显示在指定的源代码文件中当前设定的断点。 Source code display 108 then request a breakpoint at the specified display 109 displays the source code files currently set breakpoints. 作为响应,断点显示器109从断点表管理器111中读指定文件的断点信息,并根据读取的信息显示断点。 In response, the breakpoint display 109 reads the specified file from the breakpoint table manager 111 breakpoint information and displays the breakpoint based on the information read.

图18是一个流程图,详细表示错误页关闭处理。 FIG 18 is a flowchart showing in detail the error page close processing.

步骤S1701:错误页管理器118存储测试结果,然后关闭该错误页。 Step S1701: 118 Error Page Manager to store test results, and then close the error page.

步骤S1702:错误页表管理器118然后从错误页表中删除关闭的错误页。 Step S1702: Error Page Table Manager 118 error page and then delete off from the wrong page table.

使用上述构造,调试装置30为每一断点单独管理错误页,它允许程序员高效为所进行的编辑添加注解。 Use the above configuration, debugging device 30 for each breakpoint separately managed error page, which allows programmers to efficiently carried out for editing add comments.

虽然参考附图以举例方式充分说明了本发明,但是应该注意,对于本领域的技术人员来说各种改变和修改是显然的。 Although fully by way of example with reference to the accompanying drawings illustrate the present invention, it is to be noted that for persons skilled in this art that various changes and modifications will be apparent. 因此,除非这些改变和修改离开了本发明的范围,否则它们应该被认为被包含在本发明之内。 Therefore, unless such changes and modifications leave the scope of the present invention, or they should be considered to be included within the present invention.

Referenced by
Citing PatentFiling datePublication dateApplicantTitle
CN100435112C21 Nov 200519 Nov 2008洛阳卓航测控设备有限责任公司Method for setting breakpoint of user software program of SCM development system
CN104346273A *29 Jul 201311 Feb 2015国际商业机器公司Method and system used for debugging
Classifications
International ClassificationG06F11/36
Cooperative ClassificationG06F11/3648, G06F11/3624
European ClassificationG06F11/36B2, G06F11/36B7
Legal Events
DateCodeEventDescription
20 Aug 2003C06Publication
29 Dec 2004C10Request of examination as to substance
24 Nov 2010C02Deemed withdrawal of patent application after publication (patent law 2001)