CN100359486C - Method and apparatus for debugging internal core state programm of operation system - Google Patents

Method and apparatus for debugging internal core state programm of operation system Download PDF

Info

Publication number
CN100359486C
CN100359486C CNB2004100098519A CN200410009851A CN100359486C CN 100359486 C CN100359486 C CN 100359486C CN B2004100098519 A CNB2004100098519 A CN B2004100098519A CN 200410009851 A CN200410009851 A CN 200410009851A CN 100359486 C CN100359486 C CN 100359486C
Authority
CN
China
Prior art keywords
kernel
debugging
thread
foreground
stubs
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.)
Active
Application number
CNB2004100098519A
Other languages
Chinese (zh)
Other versions
CN1779652A (en
Inventor
刘飞
程圣宇
李翌
缪敬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Electronic Innovation Co.,Ltd.
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CNB2004100098519A priority Critical patent/CN100359486C/en
Publication of CN1779652A publication Critical patent/CN1779652A/en
Application granted granted Critical
Publication of CN100359486C publication Critical patent/CN100359486C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention discloses a method and an apparatus for debugging an internal core state program of an operation system. The method comprises the steps that by setting a debugging picket module operating in an internal core state and a foreground debugging agent module in a user state, the foreground debugging agent module and the debugging picket module communicate. The debugging picket module receives debugging information from the foreground debugging agent module, controls the operation of an internal core linear program and obtains abnormal information of the internal core linear program. The internal core linear program sends the abnormal information to the debugging picket module. The debugging picket module sends the abnormal information to the foreground debugging agent module, and the abnormal information returns to a debugger from the foreground debugging agent module, and thereby, the debugger debugs the program in the internal core state. The present invention overcomes the disadvantage that an ordinary debugger can not debug and operate the program in the internal core state of the operating system.

Description

A kind of method and device of debugging operations system kernel attitude program
Technical field
The present invention relates to a kind of adjustment method and device of operating system nucleus attitude program, particularly relate to a kind of method and device that can use common debugger that the kernel state program is debugged.
Background technology
Operating system two kinds of run modes that have been thought of as program design: user's attitude and kernel state for safety.Common applications operates in user's attitude, and part separate procedure and operating system itself operate in kernel state.Present debugger design is debugged the program of user's attitude, for the program of kernel state, can only use printing or special chip debugging interface to debug, and its shortcoming is:
1) using Method of printing is not have debug function in fact, fully rule of thumb imitated print statement, and must recompilate, cause debugging efficiency low. at every turn
2) use the using method of special chip debugging interface relevant, have nothing in common with each other, long learning cycle is arranged with chip.
3) chip debugging interface can only carry out the debugging of original statement, can not the aware processes state, and information such as internal memory use are used very inconvenient.
Above all inconvenience makes the debugging of kernel state program very inconvenient, has also caused the difficulty of exploitation.Therefore common practices is to reduce writing of kernel state program as far as possible, the program that quick-reading flow sheets such as only will drive is put into kernel state, and other parts are placed on the operation of user's attitude, expectation remedies the difficulty of debugging with simple kernel state program, but this is not basic solution, and for the higher real-time application of performance requirement, should program be put into kernel state as far as possible, to reduce the expense of switching between the different running statuses, therefore, press for a kind of method that can conveniently carry out program debug at kernel state.
Summary of the invention
Technical matters to be solved by this invention provides a kind of method and device of debugging operations system kernel attitude program, solve common debugger can not commissioning test in the shortcoming of the program of operating system nucleus attitude.
For achieving the above object, the invention provides a kind of method of debugging operations system kernel attitude program, its characteristics are, by debugging stubs that is arranged to operate in kernel state and the foreground debugging proxy module that operates in user's attitude, described foreground debugging proxy module and described debugging stubs are communicated, and described debugging stubs receives the operation of Debugging message from described foreground debugging proxy module, control kernel thread and obtains the abnormal information of kernel thread; Described kernel thread sends to described debugging stubs with described abnormal information, described debugging stubs sends to described abnormal information described foreground debugging proxy module and returns to debugger by described foreground debugging proxy module, thereby makes debugger carry out debugging to the kernel state program.
Above-mentioned method, its characteristics are that the operation control of described kernel thread comprises: the internal memory of breakpoint abnormality processing, single step abnormality processing, kernel Signal Processing, read/write kernel and the register of read/write kernel.
Above-mentioned method, its characteristics are that described abnormal information comprises breakpoint abnormal information and/or single step abnormal information.
Above-mentioned method, its characteristics are that described breakpoint abnormality processing comprises: run into after the breakpoint, trigger once unusual, judge that this is that common kernel exception or real breakpoint is unusual unusually, if common kernel exception then changes common kernel exception handling procedure over to; If breakpoint is unusually then carried out normal breakpoint handling procedure.
Above-mentioned method, its characteristics are, described breakpoint abnormality processing further comprises: if debugged kernel thread stops at common kernel spacing, then described is not that real breakpoint is unusual unusually, the execution of a single step of emulation turns back to the kernel application space earlier thread from common kernel spacing; If debugged kernel thread stops at the kernel application space, then described is that real breakpoint is unusual unusually; Unusual if kernel thread itself takes place, then described is that real breakpoint is unusual unusually.
Above-mentioned method, its characteristics are that described single step abnormality processing comprises: judge it is that common kernel exception or real single step is unusual unusually, if common kernel exception then changes common kernel exception handling procedure over to; If normal single step exception handler is unusually then carried out in real single step.
Above-mentioned method, its characteristics are that described single step abnormality processing further comprises: if thread operates in common kernel spacing, then this is not that real single step is unusual unusually, withdraws from this abnormality processing, returns the original program at thread place; If this thread is a kernel thread, then this is that real single step is unusual unusually, changes normal single step exception handler over to.
Above-mentioned method, its characteristics are, described kernel signal Processing comprises: open the signal shielding of breakpoint abnormal signal, single step abnormal signal and the stop signal of debugged kernel thread, make kernel thread can handle this signal when receiving described three kinds of signals; Increase signal Processing opportunity, in debugging, make kernel thread when common kernel spacing jumps to the kernel thread space, carry out one time signal Processing.
Above-mentioned method, its characteristics are that the memory headroom of described read/write kernel comprises: kernel debugging stake judges whether this time read/write occurs in debugging mode, is the task of then taking over this time read/write memory by kernel debugging stake.
Above-mentioned method, its characteristics be, the memory headroom that kernel is read in described kernel debugging stake comprises: the address of visit is checked seen and judge that described address whether within the scope of kernel spacing, is then to carry out next step, otherwise carries out abnormality processing; If the length that read operation will copy is L, L=m * 4+n * 2+k * 1 then, wherein m represents what 4 bytes are this length have, what 2 bytes n also is left after representing to deduct all 4 bytes, what 1 bytes k also is left after representing to deduct all 4 bytes and 2 bytes, copy m nybble successively according to start address, n 2 bytes, k 1 byte; If make mistakes, then carry out abnormality processing.
Above-mentioned method, its characteristics are, the register of described read/write kernel comprises: kernel debugging stake judges that this time read-write register is after occurring in debugging mode, carry out following steps: increase a member variable newly to task control block (TCB), the value of stack pointer will be current unusual generation the time is saved in this member variable when entering unusual or interrupting; Value with this member variable when reading register reads the value that each preceding unusually register takes place as the base address; When withdrawing from unusual or interrupting, empty this member variable; Carry out particular processing in read-write in the SP, with current member variable value add SP in the position of register architecture the value as the current stack pointer register.
Above-mentioned method, its characteristics be, the operation of described control kernel thread also obtains the abnormal information of kernel thread, is to realize by the code that the crucial function place in system adds the debugging stubs.
Above-mentioned method, its characteristics are, further comprise the steps: step 1, and by the mode of system call, described foreground debugging proxy module sends Debugging message to described debugging stubs, and described debugging stubs receives described Debugging message; Step 2, described debugging stubs carries out respective handling to described Debugging message; Step 3 is carried out the breakpoint abnormality processing; Step 4 is carried out the single step abnormality processing; Step 5 is carried out the kernel signal Processing; Step 6, read-write kernel memory headroom; Step 7, the register of read-write kernel; Step 8 returns to foreground debugging proxy module with described abnormal information, memory content or content of registers.
In order better to realize purpose of the present invention, the present invention also provides a kind of device of debugging operations system kernel attitude program, its characteristics are, comprising: debugger, foreground debugging proxy module, debugging stubs, kernel application module and kernel thread module; Described debugger connects described foreground debugging proxy module, and described foreground debugging proxy module connects described debugging stubs and described kernel application module, and described kernel thread module connects described debugging stubs and described kernel application module; Described debugging stubs, kernel thread module and kernel application module operate in kernel state, the foreground debugging proxy module and the described debugging stubs that operate in user's attitude communicate, and described debugging stubs receives the operation of Debugging message from described foreground debugging proxy module, control kernel thread and obtains the abnormal information of kernel thread; Described kernel thread module sends to described debugging stubs with described abnormal information, described debugging stubs returns to described status information described foreground debugging proxy module and returns to debugger by described foreground debugging proxy module, thereby makes debugger carry out debugging to the kernel state program.
Technique effect of the present invention is:
The method of the invention has designed a kernel that operates in kernel state and has debugged stake, debugger is by kernel debugging stake control kernel thread and return message, thereby solved the great difficult problem that debugger can not be debugged kernel thread, made that the debugging kernel thread is equally convenient with debugging consumer process or user thread.And this debugging stake is to exist with form independently, and is related with operating system less, can be transplanted on the various general-purpose operating systems.
Further describe specific embodiments of the invention below in conjunction with accompanying drawing.
Description of drawings
Fig. 1 is the debug system configuration diagram;
Fig. 2 debugs stake and forms structural drawing;
Fig. 3 breakpoint abnormality processing process flow diagram;
Fig. 4 single step abnormality processing process flow diagram.
Embodiment
The present invention for overcome common debugger can not commissioning test in the shortcoming of operating system nucleus attitude program, new debugging framework has been proposed, as shown in Figure 1, the debug system framework specifically comprises: design a kernel debugging stake 11, this debugging 11 operates in kernel state.Debugging proxy 12 people having the same aspiration and interest test piles 11 in foreground communicate, the operation of these debugging stake 11 control kernel threads 13.Kernel thread 13 feeds back to debugging stake 11 with abnormal information when running into anomalous event, after this abnormal information is received in debugging stake 11 this information is returned to foreground debugging proxy 12, and foreground debugging proxy 12 receives that this message returns to debugger 14.Thereby can make things convenient for the kernel state procedure development with the program of common user mode debugger 14 debugging kernel modes.
Method of the present invention specifically comprises following step:
Step 1: the foreground debugging proxy sends Debugging message to kernel debugging stake.Kernel debugging stake receives the information that user's attitude foreground debugging proxy sends over.It is to finish by the mode of system call that information sends.
Step 2: kernel debugging stake is carried out respective handling according to command information.Handle the information that the foreground debugging proxy sends over.
Step 3: breakpoint abnormality processing:
It is unusual to trigger a breakpoint after running into a breakpoint, because current abnormality processing occurs in kernel state, so we take over current unusual.Judge it be breakpoint unusually or once common kernel exception.If common kernel exception then changes in the common kernel exception handling procedure and goes, otherwise change our breakpoint exception handler over to.Concrete steps are as follows:
To judge at first in abnormality processing whether debugged kernel thread stops at common kernel spacing, if, the execution of a single step of emulation, allow it turn back to the kernel application space from common kernel spacing earlier.It is unusual to that is to say that the breakpoint that only occurs in kernel application is only real breakpoint unusually, handles otherwise jump to single step.
If kernel thread takes place that this is unusual, think that then a breakpoint is unusual, rather than kernel exception.Therefore must forward in the normal breakpoint handling procedure.
Step 4: single step abnormality processing:
The same with above-mentioned step 3, if common kernel exception then changes in the common kernel exception handling procedure and goes, should be unusual otherwise take over by kernel debugging stake, concrete steps are as follows:
In this abnormality processing, at first to judge whether to operate in common kernel spacing, if, then withdraw from this abnormality processing, move this program continuously.
Otherwise, judge that this thread is a kernel thread, if change normal single step exception handler over to.
Step 5: kernel signal Processing:
In our method; the realization of final debugging method is all finished by signal; because unusual or single step is unusual at breakpoint take place after; the capital sends the unusual or single step abnormal signal of a breakpoint to it oneself; when withdrawing from abnormality processing, handle this signal then, wake parent process up.
We at first need to open 3 signal shieldings such as the breakpoint of debugged kernel thread is unusual, single step abnormal signal, stop signal, make kernel thread can handle this signal when receiving these signals.
Increased signal Processing opportunity, in debugging, kernel thread can carry out one time signal Processing when common kernel spacing jumps to the kernel thread space.
Step 6: read-write kernel memory headroom.At first kernel debugging stake judges whether this time read-write occurs in debugging mode, if then kernel is debugged the task that this time read/write memory is taken in stake, kernel memory headroom branch following steps are read in kernel debugging stake:
At first the address of visit is checked and seen whether within the scope of kernel spacing.
If copy length is L, L=m*4+n*2+k*1 then, m represent what 4 bytes are this length have, and n represents to deduct also remaining what 2 bytes after so much 4 bytes, k and the like.
Copy m nybble successively according to start address, n 2 bytes, k 1 byte.
If make mistakes, then carry out abnormality processing.
Step 7: the register of read-write kernel.At first kernel debugging stake judges whether this time read-write register occurs in debugging mode, if then kernel is debugged the task that current read-write register is taken in stake, the step of kernel debugging stake read-write register is as follows:
At first, increase a member variable newly to task control block (TCB), the value of stack pointer will be current unusual generation the time is saved in this member variable when entering unusual or interrupting.
Value with this member variable when reading register reads the value that each preceding unusually register takes place as the base address.
When withdrawing from unusual or interrupting, empty this member variable.
In the read-write SP, carry out particular processing, current member variable value is added that SP is exactly the value of current stack pointer register in the position of register architecture.
Step 8: abnormal information or memory content or content of registers are returned to the foreground debugging proxy.
Below in conjunction with accompanying drawing, be described in further detail with the row that are applied as of the present invention on (SuSE) Linux OS:
The kernel state program of (SuSE) Linux OS enters the kernel operation with the form of using module loading, so the kernel state application program exists with the form of kernel module.As Fig. 1, principle shown in Figure 2 also comprises command processing module 111 and abnormality processing module 112 in the kernel debugging stake 11, and the function of kernel debugging stake 11 is: 1) know the kernel state running state of programs; 2) provide visit 3 to internal memory and register) operation of control kernel state program, below narrate specific implementation respectively:
Know the kernel state running state of programs
After linux kernel debugging stake enters kernel, at first handle at system exception, system core function (as process creation, deletion etc.) locates to add the processing code of oneself, it is exactly exception handling code that this section handled code, and concrete can be divided into breakpoint exception handling code and single step exception handling code;
Breakpoint abnormality processing process flow diagram wherein comprises as shown in Figure 3:
Step 301, breakpoint takes place after, judge whether to be in common kernel, be execution in step 305 then, otherwise execution in step 302;
Step 302 judges whether thread is kernel thread and is in tracking mode, is execution in step 307 then, otherwise execution in step 303;
Step 303 judges whether to be in common kernel spacing, is execution in step 304 then, otherwise execution in step 307;
Step 304 changes kernel exception over to and handles, and forwards step 308 to;
Step 305 is put and is withdrawed from common kernel sign;
Step 306, the operation of a single step of simulation forwards step 308 to;
Step 307 sends abnormal signal to tracked process;
Step 308 is returned original program.
Single step abnormality processing flow process comprises as shown in Figure 4
Step 401 judges whether thread operates in common kernel spacing, is execution in step 405 then, otherwise execution in step 402;
Step 402 judges whether this thread is consumer process, is execution in step 403 then, otherwise execution in step 404;
Step 403 is handled Hardware Breakpoint;
Step 404 sends the single step signal to the current inner thread, forwards step 406 to;
Step 405 is forbidden the single step execution;
Step 406 is returned original program.
After unusual generation of single step unusual at the breakpoint of Fig. 3 or Fig. 4, can enter in the processing code of our setting, we can send a signal and turn back to the debugging stake at the end of handling code, carry out following processing then:
If (when the program of pre-treatment is debugged program)
{
Record present procedure executing state
The operation of if (being abnormality processing) time out program, and notice debugger
}
The text-processing function is returned in redirect
By above operation, the kernel stubs can unusual time notice debugger occur in debugged kernel state program to be debugged, and creates and during deletion, can know its state, for the debugger inquiry in that program is new.
Visit to internal memory and register
Be divided into two, the visit of first pair of internal memory: at first the request of foreground debugging proxy transmission read/write memory is to the debugging stake, and the debugging stake receives after this request that this asks formal definition as follows:
#define?PTRACE_PEEKTEXT 1
#define?PTRACE_POKETEXT 4
The expression space of reading the specified memory space and writing specified memory respectively, this debugging stake receives that this request at first judges that this address is whether within kernel spacing afterwards, if, then think to visit the kernel application space, the safe copy function of Start-up and Adjustment stake, the safe copy flow process as shown in Figure 3.
Second is the visit to register; the debugging stake is received after the request of read-write register; obtain and take place to preserve unusual the time; this value is to preserve when kernel takes place unusual or interrupts; we have newly opened a space; be used for preserving the value of this stack pointer specially, open at the end of task control block (TCB) in this space
task_struct{…………….
void?*kth;
int *kth_esp_stack;
}
Kth_esp_stack preserves preserves address value after on-the-spot when being unusual the generation, but preserve rule according to the on-the-spot storehouse of user's attitude, stack pointer value when drawing the kernel thread operation is (* kth_esp_stack)+0x34, so just adds that according to this base address the side-play amount of each register draws the value of each register.
The operation of control kernel state program, the foreground debugging proxy is ordered as shown in the table by sending the operation of following debug command to the debugged program of debugging stake control:
#define PTRACE_CONT 7 continuous active threads
#define PTRACE_KILL 8 kills thread
#define PTRACE_SINGLESTEP 9 single step threads
#define PTRACE_ATTACH 0x10 is with thread of palm fibre
#define PTRACE_DETACH 0x11 removes a thread and follows the tracks of
The debugging proxy stake is received after the above order:
Switch (order)
{
Case continues the active thread order:
Call the debugging stake and continue the action command interface
Case follows the tracks of given thread:
Call the debugging stake and follow the tracks of the given thread interface
…………………….
}
So just realized control function to the given core program.
As from the foregoing, the inventive method has designed a kernel that operates in kernel state and has debugged stake, debugger is by kernel debugging stake control kernel thread and return message, thereby solved the great difficult problem that debugger can not be debugged kernel thread, made that the debugging kernel thread is equally convenient with debugging consumer process or user thread.And this debugging stake is to exist with form independently, and is related with operating system less, can be transplanted on the various general-purpose operating systems.
The above is preferred embodiment of the present invention only, is not to be used for limiting practical range of the present invention; Every according to equivalence variation and modification that the present invention did, all contained by claim of the present invention.

