CN111782320A - GUI interface method for debugging cache consistency C case and electronic equipment - Google Patents
GUI interface method for debugging cache consistency C case and electronic equipment Download PDFInfo
- Publication number
- CN111782320A CN111782320A CN202010582436.1A CN202010582436A CN111782320A CN 111782320 A CN111782320 A CN 111782320A CN 202010582436 A CN202010582436 A CN 202010582436A CN 111782320 A CN111782320 A CN 111782320A
- Authority
- CN
- China
- Prior art keywords
- debugging
- gui interface
- interface
- scene
- key
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Debugging And Monitoring (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The invention relates to the technical field of computer programs, in particular to a GUI interface method and electronic equipment for debugging a cache consistency C case, which comprises the following steps: s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format; py script is run by S2, and the generated yaml file is analyzed; s3 initializing display interface, creating scene window, information window and command window, and inputting through monitoring keys; s4 updating GUI interface through key information collection; s5 judging whether the button information collection updating GUI interface needs updating the interface size; s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting; s7, if the monitoring is needed to be continued when quitting, returning to the monitoring key input of S3 to continue monitoring, otherwise selecting ESC, and quitting the debugging and ending, the invention is based on GUI interface debugging, the same scene, highlighting, and clearly distributing; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
Description
Technical Field
The invention relates to the technical field of computer programs, in particular to a GUI (graphical user interface) method and electronic equipment for debugging a cache consistency C case.
Background
Manual debugg is time-consuming and labor-consuming; (generally, for C program emulation, only which address is wrong is reported, at this time, the C program needs to be manually searched to find out the address which is accessed by the core and the sequence of the addresses being accessed; sometimes, the address is an intermediate address accessed by a certain address, so that manual searching is more laborious, a slightly larger C program is troublesome, and the C program is overwhelming when a plurality of cores access a program at the same time).
Disclosure of Invention
Aiming at the defects of the prior art, the invention discloses a GUI interface method and electronic equipment for debugging a cache consistency C case, which are used for solving the problems that the test case scene generated automatically and randomly is complex, the number of memory addresses is large, and the debugging process is complex when the case fails.
The invention is realized by the following technical scheme:
in a first aspect, the invention discloses a GUI interface method for debugging a cache consistency C case, which comprises the following steps:
s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format;
py script is run by S2, and the generated yaml file is analyzed;
s3 initializing display interface, creating scene window, information window and command window, and inputting through monitoring keys;
s4 updating GUI interface through key information collection;
s5 judging whether the button information collection updating GUI interface needs updating the interface size;
s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting;
if the monitoring is needed to be continued when the terminal exits from the S7, the terminal returns to the monitoring key input of the S3 to continue monitoring, otherwise, the ESC is selected, and the debugging is quitted and ended.
Further, the monitor key input includes mouse action monitor, up and down left and right key monitor, alphanumeric key monitor, delete key/enter key/esc key monitor, and resize interface action monitor.
Furthermore, in S3, when the corresponding scene action box in the window is clicked, all action boxes belonging to the scene are highlighted at the same time, and the specific information of the action is displayed in the information window.
Furthermore, in S3, when "find < address >" is input in the command window, the corresponding access information of the address is listed in the information window, and all the action blocks accessing the address are highlighted.
Further, the scene action box can be used for horizontally and vertically scrolling and displaying the action boxes which do not appear, and the GUI interface can be dynamically zoomed.
Furthermore, the method circularly monitors the key actions and updates the GUI interface according to the key actions.
In a second aspect, the present invention discloses an electronic device, which includes a processor and a memory storing an execution instruction, wherein when the processor executes the execution instruction stored in the memory, the processor executes the GUI interface method for debugging the cache consistency C case according to the first aspect.
The invention has the beneficial effects that:
the invention monitors the key action circularly, updates the GUI interface according to the key action, and is based on GUI interface debugging, the same scene, high-brightness display and clear distribution; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a GUI interface method for debugging a cache consistency C use case;
FIG. 2 is a graphical interface of the final result of the embodiment of the present invention
FIG. 3 is an interface diagram of clicking a corresponding scene action box according to an embodiment of the present invention;
FIG. 4 is an interface diagram of the embodiment of the present invention when "find < address > is entered in the command window;
FIG. 5 is an interface diagram for scrolling laterally and vertically in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
The embodiment discloses a GUI interface method for debugging a cache consistency C case as shown in fig. 1, which includes the following steps:
s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format;
py script is run by S2, and the generated yaml file is analyzed;
s3 initializing display interface, creating scene window, information window and command window, and inputting through monitoring keys;
s4 updating GUI interface through key information collection;
s5 judging whether the button information collection updating GUI interface needs updating the interface size;
s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting;
if the monitoring is needed to be continued when the terminal exits from the S7, the terminal returns to the monitoring key input of the S3 to continue monitoring, otherwise, the ESC is selected, and the debugging is quitted and ended.
Monitoring key inputs includes mouse action monitoring, up and down left and right key monitoring, alphanumeric key monitoring, delete/enter/esc key monitoring, and resize interface action monitoring.
And clicking the corresponding scene action boxes of the window, simultaneously highlighting all the action boxes belonging to the scene, and simultaneously displaying the specific information of the action in the information window.
When "find < address > is entered in the command window, the corresponding access information for the address is listed in the information window, and all the action boxes that have accessed the address are highlighted.
The scene action box may scroll horizontally and vertically to display the action boxes that do not appear and may dynamically zoom the GUI interface.
The embodiment circularly monitors the key actions, updates the GUI according to the key actions, and is based on GUI debugging, same scene, high-brightness display and clear distribution; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
Example 2
The embodiment discloses a method for debugging a GUI (graphical user interface):
1. outputting the generated cache consistency mixed scene to a yaml file in a certain format;
2. py script is run, the generated yaml file is analyzed, the key actions are circularly monitored, and the GUI interface is updated according to the key actions;
3. and (5) the debugging is finished, and the ESC exits.
The final result is shown in fig. 2:
contains 3 windows: a scene window, a detailed information window and a command window;
clicking the corresponding scene action box, all the action boxes belonging to the scene are highlighted simultaneously, and the specific information of the action is displayed in the information window (see fig. 3 in particular).
When "find < address > is input in the command window, the corresponding access information of the address is listed in the information window, and simultaneously, all the action boxes accessing the address are highlighted, so that the readability and the debugging performance of the program access process are greatly improved (see fig. 4 in particular).
Lateral and vertical scrolling is supported to display the action boxes that do not appear, while a dynamic zooming GUI interface is supported (see in particular fig. 5).
According to the embodiment, complex C program debugging is converted into clear-organized GUI interface debugging, the GUI interface can be debugged in an auxiliary mode, and the method is convenient and fast.
Example 3
The embodiment discloses an electronic device, which comprises a processor and a memory, wherein the memory stores an execution instruction, and when the processor executes the execution instruction stored in the memory, the processor executes the GUI interface method for debugging the cache consistency C case of the embodiment 1.
In conclusion, the invention circularly monitors the key actions, updates the GUI interface according to the key actions, and based on GUI interface debugging, the same scene is highlighted and clearly distributed; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (7)
1. A GUI interface method for debugging cache consistency C use cases is characterized by comprising the following steps:
s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format;
py script is run by S2, and the generated yaml file is analyzed;
s3 initializing display interface, creating scene window, information window and command window, and inputting through monitoring keys;
s4 updating GUI interface through key information collection;
s5 judging whether the button information collection updating GUI interface needs updating the interface size;
s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting;
if the monitoring is needed to be continued when the terminal exits from the S7, the terminal returns to the monitoring key input of the S3 to continue monitoring, otherwise, the ESC is selected, and the debugging is quitted and ended.
2. The GUI interface method for debugging cache consistency C-use cases according to claim 1, wherein said monitor key input comprises mouse action monitor, up, down, left, right key monitor, alphanumeric key monitor, delete key/enter key/esc key monitor, and resize interface action monitor.
3. The GUI interface method for debugging cache consistency C use case according to claim 1, wherein in S3, a corresponding scene action box of a window is clicked, all action boxes belonging to the scene are simultaneously highlighted, and the specific information of the action is displayed in an information window.
4. The GUI interface method for debugging a cache consistency C-case as claimed in claim 3, wherein in S3, "find < address >" is input in the command window, the corresponding access information of the address is listed in the information window, and all the action boxes accessing the address are highlighted.
5. The GUI interface method for debugging cache consistency C-use cases according to claim 3, wherein said scene action boxes can horizontally and vertically scroll to display the action boxes that do not appear, and can dynamically zoom the GUI interface.
6. The GUI interface method for debugging cache consistency C-cases according to claim 1, wherein said method monitors key actions cyclically and updates the GUI interface according to the key actions.
7. An electronic device comprising a processor and a memory storing execution instructions, the processor executing the GUI interface method for debugging a cache coherence C-use case of any one of claims 1 to 6 when the processor executes the execution instructions stored by the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010582436.1A CN111782320B (en) | 2020-06-23 | 2020-06-23 | GUI interface method for debugging cache consistency C case and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010582436.1A CN111782320B (en) | 2020-06-23 | 2020-06-23 | GUI interface method for debugging cache consistency C case and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111782320A true CN111782320A (en) | 2020-10-16 |
CN111782320B CN111782320B (en) | 2023-03-24 |
Family
ID=72756075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010582436.1A Active CN111782320B (en) | 2020-06-23 | 2020-06-23 | GUI interface method for debugging cache consistency C case and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111782320B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0992904B1 (en) * | 1998-10-06 | 2010-06-09 | Texas Instruments Inc. | Cache coherence during emulation |
CN102880467A (en) * | 2012-09-05 | 2013-01-16 | 无锡江南计算技术研究所 | Method for verifying Cache coherence protocol and multi-core processor system |
US20130042222A1 (en) * | 2011-08-08 | 2013-02-14 | Computer Associates Think, Inc. | Automating functionality test cases |
CN103049384A (en) * | 2012-12-29 | 2013-04-17 | 中国科学院深圳先进技术研究院 | Automatic generating frame of multi-core-based multithread limit energy consumption testing source program |
CN107092558A (en) * | 2017-04-12 | 2017-08-25 | 东华大学 | A kind of cli command set automatization test system and method |
CN108984548A (en) * | 2017-05-31 | 2018-12-11 | 腾讯科技(深圳)有限公司 | Content of pages caching method and device |
CN109213641A (en) * | 2017-06-29 | 2019-01-15 | 展讯通信(上海)有限公司 | Buffer consistency detection system and method |
-
2020
- 2020-06-23 CN CN202010582436.1A patent/CN111782320B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0992904B1 (en) * | 1998-10-06 | 2010-06-09 | Texas Instruments Inc. | Cache coherence during emulation |
US20130042222A1 (en) * | 2011-08-08 | 2013-02-14 | Computer Associates Think, Inc. | Automating functionality test cases |
CN102880467A (en) * | 2012-09-05 | 2013-01-16 | 无锡江南计算技术研究所 | Method for verifying Cache coherence protocol and multi-core processor system |
CN103049384A (en) * | 2012-12-29 | 2013-04-17 | 中国科学院深圳先进技术研究院 | Automatic generating frame of multi-core-based multithread limit energy consumption testing source program |
CN107092558A (en) * | 2017-04-12 | 2017-08-25 | 东华大学 | A kind of cli command set automatization test system and method |
CN108984548A (en) * | 2017-05-31 | 2018-12-11 | 腾讯科技(深圳)有限公司 | Content of pages caching method and device |
CN109213641A (en) * | 2017-06-29 | 2019-01-15 | 展讯通信(上海)有限公司 | Buffer consistency detection system and method |
Non-Patent Citations (1)
Title |
---|
徐彩霞等: "面向CLI的自动化测试方法的研究与实现", 《计算机与数字工程》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111782320B (en) | 2023-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10200893B2 (en) | Systems and methods for providing visualization of a telecommunications network topology | |
JP6430037B2 (en) | Debugging support apparatus and debugging support method | |
CN102073670B (en) | Method, equipment and system for debugging online webpage template | |
WO2018174365A1 (en) | Method for visualizing chart of data table | |
US20090254866A1 (en) | Method and system for displaying a multitude of objects on a display | |
CN106681919A (en) | User interface automatic test method and system | |
CN111580912A (en) | Display method and storage medium for multi-level structure resource group | |
CN111414405A (en) | Data acquisition method and device and electronic equipment | |
US9513794B2 (en) | Event visualization and control | |
CN112612436A (en) | Screen projection switching method, device, equipment and storage medium | |
CN112560422A (en) | Chart processing method, device, equipment and medium | |
CN111460235A (en) | Atlas data processing method, device, equipment and storage medium | |
CN111782320B (en) | GUI interface method for debugging cache consistency C case and electronic equipment | |
CN111198908B (en) | Display method and device of power grid asset graph, storage medium and terminal | |
JPH07200217A (en) | Method and system for display of data as well as execution method of data | |
JP2023014128A (en) | Program, display control method, server device, and system | |
CN115329150A (en) | Method and device for generating search condition tree, electronic equipment and storage medium | |
CN112883446B (en) | Set-up diagram screening method, device, equipment and storage medium | |
CN104243201B (en) | Network equipment detection use-case corresponds to the storage method and system of topological diagram | |
CN114064817A (en) | Data processing method and device, electronic equipment and storage medium | |
CN111143206A (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN110825477A (en) | Method, device and equipment for loading graphical interface and storage medium | |
CN112000886B (en) | User behavior recording method, device, equipment and readable storage medium | |
WO2016139805A1 (en) | Programmable logic controller engineering tool and programmable logic controller engineering tool program | |
US11215963B2 (en) | Tracing apparatus and programmable controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |