Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for debugging driver program in user mode

A driver program and user-mode technology, applied in the embedded field, can solve the problems that JTAG cannot be debugged, and achieve the effect of avoiding the establishment of a complex hardware debugging environment, low development cost, and powerful functions

Inactive Publication Date: 2018-08-21
NANJING ACOINFO TECH CO LTD
View PDF3 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the target machine has not established a running environment, or even a bare machine without any program, JTAG cannot realize debugging

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for debugging driver program in user mode
  • Method for debugging driver program in user mode
  • Method for debugging driver program in user mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments.

[0037] In order to solve the defects of the above-mentioned several traditional driver debugging methods, the present invention analyzes the deficiencies of the prior art, and provides a method of using GDB to debug the driver under the operating system. At present, the reasons why the GDB program cannot debug the driver include the following:

[0038] 1. GDB programs cannot debug kernel modules.

[0039] 2. The GDB program cannot debug the IO interface provided by the operating system to the driver.

[0040] 3. The GDB program cannot debug the interrupt service routine.

[0041] Therefore, if you want to use GDB to debug the driver, you need to solve the above three problems.

[0042] The solution idea of ​​the present invention is:

[0043] Transform the kernel-mode driver ontology into user mode, and adopt the idea of ​​intermediate thre...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for debugging a driver program in a user mode. The method comprises the steps that firstly a dynamic library registers a virtual interface to a system and creates an IO call management thread, a kernel message queue and a thread message queue; an application falls into a system kernel program through a system call interface; the kernel program calls the successfully registered virtual interface located in the dynamic library; the virtual interface transmits a message in the application to the IO call management thread through the thread message queue; the IO call management thread is aroused, and the message is transmitted to the virtual interface through the kernel message queue; the virtual interface receives the message, performs analysis to obtain a return value, and returns the return value to the application; and finally the application is called successfully. The method belongs to a driver debugging technology of pure software, and does not needthe assistance of a hardware debugger, so that the system development cost can be reduced and the development speed is increased.

Description

technical field [0001] The invention belongs to the embedded field, in particular to a method for debugging a driver program in a user state. Background technique [0002] The invention relates to a solution for driver program debugging in the embedded field. The process of embedded product development is often to design the development board by itself according to the specific application, and then transplant the embedded system to the development board to run, which requires the embedded system to adapt the hardware of the specific development board, and the board-level support package (Hardware driver) development is an important link in hardware adaptation. [0003] Good debugging tools play an important role in efficient and fast hardware driver adaptation. Due to the characteristics of the embedded system itself, cross-debugging has to be used in the development process, that is, the debugging tool and the program to be debugged run on different machines (host machin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3644G06F11/3664
Inventor 李孝成
Owner NANJING ACOINFO TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products