Claims (14)

1, a kind of method of debugging operations system kernel attitude program, it is characterized in that, by debugging stubs that is arranged to operate in kernel state and the foreground debugging proxy module that operates in user's attitude, described foreground debugging proxy module and described debugging stubs are communicated, and described debugging stubs receives the operation of Debugging message from described foreground debugging proxy module, control kernel thread and obtains the abnormal information of kernel thread; Described kernel thread sends to described debugging stubs with described abnormal information, described debugging stubs sends to described abnormal information described foreground debugging proxy module and returns to debugger by described foreground debugging proxy module, thereby makes debugger carry out debugging to the kernel state program.
2, method according to claim 1 is characterized in that, the operation control of described kernel thread comprises: the internal memory of breakpoint abnormality processing, single step abnormality processing, kernel Signal Processing, read/write kernel and the register of read/write kernel.
3, method according to claim 2 is characterized in that, described abnormal information comprises breakpoint abnormal information and/or single step abnormal information.
4, method according to claim 3, it is characterized in that, described breakpoint abnormality processing comprises: run into after the breakpoint, trigger once unusual, judge that this is that common kernel exception or real breakpoint is unusual unusually, if common kernel exception then changes common kernel exception handling procedure over to; If breakpoint is unusually then carried out normal breakpoint handling procedure.
5, method according to claim 4 is characterized in that, described breakpoint abnormality processing further comprises:
If debugged kernel thread stops at common kernel spacing, then described is not that real breakpoint is unusual unusually, and the execution of a single step of emulation turns back to the kernel application space earlier thread from common kernel spacing;
If debugged kernel thread stops at the kernel application space, then described is that real breakpoint is unusual unusually;
Unusual if kernel thread itself takes place, then described is that real breakpoint is unusual unusually.
6, method according to claim 3 is characterized in that, described single step abnormality processing comprises: judge it is that common kernel exception or real single step is unusual unusually, if common kernel exception then changes common kernel exception handling procedure over to; If normal single step exception handler is unusually then carried out in real single step.
7, method according to claim 6 is characterized in that, described single step abnormality processing further comprises: if thread operates in common kernel spacing, then this is not that real single step is unusual unusually, withdraws from this abnormality processing, returns the original program at thread place; If this thread is a kernel thread, then this is that real single step is unusual unusually, changes normal single step exception handler over to.
8, according to claim 2,3,4,5,6 or 7 described methods, it is characterized in that, described kernel signal Processing comprises: open the signal shielding of breakpoint abnormal signal, single step abnormal signal and the stop signal of debugged kernel thread, make kernel thread can handle this signal when receiving described three kinds of signals; Increase signal Processing opportunity, in debugging, make kernel thread when common kernel spacing jumps to the kernel thread space, carry out one time signal Processing.
9, method according to claim 8 is characterized in that, the memory headroom of described read/write kernel comprises: kernel debugging stake judges whether this time read/write occurs in debugging mode, is the task of then taking over this time read/write memory by kernel debugging stake.
10, method according to claim 9 is characterized in that, the memory headroom that kernel is read in described kernel debugging stake comprises:
The address of visit checked see and judge that described address whether within the scope of kernel spacing, is then to carry out next step, otherwise carries out abnormality processing;
If the length that read operation will copy is L, L=m * 4+n * 2+k * 1 then, wherein m represents what 4 bytes are this length have, what 2 bytes n also is left after representing to deduct all 4 bytes, what 1 bytes k also is left after representing to deduct all 4 bytes and 2 bytes, copy m nybble successively according to start address, n 2 bytes, k 1 byte;
If make mistakes, then carry out abnormality processing.
11, method according to claim 8 is characterized in that, the register of described read/write kernel comprises: kernel debugging stake judges that this time read-write register is after occurring in debugging mode, carries out following steps:
Increase a member variable newly to task control block (TCB), the value of stack pointer will be current unusual generation the time is saved in this member variable when entering unusual or interrupting;
Value with this member variable when reading register reads the value that each preceding unusually register takes place as the base address;
When withdrawing from unusual or interrupting, empty this member variable;
Carry out particular processing in read-write in the SP, with current member variable value add SP in the position of register architecture the value as the current stack pointer register.
12, method according to claim 8 is characterized in that, the operation of described control kernel thread also obtains the abnormal information of kernel thread, is to realize by the code that the crucial function place in system adds the debugging stubs.
13, method according to claim 1 is characterized in that, further comprises the steps:
Step 1, by the mode of system call, described foreground debugging proxy module sends Debugging message to described debugging stubs, and described debugging stubs receives described Debugging message;
Step 2, described debugging stubs carries out respective handling to described Debugging message;
Step 3 is carried out the breakpoint abnormality processing;
Step 4 is carried out the single step abnormality processing;
Step 5 is carried out the kernel signal Processing;
Step 6, read-write kernel memory headroom;
Step 7, the register of read-write kernel;
Step 8 returns to foreground debugging proxy module with described abnormal information, memory content or content of registers.
14, a kind of device of debugging operations system kernel attitude program is characterized in that, comprising: debugger, foreground debugging proxy module, debugging stubs, kernel application module and kernel thread module;
Described debugger connects described foreground debugging proxy module, and described foreground debugging proxy module connects described debugging stubs and described kernel application module, and described kernel thread module connects described debugging stubs and described kernel application module;
Described debugging stubs, kernel thread module and kernel application module operate in kernel state, the foreground debugging proxy module and the described debugging stubs that operate in user's attitude communicate, and described debugging stubs receives the operation of Debugging message from described foreground debugging proxy module, control kernel thread and obtains the abnormal information of kernel thread; Described kernel thread module sends to described debugging stubs with described abnormal information, described debugging stubs returns to described status information described foreground debugging proxy module and returns to debugger by described foreground debugging proxy module, thereby makes debugger carry out debugging to the kernel state program.
CNB2004100098519A 2004-11-24 2004-11-24 Method and apparatus for debugging internal core state programm of operation system Active CN100359486C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100098519A CN100359486C (en) 2004-11-24 2004-11-24 Method and apparatus for debugging internal core state programm of operation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100098519A CN100359486C (en) 2004-11-24 2004-11-24 Method and apparatus for debugging internal core state programm of operation system

