CN103631716B - The conversion method and equipment of a kind of debug command - Google Patents
- ️Tue Jun 06 2017
The content of the invention
Embodiments of the invention provide a kind of conversion method and equipment and communication system of debug command, solve for not With the realization of the order conversion needed for running environment, enabling suitable for various running environment, so as to reduce development cost, And solve the problems, such as that Signalling exchange contains much information between debugging client and debugging services end, and then shorten the sound of debug command Between seasonable.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
A kind of first aspect, there is provided conversion method of debug command, including:
Receive the debug command of the text formatting of user input;
Formatted text according to storage searches the corresponding command code of debug command of the text formatting, wherein, institute State command code corresponding with command code and operation target;
Obtain the debugging result of the binary format generated with operation target according to the corresponding command code of the command code;
The debugging result of the binary format is converted into the debugging result of text formatting according to the formatted text.
With reference in a first aspect, in the first possible implementation, when client on-line debugging is debugged, the acquisition The debugging result of the binary format generated with operation target according to the corresponding command code of the command code, specifically includes:
The command code is sent to debugging services end, so that the debugging services end is searched according to the command code The corresponding command code of the command code and operation target, and binary system is obtained according to the command code debugging operation target The debugging result of form;
Receive the debugging result of the binary format that the debugging services end sends.
It is described by institute in second possible implementation with reference to the first possible implementation of first aspect State command code to send to debugging services end, so that the command code is searched in the debugging services end according to the command code Corresponding command code and operation target, and the debugging knot of binary format is obtained according to the command code debugging operation target Really, specifically include:
The command code is sent to the debugging services end, so that the debugging services end formats text according to described The corresponding command entries of this lookup command code, and identify the corresponding behaviour of the command code according to the command entries Make code and operation target;Format character in the formatted text is the operating result configuration institute of the correspondence operation target The space for needing, and the operation target is debugged according to the command code, obtain the operating result of the correspondence operation target;
The operating result is stored in the configured good space, and debugging result is obtained by binary coding.
With reference in a first aspect, in the third possible implementation, when debugging client off-line and debugging, the basis The formatted text of storage is searched after the corresponding command code of debug command of the text formatting, is also included:
The corresponding command code of the command code and operation target are searched according to the command code;
The command code is obtained the debug command of binary format with the operation target by binary coding;
The debugging for obtaining the binary format generated with operation target according to the corresponding command code of the command code As a result, specifically include:
Debug command according to the binary format calls dump file to obtain the debug command of the binary format Corresponding debugging result.
With reference to any one possible implementation in the third possible implementation of first aspect to first aspect, It is described to be converted into the debugging result of the binary format according to the formatted text in 4th kind of possible implementation The debugging result of text formatting, including:
According to the sequential encoding of format character in the formatted text, operating result is extracted from the debugging result;
Remove the operating result that the format character in the operating result obtains text formatting.
With reference to the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation, the form Changing text includes:Format character, command code, command code and operation target.
Second aspect, there is provided one kind debugging client, including:
Memory cell, for storage formatting text;
Communication unit, the debug command of the text formatting for receiving user input;
Acquiring unit, for obtaining the binary system lattice generated with operation target according to the corresponding command code of the command code The debugging result of formula;
Converting unit, the debugging knot of the binary format for being obtained the acquiring unit according to the formatted text Fruit is converted into the debugging result of text formatting.
It is described to obtain during the debugging client on-line debugging in the first possible implementation with reference to second aspect Take unit specifically for:
The command code is sent to debugging services end, so that the debugging services end is searched according to the command code The corresponding command code of the command code and operation target, and binary system is obtained according to the command code debugging operation target The debugging result of form;
Receive the debugging result of the binary format that the debugging services end sends.
With reference to the first possible implementation of second aspect or second aspect, in second possible implementation In, the acquiring unit, specifically for:
The command code is sent to the debugging services end, so that the debugging services end formats text according to described The corresponding command entries of this lookup command code, and identify the corresponding behaviour of the command code according to the command entries Make code and operation target;Format character in the formatted text is the operating result configuration institute of the correspondence operation target The space for needing, and the operation target is debugged according to the command code, obtain the operating result of the correspondence operation target;
The operating result is stored in the configured good space, and debugging result is obtained by binary coding.
It is described to look into when the debugging client off-line is debugged in the third possible implementation with reference to second aspect Unit is ask, is additionally operable to search the corresponding command code of the command code and operation target according to the command code;
The converting unit, enters specifically for the command code is obtained into two by binary coding with the operation target The debug command of form processed;
The acquiring unit, specifically for being called described in dump file obtains according to the debug command of the binary format The corresponding debugging result of debug command of binary format.
With reference to second aspect or second aspect the first possible implementation the third possible realization to second aspect Any one possible implementation in mode, in the 4th kind of possible implementation, the converting unit, specifically for:
According to the sequential encoding of format character in the formatted text, operating result is extracted from the debugging result;
Remove the operating result that the format character in the operating result obtains text formatting.
With reference to the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation, the formatting Text includes:Format character, command code, command code and operation target.
The conversion method and equipment of debug command provided in an embodiment of the present invention, formatting of the debugging client according to storage The corresponding command code of debug command of String searching text formatting, the command code is corresponding with command code and operation target, The debugging result of the binary format generated with operation target according to the command code is obtained, according to the formatted text by institute The debugging result for stating binary format is converted into the debugging result of text formatting.Solve for the life needed for different running environment Make the realization of conversion, enabling suitable for various running environment, so as to reduce development cost, and when solving on-line debugging The problem that Signalling exchange contains much information between debugging client and debugging services end, and then shorten the response time of debug command.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of conversion method of debug command, and shown in reference picture 1, the present embodiment is debugging client End is realized being illustrated as a example by the conversion method of debug command, specifically includes below scheme:
101st, debugging client receives the debug command of the text formatting of user input.
102nd, the formatted text according to storage searches the corresponding command code of debug command of the text formatting, its In, the command code is corresponding with command code and operation target.
Wherein formatted text mainly includes:Format character, command code, command code and operation target.And it is distributed in tune Examination client.Command code for the corresponding operation of debug command coding, the operation including reading and writing etc., specifically, can look into Ask or change;Operation target is the object of debug command operation, contains global variable, internal memory, register and operating system Information;The Formatting Output that the formats symbols included in formatted text can be used in text is big with binary message space Small distribution.
Here command name is also included in formatted text, wherein command name corresponds to the order that user indicates, is easy to User operates and understands.
Due to two kinds of scenes of the order of debug command on-line debugging and offline debug command can be realized using formatted text In use, and the increase ordered and deletion aspect possess writing property, therefore a kind of debug command provided in an embodiment of the present invention The conversion conversion that can complete between formatted text and binary order at debugging client and debugging services end.
103rd, debugging client obtains the binary system generated with operation target according to the corresponding command code of the command code The debugging result of form.
Wherein, the standard of the debugging result includes binary system, and the formatted text is distributed in debugging client.
104th, the debugging result of binary format is converted into debugging client the tune of text formatting according to formatted text Test result.
Here as described in step 102, the debugging result of the binary format that debugging client will get is according to form Operating result is extracted in the format character sequential encoding changed in text, then by removing the format character in operating result, obtains form Operating result after change, and then obtain the debugging result of text formatting.
Here debugging client can be not only obtained according to command code and operation mesh by calling dump file to modulate offline Mark the debugging result of generation;Also by receiving the debugging result that debugging services end on-line debugging sends, by parsing debugging result The debugging result obtained after parsing is fed back into user in the form of text message, specifically, the debugging that debugging client is received Result is that debugging services end sends in a binary format, and debugging client passes through conversion after receiving binary format debugging result Binary format is converted into text message, client is debugged here to be carried out communication and carry with debugging services end by binary format The response speed of debug command high.
The conversion method of debug command provided in an embodiment of the present invention, debugging client is by by the text lattice of user input The debugging instruction of formula is encoded according to the formatted text of storage by the debug command querying command of text formatting, wherein, order is compiled Code is binary format, and corresponding with command code and operation target;According to command code and operation Target Acquisition binary format Debugging result, the debugging result of the binary format is converted into the debugging result of text formatting according to formatted text, and to User shows the debugging result of text formatting.Solve the realization for the order conversion needed for different running environment so that energy Enough it is applied to various running environment, believe between debugging client and debugging services end so as to reduce development cost, and is solved The problem that transinformation content is big is made, and then shortens the response time of debug command.
Specifically, being illustrated below in conjunction with specific embodiment.
Can be on the basis of Fig. 1 embodiments, shown in reference picture 2, The embodiment provides a kind of debug command Conversion method, be the process of debugging client and debugging services end on-line debugging shown in reference picture 2, comprise the following steps that:
201st, debugging client receives the debug command of the text formatting of user input, and according to the formatted text of storage The debug command of text formatting is converted into the debug command of binary format.
Here binary format order includes binary order or class binary order.Wherein formatted text is mainly wrapped Include:Command code, command code and operation target.Here command code is mainly used in inquiring about or changing debug command;Operation target bag The information of global variable, internal memory, register and operating system is contained;The formats symbols included in formatted text can be used in The Formatting Output of text is distributed with the size in binary message space.For example, inquiry deposit and operation:Command code is dynamic for inquiry Make corresponding coding, operation target is corresponding register number.
Due to two kinds of scenes of the order of debug command on-line debugging and offline debug command can be realized using formatted text In use, and order increase and deletion aspect simple operation, a kind of therefore conversion of debug command provided in an embodiment of the present invention The conversion between formatted text and binary order can be completed in debugging client and debugging services end.
Specifically, debugging client is converted into binary format order and includes according to debug command by text message:Debugging Client searches the corresponding command code of debug command according to formatted text.
Here debug command is inputed to debugging client by user in the form of text string, in order to improve the inquiry of text string Efficiency, debugging client carries out command code using hash algorithm to text string, so as to debug client be looked into by command code Find corresponding command name.
202nd, debugging client sends to debugging services end command code, to obtain the debugging services end according to order Encode the debugging result of generation.
Wherein, command code is binary format.
Specifically, the debugging result that debugging services end generates according to command code, including:
Debugging services end encodes corresponding command entries according to formatted text look-up command, and is recognized according to command entries Go out the corresponding command code of command code and operation target.
Format character of the debugging services end in formatted text is for needed for the operating result configuration of respective operations target Space, and the operation target is debugged according to command code, obtain the operating result of respective operations target.
Operating result is stored in the configured good space by debugging services end, and obtains debugging knot by binary coding Really.
Wherein, the coding of respective command code and operation target, example are distributed each class debug command in embedded system Such as, register manipulation is inquired about, command code is " querying command " corresponding coding, and operation target is corresponding register number.
Here the format character in formatted text is to debug a kind of form that client has been reached an agreement on mutually with debugging services end, The format output function of such as output printf functions in C language, such as %d and %s, each format character all represents a kind of behaviour Make target type, and represent the address space size that the binary result of operation target needs to distribute, so that currently embedded formula system System is each operation Target Assignment binary result space according to the address space size.Wherein binary system in the embodiment of the present invention Result is debug command and is converted to the order standard after binary system.
Here debugging services end completes actual debugging operations according to debug command, for example, inquiry register value, debugging visitor (that is, inquiry operation) corresponding system interface is called in family end by command code, and to operate the coding of target as interface parameters, Inquire actual register value.Wherein actual register extremely corresponds to the operating result of the operation target.
Here debug command is converted into binary command context and is stored in the binary order institute that obtains by debugging services end In the space for needing, binary order information is obtained.
Binary format order wherein in the embodiment of the present invention is illustrated by taking binary order as an example, here debugging clothes Corresponding command code, and root are searched by formatted text according to the binary order by receiving binary order in business end According to the command code by searching corresponding command entries in formatted text, further by obtaining corresponding in the command entries Command code and operation target, the binary order sent so as to debug client are converted into binary system debug command, and lead to The Embedded System Structure for crossing debugging service end completes corresponding acquisition information or modification information operation, then debugging services end root According to the debugging result obtained after debugging by the format character of the formatted text in command entries for each operating result configures correspondence Binary space, then binary space is sent in the form of gathering to debugging client by debugging services end, debug here Service end contains corresponding debugging result with the binary space that aggregate form sends, and debugging result is by with binary signaling Form is sent to debugging client.
Specifically, debugging services end provided in an embodiment of the present invention includes the formatted text as debugging client Module, converter and binary system debug command module, wherein debugging services end debug the binary format of client by receiving Order, corresponding command name is searched by converter from formatted text modules, and according to command name from order bar The command code and operation target to that should order are recognized in mesh so that debugging services end completes according to command code and operation target should The corresponding operation of binary format order, debugging result is obtained so as to according to the binary format order operate, and will be adjusted Test result is sent to debugging client in the form of binary order.
Debugging client receives the debugging result of the binary format that debugging services end sends.
203rd, the debugging result of binary format is converted into debugging client the tune of text formatting according to formatted text Test result.
Here debugging client is entered line command to text string and is compiled according to command code look-up command title by hash algorithm Code, corresponding command name is found by command code.
Wherein, format character sequential encoding of the debugging client in formatted text is by extracting operation knot in debugging result Really.
Specifically, format character of the debugging client in formatted text carries out parsing obtains each operation Target Assignment Space size needed for corresponding binary system.Each of which operation target is required for taking certain space size, by solution Analysis format character can just get the space size of actual occupancy.Wherein, the operating result in the debugging result is according to format character Sequential encoding is arranged.Here according to the space size needed for the binary system for obtaining, obtained from binary message adjust successively Test result, wherein, debugging result be the sequential encoding according to format character in binary message set, by according to format character Sequential encoding arrangement space extract debugging result from binary message set.
Operating result of the debugging client after the format character in removing the operating result is formatted, the formatting Operating result afterwards is that debugging client arranges process online with debugging services end for the text message wherein embodiment of the present invention, is led to Cross setting format text module and binary system debug command module corresponding with debugging client to debugging service end so that Debugged in standard and can be reached with debugging client when service end is modulated online consistent, so that debugging services end is capable of identify that and locates The debug command that reason debugging client sends.
204th, debugging client shows the debugging result of text formatting to user.
Here debugging client is by receiving the debugging result that debugging services end on-line debugging sends, and is debugged by parsing The debugging result obtained after parsing is fed back to user by result in the form of text message.Specifically, what debugging client was received Debugging result is that debugging services end is sent in the form of binary order, and debugging client passes through form after receiving debugging result Change text and binary order is converted into text message, client is debugged here and passes through entering for binary order with debugging services end Row communication improves the response speed of debug command, is easy to user to understand while being converted into text message.
The conversion method of debug command provided in an embodiment of the present invention, the debug command that debugging client sends according to user Look-up command is encoded, wherein, command code is binary format, and the command code of the binary format is sent to debugging services End;Debugging services end corresponding command code and operation target are searched and with the behaviour for inquiring according to the command code of binary format Make code to debug operation target, obtain the debugging result of binary format, the mode then ordered in a binary format is sent out Deliver to debugging client;The debugging result is converted to text message and feeds back to user by debugging client.Solve on-line debugging The realization of the order conversion needed for running environment, so as to reduce development cost, and solves debugging client and debugging services The problem that Signalling exchange contains much information between end, shortens the response time of debug command.
Specifically, being illustrated below in conjunction with specific embodiment.
Can be on the basis of the embodiment of Fig. 1, shown in reference picture 3, The embodiment provides one kind debugging life The conversion method of order, is the process of debugging client off-line debugging shown in reference picture 3, is comprised the following steps that:
301st, debugging client receives the debug command of the text formatting of user input, and according to the formatted text of storage The debug command of text formatting is converted into the debug command of binary format.
Here the order of binary format includes binary order or class binary order.Wherein formatted text is mainly wrapped Include:Command code, command code and operation target.Here command code is mainly used in inquiring about or changing debug command;Operation target bag The information of global variable, internal memory, register and operating system is contained;The formats symbols included in formatted text can be used in The Formatting Output of text is distributed with the size in binary message space.For example, inquiry deposit and operation:Command code is dynamic for inquiry Make corresponding coding, operation target is corresponding register number.
Due to two kinds of scenes of the order of debug command on-line debugging and offline debug command can be realized using formatted text In use, and order increase and deletion aspect simple operation, a kind of therefore conversion of debug command provided in an embodiment of the present invention The conversion between formatted text and binary order can be completed in debugging client and debugging services end.
Specifically, debugging client is converted into binary format order and includes according to debug command by text message:
A, debugging client are searched the corresponding command code of debug command in formatted text, and are looked into according to command code Look for corresponding command entries.
B, debugging client identify the command code and operation target of debug command according to command entries.
Here debug command is sent to debugging client by user in the form of text string, in order to improve the inquiry of text string Efficiency, debugging client carries out command code using hash algorithm to text string, so as to debug client be looked into by command code Find corresponding command name.
Wherein, the coding of respective command code and operation target, example are distributed each class debug command in embedded system Such as, register manipulation is inquired about, command code is " querying command " corresponding coding, and operation target is corresponding register number.
Command code is obtained binary format order by c, debugging client with operation target by binary coding.
Here the format character in formatted text is to debug a kind of form that client has been reached an agreement on mutually with debugging services end, The format output function of such as output printf functions in C language, such as %d and %s, each format character all represents a kind of behaviour Make target type, and represent the address space size that the binary result of operation target needs to distribute, so that currently embedded formula system System is each operation Target Assignment binary result space according to the address space size.Wherein binary system in the embodiment of the present invention The control of result is debug command and is converted to the order standard after binary system.
Here debugging client completes actual debugging operations according to debug command, for example, inquiry register value, debugging visitor (that is, inquiry operation) corresponding system interface is called in family end by command code, and to operate the coding of target as interface parameters, Inquire actual register value.Wherein actual register extremely corresponds to the operating result of the operation target.
302nd, client call dump file is debugged, and it is complete according to binary format command calls dump file parsing module The parsing of paired dump file, obtains the debugging result of binary format.
Wherein, the dump file includes the Debugging message needed for the debugging client debug command.
Dump file parsing module is the module of the debug command of the user for debugging responsible response reception in client, its In, dump file parsing module have with the same or analogous function in debugging services end, can be held by receiving binary order Row to should binary order operation, and obtain to should binary order debugging result.
Obtain the debugging result of binary format.
303rd, the debugging result of binary format is converted into debugging client the tune of text formatting according to formatted text Test result.
Here debugging client is entered line command to text string and is compiled according to command code look-up command title by hash algorithm Code, corresponding command name is found by command code.
Wherein, format character sequential encoding of the debugging client in formatted text is by extracting operation knot in debugging result Really.
Specifically, format character of the debugging client in formatted text carries out parsing obtains each operation Target Assignment Space size needed for corresponding binary system.Each of which operation target is required for taking certain space size, by solution Analysis format character can just get the space size of actual occupancy.Wherein, the operating result in the debugging result is according to format character Sequential encoding is arranged.Here according to the space size needed for the binary system for obtaining, obtained from binary message adjust successively Test result, wherein, debugging result be the sequential encoding according to format character in binary message set, by according to format character Sequential encoding arrangement space extract debugging result from binary message set.
The debugging format character that removes in the operating result of client formatted after operating result, after the formatting Operating result is text message.
304th, debugging client shows the debugging result of text formatting to user.
Here cause debugging client offline by employing formatted text simultaneously due to have invoked dump file Can still be debugged in environment.Wherein contracting is caused by carrying out debugging client intercommunication using binary format order The response time of short order, the time is saved.
The method of debug command conversion provided in an embodiment of the present invention, debugging client passes through basis under offline environment Formatted text carries out parsing the debug command that user sends, and calls dump file parsing module to dump according to debug command File parse and obtains debugging result, and feeds back to use by the way that debugging result is converted into text message by binary order Family, solves the realization for the order conversion needed for different running environment, enabling suitable for various running environment, so that Development cost is reduced, and solves the problems, such as that Signalling exchange contains much information between debugging client and debugging services end, shortens The response time of debug command.
In embodiment corresponding to Fig. 1, Fig. 2 or Fig. 3 of the present invention, debugging client is receiving the debug command that user sends When no matter on-line debugging or offline debugging parse the debug command of user all in accordance with formatted text, and according to formatted text The debugging result that parsing debug command is obtained, wherein, because formatted text is distributed in debugging client and debugging services end, And formatted text possesses revisable function for commissioning staff, therefore for different editions and the goal systems of different frameworks, Debugging client and/or debugging services end can solve the problem that and coupled with the control of goal systems, enabling suitable for various operations Environment, so as to reduce development cost.
The embodiment of the present invention provides a kind of debugging client 4, and the debugging client is appointed in being specifically as follows embedded communication This conversion method that can realize debug command any in embedded communication of a kind of client terminal, such as private computer PC Equipment, is not particularly limited to the concrete form for debugging client in an embodiment of the present invention, of the invention that can realize The conversion method of any of the above-described debug command that embodiment is provided is defined, shown in reference picture 4, including:
Memory cell 41, for storage formatting text;
Communication unit 42, the debug command of the text formatting for receiving user input;
Query unit 43, for searching the text formatting for the formatted text stored according to the memory cell The corresponding command code of debug command, wherein, the command code is corresponding with command code and operation target;
Acquiring unit 44, for obtaining the binary system generated with operation target according to the corresponding command code of the command code The debugging result of form;
Converting unit 45, the debugging result of the binary format for being obtained acquiring unit 43 according to formatted text turns Change the debugging result of text formatting into;
Communication unit 42, is additionally operable to the debugging result of the text formatting to user's display converting unit acquisition.
Debugging client provided in an embodiment of the present invention, debugging client is by by the debugging of the text formatting of user input The order for being converted to binary format by the debug command of text formatting according to the formatted text of storage is instructed, and according to this Binary format order obtain to should binary format order generation binary format debugging result, according to form Change the debugging result that the debugging result of the binary format is converted into text text formatting, and to user's display text formatting Debugging result.Solve the realization for the order conversion needed for different running environment, enabling suitable for various operation rings Border, so as to reduce development cost, and asking of solving that Signalling exchange between debugging client and debugging services end contains much information Topic, and then shorten the response time of debug command.
Optionally, when debugging 4 on-line debugging of client,
Acquiring unit 44, specifically for:Command code is sent to debugging services end so that the debugging services end according to The corresponding command code of the command code and operation target are searched in the command code, and debug the behaviour according to the command code The debugging result of binary format is obtained as target, the debugging knot of the binary format that the debugging services end sends is received Really.
Further, acquiring unit 44, specifically for:
Command code is sent to debugging services end, so that institute is searched in the debugging services end according to the formatted text The corresponding command entries of command code are stated, and the corresponding command code of the command code and behaviour are identified according to the command entries Make target;Format character in the formatted text is to correspond to the sky needed for the operating result of the operation target is configured Between, and the operation target is debugged according to the command code, obtain the operating result of the correspondence operation target;
Operating result is stored in configured good space, and debugging result is obtained by binary coding.
Optionally, when debugging client 4 is debugged offline,
Query unit 43, is additionally operable to search the corresponding command code of the command code and operation mesh according to the command code Mark;
Converting unit 45, specifically for the command code is obtained into binary system by binary coding with the operation target The debug command of form;
Further, acquiring unit 44, specifically for calling dump file to obtain according to the debug command of the binary format To the corresponding debugging result of debug command of the binary format.
Optionally, converting unit 45 specifically for:According to the sequential encoding of format character in the formatted text, from described Operating result is extracted in debugging result;Remove the operating result that the format character in the operating result obtains text formatting.
Further alternative, formatted text includes:Format character, command code, command code and operation target.
Debugging client provided in an embodiment of the present invention, debugging client has text by the debugging instruction for sending user Information is converted to binary format order, and the binary format order is sent to debugging services end, so as to debugging services end By parsing the debugging result that the binary format order is obtained to the debugging client feedback according to the debug command of user, and Order in a binary format is sent to debugging client so that it is anti-that the debugging result is converted to text message by the debugging client It is fed to user.Solve the realization for the order conversion needed for different running environment, enabling suitable for various operation rings Border, so as to reduce development cost, and asking of solving that Signalling exchange between debugging client and debugging services end contains much information Topic, and then shorten the response time of debug command.
Embodiments of the invention provide a kind of debugging client 5, and shown in reference picture 5, the debugging client 5 includes:At least One processor 51, memory 52, communication interface 53 and bus 54, at least one processor 51, memory 52 and communication connect Mouth 53 is connected by bus 54 and completes mutual communication.
The bus 54 can be industry standard architecture (Industry Standard Architecture, referred to as ISA) bus, external equipment interconnection (Peripheral Component, referred to as PCI) bus or extension Industry Standard Architecture knot Structure (Extended Industry Standard Architecture, referred to as EISA) bus etc..The bus 54 can be divided into Address bus, data/address bus, controlling bus etc..For ease of representing, only represented with a thick line in Fig. 5, it is not intended that only A piece bus or a type of bus.Wherein:
Memory 52 is used to store executable program code, and the program code includes computer-managed instruction.Memory 52 High-speed RAM memory may be included, it is also possible to also including nonvolatile memory (non-volatile memory), for example extremely A few magnetic disk storage.
Processor 51 is probably a central processing unit (Central Processing Unit, referred to as CPU), or It is specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), or is matched somebody with somebody It is set to one or more integrated circuits for implementing the embodiment of the present invention.
Communication interface 53, is mainly used in realizing the communication between the device in the present embodiment.
Wherein, memory 52, storage formatting text;
Processor 51, is ordered for being received the debugging of the first text formatting of user input by least one communication interface 53 Order;
Be converted into for the debug command of text formatting by processor 51, the formatted text for being additionally operable to be stored according to memory 52 The debug command of binary format, the formatted text is used to search the corresponding command code of debug command of text formatting, and Corresponding command code is obtained with operation target according to command code;
Processor 51, is additionally operable to obtain the corresponding command code of debug command according to binary format and operation target generation Binary format debugging result;
Processor 51, is additionally operable to be shown to user the debugging result of text formatting.
Debugging client provided in an embodiment of the present invention, debugging client is by by the debugging of the text formatting of user input The order for being converted to binary format by the debug command of text formatting according to the formatted text of storage is instructed, and according to this Binary format order obtain to should binary format order generation binary format debugging result, according to form Change the debugging result that the debugging result of the binary format is converted into text text formatting, and to user's display text formatting Debugging result.Solve the realization for the order conversion needed for different running environment, enabling suitable for various operation rings Border, so as to reduce development cost, and asking of solving that Signalling exchange between debugging client and debugging services end contains much information Topic, and then shorten the response time of debug command.
Optionally, when debugging 5 on-line debugging of client, the debug command of the binary format includes the command code,
Processor 51, specifically for:Command code is sent to debugging services end by least one communication interface 53, with Just debugging services end according to command code debug obtaining debugging result;Debugging clothes are received by least one communication interface 53 Business end according to command code debug the debugging result for obtaining.
Further, processor 51, specifically for:
Command code is sent to debugging services end, so as to
Debugging services end encodes corresponding command entries according to formatted text look-up command, and is recognized according to command entries Go out the corresponding command code of command code and operation target;Format character in formatted text is the operation of respective operations target Space needed for result configuration, and according to command code debugging operations target, obtain the operating result of respective operations target;
Operating result is stored in configured good space, and debugging result is obtained by binary coding.
Optionally, when debugging client 5 is debugged offline,
Processor 51, is specifically additionally operable to:Command code is obtained into binary format with operation target by binary coding Order.
Further, processor 51, are specifically additionally operable to:Completed according to binary format command calls dump file parsing module Parsing to dump file, obtains the debugging result of binary format.
Optionally, processor 51, are specifically additionally operable to:According to the sequential encoding of format character in formatted text, tied from debugging Operating result is extracted in fruit;Format character in removal operating result obtains the operating result of text formatting.
Further, optionally, formatted text includes:Format character, command code, command code and operation target.
Debugging client provided in an embodiment of the present invention, debugging client has text by the debugging instruction for sending user Information is converted to binary format order, and the binary format order is sent to debugging services end, so as to debugging services end By parsing the debugging result that the binary format order is obtained to the debugging client feedback according to the debug command of user, and Order in a binary format is sent to debugging client so that it is anti-that the debugging result is converted to text message by the debugging client It is fed to user.Solve the realization for the order conversion needed for different running environment, enabling suitable for various operation rings Border, so as to reduce development cost, and asking of solving that Signalling exchange between debugging client and debugging services end contains much information Topic, and then shorten the response time of debug command.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can be with Realized with hardware, or firmware is realized, or combinations thereof mode is realized.When implemented in software, can be by above-mentioned functions Storage is transmitted in computer-readable medium or as one or more instructions on computer-readable medium or code.Meter Calculation machine computer-readable recording medium includes computer-readable storage medium and communication media, and wherein communication media includes being easy to from a place to another Any medium of individual place transmission computer program.Storage medium can be any usable medium that computer can be accessed.With As a example by this but it is not limited to:Computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disc storages, disk Storage medium or other magnetic storage apparatus or can be used in carrying or store the expectation with instruction or data structure form Program code and can be by any other medium of computer access.In addition.Any connection can be appropriate as computer Computer-readable recording medium.If for example, software is to use coaxial cable, optical fiber cable, twisted-pair feeder, Digital Subscriber Line (DSL) or such as The wireless technology of infrared ray, radio and microwave etc is transmitted from website, server or other remote sources, then coaxial electrical The wireless technology of cable, optical fiber cable, twisted-pair feeder, DSL or such as infrared ray, wireless and microwave etc is included in affiliated medium In fixing.As used in the present invention, disk (Disk) and dish (disc) include that compression laser disc (CD), laser disc, laser disc, numeral are logical With laser disc (DVD), floppy disk and Blu-ray Disc, the replicate data of the usual magnetic of which disk, and dish is then with laser come optical duplication Data.Above combination above should also be as being included within the protection domain of computer-readable medium.
In a word, the preferred embodiment of technical solution of the present invention is the foregoing is only, is not intended to limit of the invention Protection domain.All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc., should be included in Within protection scope of the present invention.