CN108829591A - A kind of synergic debugging system and method based on Web - Google Patents

A kind of synergic debugging system and method based on Web Download PDF

Info

Publication number
CN108829591A
CN108829591A CN201810552504.2A CN201810552504A CN108829591A CN 108829591 A CN108829591 A CN 108829591A CN 201810552504 A CN201810552504 A CN 201810552504A CN 108829591 A CN108829591 A CN 108829591A
Authority
CN
China
Prior art keywords
debugging
module
web
request
synergic
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
Application number
CN201810552504.2A
Other languages
Chinese (zh)
Other versions
CN108829591B (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.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN201810552504.2A priority Critical patent/CN108829591B/en
Publication of CN108829591A publication Critical patent/CN108829591A/en
Application granted granted Critical
Publication of CN108829591B publication Critical patent/CN108829591B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The present invention relates to a kind of synergic debugging system and method based on Web, user can directly Remote Procedure be debugged in operation on browser interface, not only have and support good graphic interface, but also Debugging message can be obtained in real time, completes debugging efforts to be more clear intuitive way;On the other hand, synergic debugging function allows the uneasy assembly of debugging user to set local debugging enironment, as long as issuing debugging request to remote server, once obtaining debugging permission, it can be debugged as local, greatly reduce debugging cost in this way, improve debugging efficiency;It is somebody's turn to do the synergic debugging system and method based on Web simultaneously, it can extend to other debugging applications other than operating system kernel level debugging, meet different debugging demands, it is strong with scalability, feature applied widely, the advantages of combining Web technology and debugging technique provides preferable solution to realize that Web is cross-platform, visualizes debugging.

Description

A kind of synergic debugging system and method based on Web
Technical field
The present invention relates to Internet technical field, in particular to a kind of synergic debugging system and method based on Web.
Background technique
With the development of 2.0 technology of Web, realize that system-level application has become the master of modern technologies based on Web technology Stream.Gradually it has been changed into the application technology of C/S (client/server) mode and has been with B/S (browser/server) mode Main low cost, lightweight application, and be used widely in all trades and professions.
J2EE technology is a kind of enterprise web application exploitation solution based on Java, not only inherits Java platform Plurality of advantages, while additionally providing to EJB (Enterprise JavaBeans), Java Servlets API, JSP (Java Server Pages) and XML technology comprehensive support, enormously simplify enterprise-level application development.In addition, integrated as one Development platform, J2EE have many advantages, such as that availability is strong, high reliablity, scalability are good again.
Debugging is essential link in modern software exploitation, and is generally required specially for operating system kernel level debugging The debugging tool of door, such as debugging tool GDB popular at present, such one side developer need to configure specific tune Test ring border, increases debugging cost;On the other hand, Debugging message is often difficult to directly understand, increases the debugging of ordinary user Difficulty.
GDB/MI is a kind of more important other than CLI (Command Line Interface) order of GDB offer Command interface, it commonly used in building complication system debugging tool, deposited as a debugging component in complication system ?.For example, the GUI debugger using GDB as debugging tool realized in Insight just takes full advantage of GDB/MI.But It is that the output information format of GDB/MI is complex, needing to be familiar with its format could correct understanding.
QEMU is the widely used open source simulator on GNU/Linux platform, and with lightweight, speed is fast, it is more to support The advantages that kind platform architecture.QEMU supports two kinds of operating modes of user class mode and system-level mode, wherein system-level operations mould Formula can be such that unmodified kernel or operating system runs under simulated environment, be that system debug and cross-platform operate Provide good platform.
The existing debugging tool for operating system kernel level application does not have friendly gui interface usually, and debugs Process is complicated, needs higher debugging cost.
Summary of the invention
In view of the above problems, the present invention provides a kind of synergic debugging system and method based on Web, the system be based at Ripe Web development technique and platform are, it can be achieved that convenient, friendly, efficient system debug.
In a first aspect, the embodiment of the present invention provides a kind of synergic debugging system based on Web, including the figure based on Web Change debugging platform and system debug frame;
The graphical debugging platform based on Web includes:
Web client browser module debugs GDB server for sending debugging request to HTTP server module The Debugging message that module returns is presented to the user;
HTTP server module, for receiving the debugging request, and by the output of GDBWrapper message conversion module As a result user client browser is returned to;
GDBWrapper message conversion module, for receiving the debugging request of the HTTP server resume module, And the debugging request is sent to GDB server debugging module;And receive the transmission of the GDB server debugging module The debugging result is returned to the HTTP server module by debugging result;
GDB server debugging module will be adjusted for debugging the corresponding goal systems of the debugging request and application program Test result returns to GDBWrapper message conversion module.
The synergic debugging frame includes:
Synergic debugging user management module is managed for all debugging users to be divided into multiple debugging groups, and according to User's request is that user creates a new debugging group or user is added to existing debugging group;Each debugging group has unique Indicate that ID, Debugging message received by the user of the same debugging group are identical;
Synergic debugging authority management module, for determining whether the user to be debugged of each debugging group possesses unique Token; Each debugging group Session safeguards a unique Token, when the user for possessing Token has permission transmission debug command;
Synergic debugging message managing module will for using unified management mechanism to the debugging request and debugging result Each debugging request and debugging result return to all debugging members of corresponding debugging group, by using database caches machine System guarantees the consistency of Debugging message.
In one embodiment, the debugging request includes one or more of order:
Suspend Pause, operation Run, Step single step, setting breakpoint Set Breakpoint, delete breakpoint Remove Breakpoint, it setting point of observation Set Watchpoint, deletes point of observation Remove Watchpoint, check specified memory Information Memory, it checks register information Register and exits Quit.
In one embodiment, the Debugging message includes one or more of information:
Thread stacks information, order execute the GDB Debugging message returned, breakpoint list information, point of observation when system is run List information, specified memory data information and register data information.
In one embodiment, the GDBWrapper message conversion module, specifically for browsing the Web client The JSON formatted data that device module is sent is converted to the executable debug command of GDB server, and by the GDB server tune The debugging result that die trial block returns is converted to the html format data that the Web client browser module is shown.
In one embodiment, the debug command of the JSON formatted data, specific format are:
[GID][COMMAND]:[debugging event].
In one embodiment, the format of the debugging result is:
[GID][COMMAND]:[debugging event] [thread stacks] [breakpoint list] [memory information] [register information].
Second aspect, the embodiment of the present invention provide a kind of synergic debugging method based on Web, the method includes:It is based on Graphical debugging platform pretreatment operation, synergic debugging pretreatment operation, debugging breakpoints operation and the synergic debugging operation of Web;
The graphical debugging platform pretreatment operation based on Web, includes the following steps:
(11) the graphical debugging platform based on Web starts a HTTP service according to preconfigured debugging port Device module, and record server address URL;
(12) the Web client browser module inputs server address URL, sends HTTP to HTTP server module Request;
(13) the GDBWrapper message conversion module and GDB server debugging module initialize;
The synergic debugging pretreatment operation, includes the following steps:
(21) debugging user logs in debugging system by corresponding authority;
(22) the synergic debugging user management module according to user request be user create a new debugging group or It is added to an existing debugging group;
The debugging breakpoints operation, includes the following steps:
(31) the graphical debugging platform based on Web requests search correlation function or global variable according to user, Selection needs to be arranged the correlation function or global variable of breakpoint in Web client browser module;
(32) the Web client browser module issues setting breakpoint request, by the setting breakpoint request and correlation Function or global variable are sent to HTTP server module;
(33) breakpoint request is sent to GDBWrapper message conversion module and carried out by the HTTP server module Message conversion, and the setting breakpoint request and correlation function or the corresponding debugging request of global variable are sent to GDB Server debugging module executes debug command;
(34) the GDB server debugging module returns breakpoint list information, thread information and the console message of return It returns GDBWrapper message conversion module and carries out message conversion, and the debugging result after conversion is returned into HTTP server mould Block;
Synergic debugging operation, includes the following steps:
(41) the synergic debugging user management module is that first debugging user creates a debugging example, the debugging One debugging group information of Example maintenance and a debugging Token;
(42) the debugging user of debugging group is newly added, issues acquisition Token to the synergic debugging authority management module and asks It asks;After request is confirmed, debugging permission is obtained;
(43) the synergic debugging message managing module is all tune of the debugging group when each Debugging message returns It tries member and returns to identical Debugging message.
In one embodiment, the GDBWrapper message conversion module and GDB server debugging module carry out initial Change operation, includes the following steps:
(131) the GDB server debugging module with the operating system or application program run in QEMU by establishing TCP connection debugs the operating system or application program;
(132) the GDBWrapper message conversion module, with the GDB server debugging module establish TCP connection into Row communication, and connection communication is established by Web Socket with HTTP server module.
In one embodiment, the setting breakpoint request and correlation function or the corresponding debugging of global variable are asked It asks and is sent to GDB server debugging module, execute debug command, include the following steps:
(331) debugging request that the HTTP server module parsing Web client browser module is sent, executes corresponding Operation, mainly include the following steps that:
(a) when the debugging request received exits command for Quit, then the life of an interruption GDB server is issued It enables;
(b) when the debugging request received is Set/Remove Breakpoint or Set/Remove Watchpoint then issues setting to GDB server debugging module or deletes the order of breakpoint/point of observation;
(c) when the received debugging request is that Memory checks that memory information or Register check that register is believed Breath then issues the order for checking memory information or register information related pattern to GDB server debugging module;
(d) when the received debugging request is that Pause suspends or Run continues to execute order, then to GDB server tune Die trial block, which issues to interrupt, executes or continues to execute order;
(e) when the received debugging request is that Step single step executes order, then to GDB server debugging module sending list Debug command is walked, is that basic debugging unit single step executes with function.
(332) debugging request after parsing is sent to the GDBWrapper message and converted by the HTTP server module Debugging request is converted to the executable GDB/ of GDB server debugging module by module, the GDBWrapper message conversion module MI order, and the debugging result that the GDB server debugging module returns is received, the debugging result is converted into corresponding number HTTP server module is returned to according to format.
The beneficial effect of above-mentioned technical proposal provided in an embodiment of the present invention includes at least:
A kind of synergic debugging system based on Web provided in an embodiment of the present invention, user can be straight on browser interface Operation debugging Remote Procedure is connect, not only has and supports good graphic interface, but also Debugging message can be obtained in real time, with more Clear and intuitive mode is added to complete debugging efforts;On the other hand, synergic debugging function sets the uneasy assembly of debugging user Local debugging enironment, as long as issuing debugging request to remote server, once obtain debugging permission, so that it may as local into Row debugging, greatly reduces debugging cost in this way, improves debugging efficiency;It simultaneously should be based on the synergic debugging system of Web and side Method can extend to other debugging applications other than operating system kernel level debugging, meet different debugging demands, having can The advantages of scalability is strong, feature applied widely, combines Web technology and debugging technique, to realize that Web is cross-platform, visual Change debugging and provides preferable solution.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by written explanation Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the module diagram of the synergic debugging system provided in an embodiment of the present invention based on Web;
Fig. 2 is the synergic debugging system architecture overall schematic provided in an embodiment of the present invention based on Web;
Fig. 3 is the Debugging interface schematic diagram of the synergic debugging system provided in an embodiment of the present invention based on Web;
Fig. 4 is the flow chart of the synergic debugging method provided in an embodiment of the present invention based on Web;
Fig. 5 is the flow chart of step S1 provided in an embodiment of the present invention;
Fig. 6 is the flow chart of step S13 provided in an embodiment of the present invention;
Fig. 7 is the flow chart of step S2 provided in an embodiment of the present invention;
Fig. 8 is the flow chart of step S3 provided in an embodiment of the present invention;
Fig. 9 is the flow chart of step S33 provided in an embodiment of the present invention;
Figure 10 is the flow chart of step S4 provided in an embodiment of the present invention;
Figure 11 is the flow chart of step S1 provided in an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Shown in referring to Fig.1, the synergic debugging system provided in an embodiment of the present invention based on Web is developed based on mature Web Technology and platform are, it can be achieved that convenient, friendly, efficient system debug;The system includes:Graphical debugging platform based on Web With system debug frame;
Wherein:
The graphical debugging platform of Web includes:
Web client browser module 11 can through HTML, CSS, Javascript technology in the form of graphic interface Clearly to show system debug function, and debugging request is sent to HTTP server module, GDB server debugging module is returned The Debugging message returned is presented to the user;
HTTP server module 12, receiving Web client browser module 11 is user browser debugging request, and will The output result of GDBWrapper message conversion module returns to user client browser;
GDBWrapper message conversion module 13 is connected HTTP server module in the form of Web Socket, realized simultaneously GDB MI debugging interface based on Java connects GDB server debugging module, passes through and receives HTTP server resume module User browser debugging request is sent to GDB server debugging module, and GDB server debugging result is returned to HTTP clothes Business device module;
GDB server debugging module 14 debugs goal systems and application program by TCP connection to QEMU simulator, and Debugging result information is returned into GDBWrapper message conversion module, by HTTP server module, is finally returned that user Browser.
Above-mentioned synergic debugging frame includes:
Synergic debugging user management module 21 carries out being managed by group in blocks, each to all debugging users Debugging group has a unique expression ID, and Debugging message received by same debugging group user is identical, and user can be added Existing a certain debugging group, can also oneself creation debugging group;
Synergic debugging authority management module 22, each debugging group Session safeguard a unique Token, only possess The user of Token can send debug command to server, it is desirable to and the user of debugging can send Token request to server, Once debug command can be sent to server by obtaining Token, debugged;
Synergic debugging message managing module 23, debugging request and debugging result information use unified management mechanism, each Debugging request and debugging result information will return to all debugging members of the debugging group, protect by using database caches mechanism Demonstrate,prove the consistency of Debugging message.
In actual use, the modules and component in the synergic debugging system based on Web are to combine closely, coordinate Work, wherein graphically debugging platform and the mutually coordinated use of synergic debugging frame module, graphical debugging platform is mainly complete At tasks such as the pretreatment of debugging efforts, debugging and control debugging process, system debug module is then completed to adjust in debugging process The tasks such as user management, the coordination of debugging permission and Debugging message return are tried, guarantee that entire debugging process is one organically unified It is whole.
In the present embodiment, user can directly Remote Procedure be debugged in operation on browser interface, not only has support good Good graphic interface, and Debugging message can be obtained in real time, debugging efforts are completed to be more clear intuitive way;It is another Aspect, synergic debugging function allows the uneasy assembly of debugging user to set local debugging enironment, as long as issuing to remote server Debugging request, once obtain debugging permission, so that it may it is debugged as local, greatly reduces debugging cost in this way, mention High debugging efficiency;It is somebody's turn to do the synergic debugging system and method based on Web simultaneously, can extend in addition to operating system kernel level tune Other debugging applications except examination, meet different debugging demands, with strong, the applied widely feature of scalability, combine The advantages of Web technology and debugging technique, provides preferable solution to realize that Web is cross-platform, visualizes debugging.
Referring to shown in Fig. 2, indicating the debugging platform architecture overall schematic of the synergic debugging system based on Web, in figure It is illustrated for debugging linux kernel, being somebody's turn to do the graphical debugging platform based on Web includes:
Web client browser shows debugging function to user with graphic interface, and passes through network and HTTP server Debugging function is completed in interaction;
HTTP server issues debug command request by Web Socket connection GDBWrapper, to Client browse Device returns to Debugging message;
On the one hand GDBWrapper message conversion module obtains the debugging at HTTP server end by Web Socket connection Request, on the other hand returns to HTTP server for GDB server debugging result;
GDB server debugs linux kernel, on the other hand says debugging on the one hand by TCP connection to QEMU simulator Information returns to GDBWrapper message conversion module;
Including 7 steps:
1. user issues debug command by Web browser;
2. the debug command received is transmitted to the computer where GDB Wrapper by HTTP server;
3. GDBWrapper issues GDB server after converting to above-mentioned debug command;
4. GDB server is communicated with QEMU carries out system debugging operations;
5. GDB Wrapper collects the Debugging message of QEMU output;
6. GDB Wrapper is sent to HTTP server for return information is debugged;
7. HTTP server will be debugged after return information carries out visualization processing and return to client browser and show.
Referring to shown in Fig. 3, indicate what the Web client browser module 11 of the synergic debugging system based on Web was shown Debugging interface schematic diagram.
Wherein, QEMU simulator and linux kernel, as debugging target platform and application, only the present invention select one A example can also be supported to meet the debugging with application program in other operating systems on QEMU simulator;The embodiment of the present invention It does not limit this.
Database server saves the Debugging message that HTTP server is collected, to carry out point of trace later Analysis and playback.
In one embodiment, above-mentioned debugging request may include one or more of order:
Suspend Pause, operation Run, Step single step, setting breakpoint Set Breakpoint, delete breakpoint Remove Breakpoint, it setting point of observation Set Watchpoint, deletes point of observation Remove Watchpoint, check specified memory Information Memory, it checks register information Register and exits Quit.
Above-mentioned Debugging message also may include one or more of information:
Thread stacks information, order execute the GDB Debugging message returned, breakpoint list information, point of observation when system is run List information, specified memory data information and register data information.
In one embodiment, above-mentioned GDBWrapper message conversion module 13 is specifically used for Web client browser The JSON formatted data that module 11 is sent is converted to the executable debug command of GDB server, and by the GDB server tune The debugging result that die trial block 14 returns is converted to the html format data of the display of Web client browser module 11.
Wherein:The debug command of above-mentioned JSON formatted data, specific format are such as:
[GID][COMMAND]:[debugging event].
The format of above-mentioned debugging result is such as:
[GID][COMMAND]:[debugging event] [thread stacks] [breakpoint list] [memory information] [register information].
Based on the same inventive concept, the synergic debugging method based on Web that the embodiment of the invention also provides a kind of, due to this The principle of the solved problem of method is similar to the aforementioned synergic debugging system based on Web, therefore the implementation of this method may refer to The implementation of aforementioned system, overlaps will not be repeated.
The synergic debugging method based on Web that the embodiment of the invention also provides a kind of is based on any of the above-described embodiment institute The synergic debugging system based on Web provided, shown in this method reference Fig. 4, including:
The graphical debugging platform pretreatment operation of S1, Web;
S2, synergic debugging pretreatment operation;
S3, debugging breakpoints operation;
S4, synergic debugging operation;
Wherein:Graphical debugging platform pretreatment operation of the step S1 based on Web include referring to Fig. 5:
S11, the graphical debugging platform based on Web start a HTTP service according to preconfigured debugging port Device module, and record server address URL;The server address URL format such as can be:http:// [server address]: [port]/[pathname].
S12, the Web client browser module input server address URL, send HTTP to HTTP server module Request;
S13, the GDBWrapper message conversion module and GDB server debugging module initialize;
Further, referring to shown in Fig. 6, above-mentioned steps S13 includes:
S131, the GDB server debugging module with the operating system or application program run in QEMU by establishing TCP connection debugs the operating system or application program;
S132, the GDBWrapper message conversion module, with the GDB server debugging module establish TCP connection into Row communication, and connection communication is established by Web Socket with HTTP server module.
GDBWrapper message conversion module establishes Web Socket linking format with HTTP server module:[service Device address]:[debugging port].
GDBWrapper message conversion module establishes TCP connection format with GDB server debugging module: [127.0.0.1]:[port].
Synergic debugging pretreatment operation described in step S2 includes the following steps referring to shown in Fig. 7:
S21, debugging user log in debugging system by corresponding authority;
S22, the synergic debugging user management module according to user request be user create a new debugging group or It is added to an existing debugging group;
The operation of debugging breakpoints described in step S3 includes the following steps referring to shown in Fig. 8:
S31, the graphical debugging platform based on Web request search correlation function or global variable according to user, Selection needs to be arranged the correlation function or global variable of breakpoint in Web client browser module;
S32, the Web client browser module issue setting breakpoint request, by the setting breakpoint request and correlation Function or global variable are sent to HTTP server module;
The breakpoint request is sent to GDBWrapper message conversion module and carried out by S33, the HTTP server module Message conversion, and the setting breakpoint request and correlation function or the corresponding debugging request of global variable are sent to GDB Server debugging module executes debug command;
Specifically, referring to shown in Fig. 9, step S33 includes:
The debugging request that S331, HTTP server module parsing Web client browser module are sent, executes corresponding Operation, mainly include the following steps that:
(a) when the debugging request received exits command for Quit, then the life of an interruption GDB server is issued It enables;
(b) when the debugging request received is Set/Remove Breakpoint or Set/Remove Watchpoint then issues setting to GDB server debugging module or deletes the order of breakpoint/point of observation;
(c) when the received debugging request is that Memory checks that memory information or Register check that register is believed Breath then issues the order for checking memory information or register information related pattern to GDB server debugging module;
(d) when the received debugging request is that Pause suspends or Run continues to execute order, then to GDB server tune Die trial block, which issues to interrupt, executes or continues to execute order;
(e) when the received debugging request is that Step single step executes order, then to GDB server debugging module sending list Debug command is walked, is that basic debugging unit single step executes with function.
Debugging request after parsing is sent to the GDBWrapper message and converted by S332, the HTTP server module Debugging request is converted to the executable GDB/ of GDB server debugging module by module, the GDBWrapper message conversion module MI order, and the debugging result that the GDB server debugging module returns is received, the debugging result is converted into corresponding number HTTP server module is returned to according to format.
S34, the GDB server debugging module return breakpoint list information, thread information and the console message of return It returns GDBWrapper message conversion module and carries out message conversion, and the debugging result after conversion is returned into HTTP server mould Block;
The operation of step S4 synergic debugging, referring to Fig.1 shown in 0, includes the following steps:
S41, the synergic debugging user management module are that first debugging user creates a debugging example, the debugging One debugging group information of Example maintenance and a debugging Token;
S42, the new debugging user that debugging group is added issue acquisition Token to the synergic debugging authority management module and ask It asks;After request is confirmed, debugging permission is obtained;
S43, the synergic debugging message managing module are all tune of the debugging group when each Debugging message returns It tries member and returns to identical Debugging message.
Refering to fig. 1 shown in 1, the synergic debugging process flow diagram flow chart of the synergic debugging method based on Web is indicated, collaboration is adjusted Examination process includes the following steps:
Step 111 starts;
Step 112, starting HTTP server module;Graphical debugging platform based on Web is according to preconfigured debugging Port starts a HTTP server module, and records server address URL
Step 113 opens Web client browser, inputs the address HTTP server URL;Web client browser module Browser is opened, server address URL is inputted, sends HTTP request to HTTP server module
Step 114, GDBWrapper message conversion module and the initialization of GDB server debugging module;
Step 115, debugging user input username and password and log in debugging system;
Step 116, judgement login successfully;It is no to then follow the steps 115, it is to then follow the steps 117;
Step 117, user choose whether creation debugging group;It is to then follow the steps 118, it is no to then follow the steps 124;Collaboration is adjusted Examination user management module is user's one new debugging group of creation according to user's request or is added to an existing debugging group; After an existing debugging group is added in selection, the synergic debugging in same group can be directly directly acquired from HTTP server end Information.
Step 118 obtains debugging permission, Start-up and Adjustment;
Step 119, setting debugging breakpoints;Graphical debugging platform based on Web requests search correlation function according to user Perhaps global variable chooses the function or global variable for needing to be arranged breakpoint in Web client browser;
Step 120 sends debug command to HTTP server;The Web client browser sending for obtaining debugging permission is set Breakpoint request is set, setting breakpoint request and correlation function or global variable are sent jointly into HTTP server;
Step 121, GDBWrapper carry out message conversion, send debug command to GDB server;HTTP server will break Point and request are sent to GDBWrapper and carry out message conversion, and debugging request order is sent to GDB server, execute debugging Order;
Step 122, GDB server execute debug command, and return to debugging result;GDB server arranges the breakpoint of return Table information, thread information and console message return to GDBWrapper and carry out message conversion, and processing post debugging information is returned To HTTP server, client browser is finally returned in the form of html forms.
Step 123, debug command and the debugging result of return are saved to database server;
Step 124 directly acquires synergic debugging information in same group from HTTP server end;
Step 125 terminates.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The shape for the computer program product implemented in usable storage medium (including but not limited to magnetic disk storage and optical memory etc.) Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (9)

1. a kind of synergic debugging system based on Web, which is characterized in that including graphical debugging platform and system based on Web Debugging framework;
The graphical debugging platform based on Web includes:
Web client browser module, for sending debugging request to HTTP server module, by GDB server debugging module The Debugging message of return is presented to the user;
HTTP server module, for receiving the debugging request, and by the output result of GDBWrapper message conversion module Return to user client browser;
GDBWrapper message conversion module, for receiving the debugging request of the HTTP server resume module, and will The debugging request is sent to GDB server debugging module;And receive the debugging of the transmission of the GDB server debugging module As a result, the debugging result is returned to the HTTP server module;
GDB server debugging module ties debugging for debugging the corresponding goal systems of the debugging request and application program Fruit returns to GDBWrapper message conversion module.
The synergic debugging frame includes:
Synergic debugging user management module is managed for all debugging users to be divided into multiple debugging groups, and according to user Request is that user creates a new debugging group or user is added to existing debugging group;Each debugging group has unique indicate ID, Debugging message received by the user of the same debugging group are identical;
Synergic debugging authority management module, for determining whether the user to be debugged of each debugging group possesses unique Token;It is described Each debugging group Session safeguards a unique Token, when the user for possessing Token has permission transmission debug command;
Synergic debugging message managing module will be each for using unified management mechanism to the debugging request and debugging result A debugging request and debugging result return to all debugging members of corresponding debugging group, protect by using database caches mechanism Demonstrate,prove the consistency of Debugging message.
2. a kind of synergic debugging system based on Web as described in claim 1, which is characterized in that the debugging request includes One or more of order:
Suspend Pause, operation Run, Step single step, setting breakpoint Set Breakpoint, delete breakpoint Remove Breakpoint, it setting point of observation Set Watchpoint, deletes point of observation Remove Watchpoint, check specified memory Information Memory, it checks register information Register and exits Quit.
3. a kind of synergic debugging system based on Web as described in claim 1, which is characterized in that the Debugging message includes One or more of information:
Thread stacks information, order execute the GDB Debugging message returned, breakpoint list information, observation point list when system is run Information, specified memory data information and register data information.
4. a kind of synergic debugging system based on Web as described in claim 1, which is characterized in that the GDBWrapper disappears Conversion module is ceased, is converted to GDB server specifically for the JSON formatted data for sending the Web client browser module Executable debug command, and the debugging result that the GDB server debugging module returns is converted into the Web client The html format data that browser module is shown.
5. a kind of synergic debugging system based on Web as claimed in claim 4, which is characterized in that the JSON formatted data Debug command, specific format is:
[GID][COMMAND]:[debugging event].
6. a kind of synergic debugging system based on Web as claimed in claim 4, which is characterized in that the debugging result Format is:
[GID][COMMAND]:[debugging event] [thread stacks] [breakpoint list] [memory information] [register information].
7. a kind of synergic debugging method based on Web, which is characterized in that the method includes:Graphical debugging based on Web is flat Platform pretreatment operation, synergic debugging pretreatment operation, debugging breakpoints operation and synergic debugging operation;
The graphical debugging platform pretreatment operation based on Web, includes the following steps:
(11) the graphical debugging platform based on Web starts a HTTP server mould according to preconfigured debugging port Block, and record server address URL;
(12) the Web client browser module inputs server address URL, sends HTTP to HTTP server module and asks It asks;
(13) the GDBWrapper message conversion module and GDB server debugging module initialize;
The synergic debugging pretreatment operation, includes the following steps:
(21) debugging user logs in debugging system by corresponding authority;
(22) the synergic debugging user management module is that user creates new a debugging group or addition according to user's request To an existing debugging group;
The debugging breakpoints operation, includes the following steps:
(31) the graphical debugging platform based on Web requests search correlation function or global variable according to user, in Web Selection needs to be arranged the correlation function or global variable of breakpoint in client browser module;
(32) the Web client browser module issues setting breakpoint request, by the setting breakpoint request and correlation function Or global variable is sent to HTTP server module;
(33) breakpoint request is sent to GDBWrapper message conversion module and carries out message by the HTTP server module Conversion, and the setting breakpoint request and correlation function or the corresponding debugging request of global variable are sent to GDB service Device debugging module executes debug command;
(34) the GDB server debugging module returns to the breakpoint list information of return, thread information and console message GDBWrapper message conversion module carries out message conversion, and the debugging result after conversion is returned to HTTP server module;
Synergic debugging operation, includes the following steps:
(41) the synergic debugging user management module is that first debugging user creates a debugging example, the debugging example Safeguard a debugging group information and a debugging Token;
(42) the debugging user of debugging group is newly added, is issued to the synergic debugging authority management module and obtains Token request;Please It asks after being confirmed, obtains debugging permission;
(43) the synergic debugging message managing module is when each Debugging message returns, be the debugging group all debugging at Member returns to identical Debugging message.
8. a kind of synergic debugging method based on Web as claimed in claim 7, which is characterized in that the GDBWrapper disappears Breath conversion module and GDB server debugging module initialize, and include the following steps:
(131) the GDB server debugging module is connected by establishing TCP with the operating system or application program run in QEMU It connects, the operating system or application program is debugged;
(132) the GDBWrapper message conversion module is established TCP connection with the GDB server debugging module and is led to Letter, and connection communication is established by Web Socket with HTTP server module.
9. a kind of synergic debugging method based on Web as claimed in claim 7, which is characterized in that ask the setting breakpoint Summation correlation function or the corresponding debugging request of global variable are sent to GDB server debugging module, execute debug command, Include the following steps:
(331) debugging request that the HTTP server module parsing Web client browser module is sent, executes corresponding behaviour Make, mainly includes the following steps that:
(a) when the debugging request received exits command for Quit, then the order of an interruption GDB server is issued;
(b) when the debugging request received is Set/Remove Breakpoint or Set/Remove Watchpoint then issues setting to GDB server debugging module or deletes the order of breakpoint/point of observation;
(c) when the received debugging request be Memory check that memory information or Register check register information, then The order for checking memory information or register information related pattern is issued to GDB server debugging module;
(d) when the received debugging request is that Pause suspends or Run continues to execute order, then to GDB server debugging mould Block, which issues to interrupt, executes or continues to execute order;
(e) when the received debugging request is that Step single step executes order, then to GDB server debugging module sending single step tune Examination order is that basic debugging unit single step executes with function.
(332) debugging request after parsing is sent to the GDBWrapper message modulus of conversion by the HTTP server module Debugging request is converted to the executable GDB/MI of GDB server debugging module by block, the GDBWrapper message conversion module Order, and the debugging result that the GDB server debugging module returns is received, the debugging result is converted into corresponding data Format returns to HTTP server module.
CN201810552504.2A 2018-05-31 2018-05-31 Web-based collaborative debugging system and method Active CN108829591B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810552504.2A CN108829591B (en) 2018-05-31 2018-05-31 Web-based collaborative debugging system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810552504.2A CN108829591B (en) 2018-05-31 2018-05-31 Web-based collaborative debugging system and method

Publications (2)

Publication Number Publication Date
CN108829591A true CN108829591A (en) 2018-11-16
CN108829591B CN108829591B (en) 2021-05-04

Family

ID=64147021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810552504.2A Active CN108829591B (en) 2018-05-31 2018-05-31 Web-based collaborative debugging system and method

Country Status (1)

Country Link
CN (1) CN108829591B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727577A (en) * 2019-08-29 2020-01-24 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Debugging method, system and medium for probability recurrence problem in embedded system software
CN113760688A (en) * 2020-06-05 2021-12-07 腾讯科技(深圳)有限公司 Remote debugging method, system, webpage server, equipment and storage medium
WO2022143108A1 (en) * 2020-12-30 2022-07-07 华为技术有限公司 Software debugging method, electronic device, and debugging system
CN114968751A (en) * 2021-02-24 2022-08-30 中国联合网络通信集团有限公司 Program debugging method and program debugging device of code-free development platform

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6216237B1 (en) * 1998-06-19 2001-04-10 Lucent Technologies Inc. Distributed indirect software instrumentation
CN1564136A (en) * 2004-04-02 2005-01-12 清华大学 Realizing method of cross regulator based on EJTAG components of targeting machine
US20080095143A1 (en) * 2006-10-19 2008-04-24 Research In Motion Limited System and method for providing debug information in session initiation protocol sessions
CN201491026U (en) * 2009-07-31 2010-05-26 福建升腾资讯有限公司 World-wide-web-based debugging system
CN101719093A (en) * 2009-12-09 2010-06-02 上海普元信息技术有限责任公司 System and method for realizing cross-browser Javascript debugging in enterprise Web application system
CN104683378A (en) * 2013-11-27 2015-06-03 上海墨芋电子科技有限公司 Computing and debugging system for novel cloud computing service platform adopting new technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6216237B1 (en) * 1998-06-19 2001-04-10 Lucent Technologies Inc. Distributed indirect software instrumentation
CN1564136A (en) * 2004-04-02 2005-01-12 清华大学 Realizing method of cross regulator based on EJTAG components of targeting machine
US20080095143A1 (en) * 2006-10-19 2008-04-24 Research In Motion Limited System and method for providing debug information in session initiation protocol sessions
CN201491026U (en) * 2009-07-31 2010-05-26 福建升腾资讯有限公司 World-wide-web-based debugging system
CN101719093A (en) * 2009-12-09 2010-06-02 上海普元信息技术有限责任公司 System and method for realizing cross-browser Javascript debugging in enterprise Web application system
CN104683378A (en) * 2013-11-27 2015-06-03 上海墨芋电子科技有限公司 Computing and debugging system for novel cloud computing service platform adopting new technology

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
AVI ROZEN: "Remote cross-target debugging with GDB andGDBserver", 《HTTPS://WWW.LINUX.COM/NEWS/REMOTE-CROSS-TARGET-DEBUGGING-GDB-AND-GDBSERVER/》 *
张津伟: "嵌入式协同调试环境研究与设计", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
王伟杰: "嵌入式可视化协同调试技术的研究与应用", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727577A (en) * 2019-08-29 2020-01-24 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Debugging method, system and medium for probability recurrence problem in embedded system software
CN110727577B (en) * 2019-08-29 2023-06-09 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Debugging method, system and medium for probability reproduction problem in embedded system software
CN113760688A (en) * 2020-06-05 2021-12-07 腾讯科技(深圳)有限公司 Remote debugging method, system, webpage server, equipment and storage medium
WO2022143108A1 (en) * 2020-12-30 2022-07-07 华为技术有限公司 Software debugging method, electronic device, and debugging system
CN114968751A (en) * 2021-02-24 2022-08-30 中国联合网络通信集团有限公司 Program debugging method and program debugging device of code-free development platform

Also Published As

Publication number Publication date
CN108829591B (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN108829591A (en) A kind of synergic debugging system and method based on Web
US8490050B2 (en) Automatic generation of user interfaces
US8584079B2 (en) Quality on submit process
US7665064B2 (en) Systems and methods for web service function, definition, implementation, and/or execution
US6868454B1 (en) Distributed-object development system and computer-readable recording medium recorded with program for making computer execute distributed-object development
CN101241467B (en) Automatized white box test system and method facing to WEB application
US20110004790A1 (en) Asynchrony Debugging Using Web Services Interface
US20090164981A1 (en) Template Based Asynchrony Debugging Configuration
US20100145978A1 (en) Techniques to provide unified logging services
US20130339931A1 (en) Application trace replay and simulation systems and methods
US20120117541A1 (en) Collaborative Software Debugging In A Distributed System With Dynamically Displayed Chat Sessions
US20160125052A1 (en) Database virtualization
US20200133829A1 (en) Methods and systems for performance testing
US20120278790A1 (en) Collaborative Software Debugging In A Distributed System With Real-Time Variable Modification Indicators
CN110377283B (en) Method for realizing and synchronizing front-end effective data during Web front-end and back-end separation development
CN103544100A (en) Method, system and client side for testing APP of portable data processing equipment
JP2023070148A (en) Systems and methods for dynamically binding robotic process automation (RPA) robots to resources
Vera et al. Event-based execution architectures for dynamic software systems
Zyrianov et al. Automated recording and semantics-aware replaying of high-speed eye tracking and interaction data to support cognitive studies of software engineering tasks
US20060253854A1 (en) Extensible infrastructure for task display and launch
US9298428B2 (en) Graphical user interface editor that displays live data during editing
Zyrianov et al. Deja Vu: semantics-aware recording and replay of high-speed eye tracking and interaction data to support cognitive studies of software engineering tasks—methodology and analyses
CN114968751A (en) Program debugging method and program debugging device of code-free development platform
Endo Model based testing of service oriented applications
CN113377638B (en) Method and device for generating performance test tool

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