Publications (2)

Publication Number Publication Date
CN1779652A CN1779652A (en) 2006-05-31
CN100359486C true CN100359486C (en) 2008-01-02

Family

ID=36769988

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100098519A Active CN100359486C (en) 2004-11-24 2004-11-24 Method and apparatus for debugging internal core state programm of operation system

Country Status (1)

Country Link
CN (1) CN100359486C (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446918B (en) * 2008-12-10 2011-12-28 中兴通讯股份有限公司 Method for realizing debugging of single function by user state debugger and system thereof
CN102063366B (en) * 2009-11-18 2014-12-31 中兴通讯股份有限公司 Method and system for debugging process
CN102346708B (en) * 2010-08-03 2014-07-16 中兴通讯股份有限公司 Debugger and debugging method thereof
CN102467447A (en) 2010-11-16 2012-05-23 鸿富锦精密工业(深圳)有限公司 Driver debugging system and method
CN102486758B (en) * 2010-12-01 2015-01-28 中兴通讯股份有限公司 Method and device for accessing coprocessor register
CN103793325A (en) * 2014-01-24 2014-05-14 深圳市同洲电子股份有限公司 Kernel debugging method and system
CN105354136B (en) 2015-09-25 2018-06-15 华为技术有限公司 A kind of adjustment method, multi-core processor and commissioning device
CN105224454B (en) * 2015-09-25 2018-06-05 华为技术有限公司 A kind of adjustment method, polycaryon processor and commissioning device
CN107451046B (en) * 2016-05-30 2020-11-17 腾讯科技(深圳)有限公司 Method and terminal for detecting threads
CN106201892B (en) * 2016-07-20 2019-02-01 中国航空工业集团公司航空动力控制系统研究所 Abnormal interrupt source position finding and detection method for embedded software
CN109144873B (en) * 2018-08-22 2022-05-06 郑州云海信息技术有限公司 Linux kernel processing method and device
CN110109761B (en) * 2019-05-11 2021-06-04 广东财经大学 Method and system for managing kernel memory of operating system in user mode
CN110597705B (en) * 2019-07-30 2023-01-20 广东工业大学 Program debugging method and device capable of repeatedly acquiring test data
CN112463662B (en) * 2020-12-16 2024-04-05 福州创实讯联信息技术有限公司 Method and terminal for user mode control of I2C equipment
CN114035855B (en) * 2021-09-30 2023-10-27 鸣芯信息科技(上海)有限公司 Firmware debugging method, device, terminal and storage medium
CN115098402B (en) * 2022-07-25 2023-01-06 摩尔线程智能科技(北京)有限责任公司 Debugging method and debugging device
CN115220978B (en) * 2022-09-19 2023-02-03 瀚博半导体(上海)有限公司 Chip starting method and device including online debugging mode, chip and equipment
CN116089316B (en) * 2023-04-07 2023-06-09 武汉凌久微电子有限公司 Kernel driving data debugging method based on dynamic breakpoint

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4993027A (en) * 1988-09-09 1991-02-12 Pace, Incorporated Method and apparatus for determining microprocessor kernal faults
CN1133455A (en) * 1994-12-28 1996-10-16 株式会社东芝 Microprocessor and testing system
US20030009548A1 (en) * 2001-07-03 2003-01-09 Todd Poynor Debugging an operating system kernel with debugger support in a network interface card

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4993027A (en) * 1988-09-09 1991-02-12 Pace, Incorporated Method and apparatus for determining microprocessor kernal faults
CN1133455A (en) * 1994-12-28 1996-10-16 株式会社东芝 Microprocessor and testing system
US20030009548A1 (en) * 2001-07-03 2003-01-09 Todd Poynor Debugging an operating system kernel with debugger support in a network interface card

Also Published As

Publication number Publication date
CN1779652A (en) 2006-05-31

Similar Documents

Publication Publication Date Title
CN100359486C (en) Method and apparatus for debugging internal core state programm of operation system
CN101295279B (en) Method and system for debugging program in multi-threading surroundings
US6775826B1 (en) System and method for replaying workload data in a data storage environment
US7950001B2 (en) Method and apparatus for instrumentation in a multiprocessing environment
US8856742B2 (en) Distributed debugging
CN101887393B (en) Equipment fault reproduction method and system based on para-virtualization technique
US6981248B2 (en) Conditional breakpoint encountered indication
US20080244325A1 (en) Automated software support system with backwards program execution and debugging
CN101446918B (en) Method for realizing debugging of single function by user state debugger and system thereof
US20040268315A1 (en) System and method for processing breakpoint events in a child process generated by a parent process
CN1306639A (en) Real time debugger interface for embedded systems
CN102346235A (en) Automatic test system and method for hardware device function
CN101976187A (en) Stack tracing method and device in decompilation process and decompiler
US7793160B1 (en) Systems and methods for tracing errors
CN102831054A (en) Program breakpoint processing method and device
CN102467446A (en) Processor chip emulator capable of setting program pointer value
CN102708015A (en) Debugging method based on diagnosis of CPU (central processing unit) non-maskable interrupt system problems
US10162324B2 (en) Method for manipulating a control program of a control device
US8819641B1 (en) Program state reversing software development tool
CN105095079A (en) Method and device for hot spot module instruction tracking
CN100474266C (en) Debugging system used for digital signal processor and debug method thereof
CN101329650A (en) Smart card emulator
CN110727577B (en) Debugging method, system and medium for probability reproduction problem in embedded system software
CN107315685A (en) A kind of real-time adjustment method of non-invasive procedure
JPH05108404A (en) Debugger system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211221

Address after: Illinois, America

Patentee after: Electronic Innovation Co.,Ltd.

Address before: Delaware

Patentee before: Electronic Innovation Co.,Ltd.

Effective date of registration: 20211221

Address after: Delaware

Patentee after: Electronic Innovation Co.,Ltd.

Address before: 518057 Zhongxing building, science and technology south road, Nanshan District hi tech Industrial Park, Guangdong, Shenzhen

Patentee before: ZTE Corp.

TR01 Transfer of patent right
CI03 Correction of invention patent

Correction item: transfer of patent right

Correct: Electronic innovation China Co.,Ltd.

False: Electronic Innovation Co.,Ltd.

Number: 53-02

Volume: 37

CI03 Correction of invention patent