Method for debugging computer program, device employing method, and storage medium

US11397662B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11397662-B2
Application numberUS-202117404563-A
CountryUS
Kind codeB2
Filing dateAug 17, 2021
Priority dateAug 19, 2020
Publication dateJul 26, 2022
Grant dateJul 26, 2022

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method for debugging a program, based on simulating an object program and comparing simulated waveforms with standard waveforms are applied in an electronic device. A simulated environment corresponding to the object program is established and multiple instructions from code of the object program are mapped against the standard waveforms. Trigger points are set in the object program, the object program is run from the trigger point and simulation waveforms are stored. The simulation waveforms are compared with the standard waveforms, and the location of a bug of the object program is found according a comparison. The bug may be resolved or cured. The electronic device utilizing the method is also disclosed.

First claim

Opening claim text (preview).

What is claimed is: 1. A program debugging method comprising: establishing a simulated environment corresponding to an object program; mapping multiple instructions of the object program with standard waveforms corresponding to the multiple instructions; setting a trigger point in the object program; running the object program from the trigger point and storing simulation waveforms of the object program; comparing the simulation waveforms with the standard waveforms; and finding a bug of the object program and fixing the bug when the simulation waveforms are inconsistent with the standard waveforms. 2. The program debugging method of claim 1 , wherein establishing the simulated environment corresponding to the object program comprises: reading a program file corresponding to the object program; and running the program file to simulate an execution process of the object program. 3. The program debugging method of claim 2 , wherein setting the trigger point in the object program comprises: performing a simulation of the object program and finding an object instruction containing the bug according to a simulation result of the object program; and setting the trigger point before the object instruction is executed. 4. The program debugging method of claim 2 , wherein a format of the program file comprises a binary format or a hex format. 5. The program debugging method of claim 1 , wherein setting the trigger point in the object program comprises: setting the trigger point in a middle position of the object program. 6. The program debugging method of claim 1 , further comprising: determining whether the bug is resolved; and resetting the trigger point in the object program until the bug is resolved. 7. The program debugging method of claim 1 , wherein mapping the multiple instructions of the object program with the standard waveforms corresponding to the multiple instructions comprises: obtaining a list file of a machine code compiler and the multiple instructions of the object program; mapping the multiple instructions with the standard waveforms according to the list file of the machine code compiler. 8. The program debugging method of claim 1 , wherein the trigger point comprises a general purpose input output (GPIO) signal. 9. A program debugging device comprising: at least one processor; and a data storage storing one or more programs which when executed by the at least one processor, cause the at least one processor to: establish a simulated environment corresponding to an object program; map multiple instructions of the object program with standard waveforms corresponding to the multiple instructions; set a trigger point in the object program; run the object program from the trigger point and store simulation waveforms of the object program; compare the simulation waveforms with the standard waveforms; and find a bug of the object program and fix the bug when the simulation waveforms are inconsistent with the standard waveforms. 10. The program debugging device of claim 9 , wherein the at least one processor establishing the simulated environment corresponding to the object program comprises: reading a program file corresponding to the object program; and running the program file to simulate an execution process of the object program. 11. The program debugging device of claim 10 , wherein the at least one processor setting the trigger point in the object program comprises: performing a simulation of the object program and finding an object instruction containing the bug according to a simulation result of the object program; and setting the trigger point before the object instruction is executed. 12. The program debugging device of claim 10 , wherein a format of the program file comprises a binary format or a hex format. 13. The program debugging device of claim 9 , wherein the at least one processor setting the trigger point in the object program comprises: setting the trigger point in a middle position of the object program. 14. The program debugging device of claim 9 , wherein the at least one processor is further configured to: determine whether the bug is resolved; and reset the trigger point in the object program until the bug is resolved. 15. The program debugging device of claim 9 , wherein the at least one processor mapping the multiple instructions of the object program with the standard waveforms corresponding to the multiple instructions comprises: obtaining a list file of a machine code compiler and the multiple instructions of the object program; mapping the multiple instructions with the standard waveforms according to the list file of the machine code compiler. 16. The program debugging device of claim 9 , wherein the trigger point comprises a general purpose input output (GPIO) signal. 17. A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, cause the electronic device to perform a program debugging method, the program debugging method comprising: establishing a simulated environment corresponding to an object program; mapping multiple instructions of the object program with standard waveforms corresponding to the multiple instructions; setting a trigger point in the object program; running the object program from the trigger point and storing simulation waveforms of the object program; comparing the simulation waveforms with the standard waveforms; and finding a bug of the object program and fixing the bug when the simulation waveforms are inconsistent with the standard waveforms.

Assignees

Inventors

Classifications

  • Display of waveforms, e.g. of logic analysers (G06F11/323 takes precedence) · CPC title

  • by tracing the execution of the program · CPC title

  • where the reporting involves data format conversion · CPC title

  • Visualisation of programs or trace data · CPC title

  • using diagnostics (G06F11/0703 takes precedence) · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11397662B2 cover?
A method for debugging a program, based on simulating an object program and comparing simulated waveforms with standard waveforms are applied in an electronic device. A simulated environment corresponding to the object program is established and multiple instructions from code of the object program are mapped against the standard waveforms. Trigger points are set in the object program, the obje…
Who is the assignee on this patent?
Hon Hai Prec Ind Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F11/3636. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jul 26 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).