RU2385485C1 - System and method of control over programs execution with help of binary applications tracing - Google Patents

System and method of control over programs execution with help of binary applications tracing Download PDF

Info

Publication number
RU2385485C1
RU2385485C1 RU2008130952/09A RU2008130952A RU2385485C1 RU 2385485 C1 RU2385485 C1 RU 2385485C1 RU 2008130952/09 A RU2008130952/09 A RU 2008130952/09A RU 2008130952 A RU2008130952 A RU 2008130952A RU 2385485 C1 RU2385485 C1 RU 2385485C1
Authority
RU
Russia
Prior art keywords
module
trace
program
database
text
Prior art date
Application number
RU2008130952/09A
Other languages
Russian (ru)
Inventor
Михаил Александрович Павлющик (RU)
Михаил Александрович Павлющик
Original Assignee
ЗАО "Лаборатория Касперского"
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 ЗАО "Лаборатория Касперского" filed Critical ЗАО "Лаборатория Касперского"
Priority to RU2008130952/09A priority Critical patent/RU2385485C1/en
Application granted granted Critical
Publication of RU2385485C1 publication Critical patent/RU2385485C1/en

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

FIELD: information technologies.
SUBSTANCE: according to the present invention, on developer side in compiled software module they replace text lines of tracing by according identifiers. Software module is sent to user side. After tracing file has been formed on user side, this file is sent to developer side, where text lines are restored by identifiers contained in this file. As a result, a text file is produced, which may be easily analysed by developer.
EFFECT: simplified work with tracing file, makes possible to hide information that discloses logics behind software module operation.
10 cl, 6 dwg

Description

Область техникиTechnical field

Изобретение относится к способам и устройствам формирования и передачи файлов трассировки.The invention relates to methods and devices for generating and transmitting trace files.

Уровень техникиState of the art

В настоящее время активно развиваются и используются компьютеры, которые применяются в различных областях жизни. Однако в ходе работы компьютера могут возникать различные сбои. Поэтому возникает необходимость в определении причин сбоя.Currently, computers that are used in various areas of life are actively developed and used. However, various computer malfunctions can occur during computer operation. Therefore, there is a need to determine the causes of the failure.

В настоящее время существует множество способов определения причин сбоя. Одним из таких способов является формирование файлов трассировки.Currently, there are many ways to determine the cause of a failure. One such way is to generate trace files.

Трассировка - протоколирование работы программы с целью анализа ее активности в случае каких-то проблем при работе программы. Как правило, файл трассировки делают в текстовом виде. В тексте программы указывается вызов функции, которая сохраняет указанные ей строки текста. Когда программа компилируется, эти строки попадают в файл программного модуля. Затем эти строки и программный модуль попадают к клиенту. Клиент в случае каких-то проблем включает режим трассировки (трассировка ведется по запросу клиента). Программа создает файл трассировки и записывает туда строки по ходу выполнения действий. Строки могут содержать разные параметры, например имена файлов, которые открываются, коды ошибок, возникшие при открытии.Tracing - logging the work of the program in order to analyze its activity in case of any problems during the work of the program. As a rule, the trace file is made in text form. The text of the program indicates a call to a function that saves the lines of text specified by it. When the program compiles, these lines get to the program module file. Then these lines and the program module get to the client. In case of any problems, the client turns on the trace mode (tracing is carried out at the request of the client). The program creates a trace file and writes lines there as actions are performed. Strings can contain various parameters, for example, the names of files that open, error codes that occurred when opening.

Затем клиент передает полученный файл трассировки разработчику. Разработчик анализирует полученный файл и определяет причину возникновения ошибки или сбоя.The client then passes the resulting trace file to the developer. The developer analyzes the received file and determines the cause of the error or failure.

Однако в этом случае возникает проблема - клиент может видеть строки, которые рассказывают о том, что происходит во время работы программы. Это приводит к тому, что может быть раскрыто ноу-хау и другие сведения, которые не желательные для общего раскрытия.However, in this case, a problem arises - the client can see lines that tell about what happens while the program is running. This leads to the fact that know-how and other information that is not desirable for general disclosure may be disclosed.

Для устранения этой проблемы существуют следующие способы. Первый способ - минимизировать трассировку. Второй способ - маскировка, т.е. вместо явного описания действия пишется определенное слово или сокращение. Но в этом случае возникает проблема - впоследствии становится сложно расшифровать написанный текст.The following methods are available to resolve this issue. The first way is to minimize tracing. The second method is camouflage, i.e. instead of an explicit description of the action, a specific word or abbreviation is written. But in this case a problem arises - subsequently it becomes difficult to decipher the written text.

На фиг.1 показана блок-схема формирования и передачи файла трассировки. На этом чертеже показаны две стороны - сторона разработчика (101) и сторона пользователя приложения (103). Разработчик на своей стороне разрабатывает продукт (105) и как результат собирает исполняемый модуль (107), который содержит данные (109), необходимые для трассировки работы этого модуля. Затем разработчик выпускает продукт или другим способом передает пользователю свои модули (111). На стороне пользователя данные трассировки видны в читабельном виде (113). Во время исполнения (115) модуль создает трассировку своей работы (117). Пользователь отсылает трассировку разработчику (119), где полученные данные (121) анализируются (123).Figure 1 shows a block diagram of the formation and transmission of the trace file. This drawing shows two sides — the developer side (101) and the user side of the application (103). The developer, on his side, develops the product (105) and as a result collects the executable module (107), which contains the data (109) necessary to trace the operation of this module. Then, the developer releases the product or transfers its modules (111) to the user in another way. On the user side, trace data is readable (113). At runtime (115), the module creates a trace of its work (117). The user sends the trace to the developer (119), where the received data (121) is analyzed (123).

Такой способ формирования и передачи файла трассировки описан в патенте US 6988263, опубликованном 17.01.2006, и патенте US 6754890, опубликованном 22.06.2004.Such a method of generating and transmitting a trace file is described in US Pat. No. 6,988,263, published Jan. 17, 2006, and US Pat. No. 6754890, published on June 22, 2004.

Однако этот способ также имеет недостатки. На стороне пользователя данные для трассировки внутри модуля (113) видны в читабельном виде, что уже представляет вектор атаки по отношению к разработчику - пользователь может предполагать внутреннюю логику работы модуля, основываясь на этих данных. Данные трассировки (117) содержат не только информацию о действиях, выполненных во время работы модуля, но также и о последовательности их выполнения, и об объектах, над которыми производились действия во время работы. Анализ этого файла дает второй вектор атаки и предоставляет пользователю максимум информации о внутренней логике модуля.However, this method also has disadvantages. On the user side, the data for tracing inside the module (113) is visible in a readable form, which already represents the attack vector in relation to the developer - the user can assume the internal logic of the module based on this data. Trace data (117) contain not only information about the actions performed during the module's operation, but also about the sequence of their execution, and about the objects that were performed during the operation. Analysis of this file gives a second attack vector and provides the user with maximum information about the internal logic of the module.

Таким образом, имеется необходимость в создании способа и устройства формирования и передачи файла трассировки, который можно легко восстанавливать и в котором определенные данные не могли бы быть прочитаны клиентом или каким-либо другим третьим лицом.Thus, there is a need to create a method and apparatus for generating and transmitting a trace file that can be easily restored and in which certain data could not be read by the client or any other third party.

Краткое изложение изобретенияSUMMARY OF THE INVENTION

Настоящее изобретение предназначено для формирования и передачи файла трассировки.The present invention is intended to generate and transmit a trace file.

Способ формирования и передачи файла трассировки содержит этапы, на которых: на стороне разработчика компилируют программу с формированием исполняемого программного модуля, который содержит данные, необходимые для трассировки работы этого модуля; в сформированном программном модуле заменяют имеющиеся текстовые строки трассировки на соответствующие идентификаторы; пользователю передают упомянутую скомпилированную программу с формированным программным модулем, в котором заменены строки трассировки на соответствующие идентификаторы; во время исполнения программы сохраняют информацию о ходе работы модуля, формируя тем самым файл трассировки; передают файл трассировки на сторону разработчика, где осуществляют замену идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки, которые ранее были заменены на стороне разработчика после компиляции программы, после чего осуществляют анализ полученных замененных текстовых строк и упомянутой информации, сохраненной в упомянутый файл трассировки на стороне пользователя.A method for generating and transmitting a trace file contains the steps in which: on the developer's side, a program is compiled with the formation of an executable program module that contains the data necessary to trace the operation of this module; in the generated program module, replace the existing text trace lines with the corresponding identifiers; the user is referred to the compiled program with the generated software module, in which the trace lines are replaced with the corresponding identifiers; during program execution, information is stored on the module’s progress, thereby forming a trace file; transmit the trace file to the developer side, where they replace the identifiers of the lines in the said trace file with the corresponding text lines that were previously replaced on the developer's side after compiling the program, and then analyze the received replaced text lines and the information stored in the mentioned trace file on user side.

В частном варианте текстовые строки и соответствующие им идентификаторы хранятся в базе данных.In a private embodiment, text strings and their corresponding identifiers are stored in a database.

В другом частном варианте на этапе замены текстовых строк трассировки на соответствующие идентификаторы дополнительно осуществляют замену данных о форматировании строкой типов параметров.In another particular embodiment, at the stage of replacing trace text strings with corresponding identifiers, formatting data is additionally replaced with a string of parameter types.

Еще в одном частном варианте при замене идентификаторов строк в упомянутом окончательном файле трассировки на соответствующие текстовые строки дополнительно осуществляют форматирование данных их трассировки.In another particular embodiment, when replacing the line identifiers in the said final trace file with the corresponding text lines, they additionally format their trace data.

В другом частном варианте упомянутая база данных содержит базу программных модулей и базу строк, при этом база программных модулей содержит по крайней мере идентификатор программного модуля и ассоциированные с ним - имя файла модуля, дату компиляции модуля, количество строк трассировки, имя и версия продукта, в который входил модуль, и версия модуля, а база строк содержит идентификатор программного модуля, в котором была строка, идентификатор строки, уникальный для модуля, и текст строки.In another particular embodiment, said database contains a database of program modules and a database of strings, while the database of program modules contains at least the identifier of the program module and associated ones — the name of the module file, the compilation date of the module, the number of trace lines, the name and version of the product, which included the module and the version of the module, and the database of strings contains the identifier of the program module, in which there was a string, a string identifier unique to the module, and the text of the string.

Система формирования и передачи файла трассировки, содержащая средство, установленное на стороне разработчика, для компиляции программы и формирования исполняемого программного модуля, который содержит данные, необходимые для трассировки работы этого модуля; базу данных для хранения текстовых строк трассировки и соответствующих им идентификаторов; средство для замены имеющихся текстовых строк трассировки в сформированном программном модуле на соответствующие идентификаторы, хранящиеся в упомянутой базе данных; средство передачи пользователю упомянутой скомпилированной программы с формированным программным модулем, в котором заменены строки трассировки на соответствующие идентификаторы; средство формирования файла трассировки, которое предназначено для сохранения информации о ходе работы программы в файл трассировки во время исполнения программы; средство передачи сформированного файла трассировки на сторону разработчика; средство замены идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки, хранящиеся в базе данных и которые ранее были заменены на стороне разработчика после компиляции программы; средство вывода разработчику полученных замененных текстовых строк и упомянутой информации, сохраненной в упомянутый файл трассировки на стороне пользователя, для осуществления анализа разработчиком этих текстовых строк и упомянутой информации.A system for generating and transmitting a trace file containing means installed on the developer's side for compiling a program and generating an executable program module that contains data necessary for tracing the operation of this module; a database for storing trace text strings and their corresponding identifiers; means for replacing the existing text trace lines in the generated software module with the corresponding identifiers stored in said database; means for transmitting to the user the aforementioned compiled program with the generated program module, in which the trace lines are replaced with the corresponding identifiers; means for generating a trace file, which is designed to save information about the progress of the program in a trace file during program execution; means for transmitting the generated trace file to the developer side; means for replacing line identifiers in said trace file with corresponding text lines stored in the database and which were previously replaced on the developer's side after compiling the program; means for outputting to the developer the received replaced text lines and said information stored in said trace file on the user side, for the developer to analyze these text lines and said information.

В частном варианте упомянутые средства замены выполнены в виде одного средства.In a particular embodiment, said replacement means are made in the form of a single means.

Еще в одном частном варианте упомянутое средство замены имеющихся текстовых строк трассировки на соответствующие идентификаторы дополнительно осуществляет замену данных о форматировании строкой типов параметров.In another particular embodiment, said means of replacing existing trace text strings with corresponding identifiers additionally replaces formatting data with a string of parameter types.

В другом частном варианте упомянутое средство замены идентификаторов на соответствующие текстовые строки дополнительно осуществляет форматирование данных трассировки.In another particular embodiment, said means for replacing identifiers with corresponding text strings further format the trace data.

Еще в одном частном варианте упомянутая база данных содержит базу программных модулей и базу строк, при этом база программных модулей содержит по крайней мере идентификатор программного модуля и ассоциированные с ним - имя файла программного модуля, дату компиляции программного модуля, количество строк трассировки, имя и версия продукта, в который входил программный модуль, и версия программного модуля, а база строк содержит программный модуль, в котором была строка, идентификатор строки, уникальный для модуля, и текст строки.In another particular embodiment, the said database contains a database of program modules and a database of strings, while the database of program modules contains at least the identifier of the program module and associated ones — the name of the program module file, the compilation date of the program module, the number of trace lines, name and version the product, which included the software module, and the version of the software module, and the database of strings contains a software module in which there was a string, a string identifier unique to the module, and the text of the string.

Краткое описание чертежейBrief Description of the Drawings

Дополнительные цели, признаки и преимущества настоящего изобретения будут очевидными из прочтения последующего описания осуществления изобретения со ссылкой на прилагаемые чертежи, на которых:Additional objectives, features and advantages of the present invention will be apparent from reading the following description of an embodiment of the invention with reference to the accompanying drawings, in which:

фиг.1 показывает блок-схему алгоритма формирования, передачи и анализа файла трассировки, известного из уровня техники;figure 1 shows a block diagram of an algorithm for generating, transmitting and analyzing a trace file known in the art;

фиг.2 показывает блок-схему алгоритма формирования, передачи и анализа файла трассировки в соответствии с настоящим изобретением;figure 2 shows a block diagram of an algorithm for generating, transmitting and analyzing a trace file in accordance with the present invention;

фиг.3 показывает блок-схему преобразования программного модуля для бинарной трассировки;figure 3 shows a block diagram of the conversion of the software module for binary tracing;

фиг.4 показывает блок-схему алгоритма восстановления данных трассировки в читаемый вид;figure 4 shows a block diagram of an algorithm for restoring trace data in a readable form;

фиг.5 показывает структуру базы данных;5 shows a database structure;

фиг.6 показывает структурную блок-схему системы формирования и передачи модуля трассировки в соответствии с настоящим изобретением.6 shows a structural block diagram of a system for generating and transmitting a trace module in accordance with the present invention.

Подробное раскрытие предпочтительных вариантов осуществленияDetailed disclosure of preferred embodiments

Объекты и признаки настоящего изобретения и способы для достижения этих объектов и признаков станут очевидными посредством отсылки к примерным вариантам осуществления. Однако настоящее изобретение не ограничивается примерными вариантами осуществления, раскрытыми ниже, оно может воплощаться в различных видах. Сущность, определенная в описании, является ничем иным, как конкретными деталями, обеспеченными для помощи специалисту в области техники в исчерпывающем понимании изобретения, и настоящее изобретение определяется только в объеме приложенной формулы.The objects and features of the present invention and methods for achieving these objects and features will become apparent by reference to exemplary embodiments. However, the present invention is not limited to the exemplary embodiments disclosed below, it can be embodied in various forms. The essence defined in the description is nothing more than the specific details provided to assist the specialist in the field of technology in a comprehensive understanding of the invention, and the present invention is defined only in the scope of the attached claims.

Для ясности изобретения необходимо отметить следующее. Существует две стороны. Первая сторона - разработчик, а вторая сторона - пользователь.For clarity of the invention, the following should be noted. There are two sides. The first side is the developer, and the second side is the user.

На обеих сторонах используются широко известные компьютеры. В общем случае эти компьютеры содержат соединенные через шину процессор (CPU) и память, а также дисплей для отображения различной информации. Память может быть различная, такая как ROM, RAM, EPROM, EEPROM и т.п. Компьютеры также содержат мышь и клавиатура для ввода и управления информации. Эти компьютеры могут содержать и другие известные устройства, такие, как модем, джойстик и т.д.Well-known computers are used on both sides. In general, these computers comprise a processor (CPU) and memory connected via a bus, as well as a display for displaying various information. The memory may be different, such as ROM, RAM, EPROM, EEPROM, etc. Computers also contain a mouse and keyboard for entering and managing information. These computers may contain other known devices, such as a modem, joystick, etc.

Компьютеры используют различные операционные системы, например операционная система WINDOWS, которая имеет различные версии, такие как WINDOWS 98, WINDOWS 2000, WINDOWS XP и т.п.; операционная система Linux, операционные системы DOS, Novell, Unix, MacOS, IBM OS/390 и т.д.Computers use various operating systems, for example, the WINDOWS operating system, which has various versions, such as WINDOWS 98, WINDOWS 2000, WINDOWS XP, etc .; Linux operating system, DOS, Novell, Unix, MacOS, IBM OS / 390 operating systems, etc.

Компьютеры на стороне пользователя и компьютеры на стороне разработчика могут соединяться друг с другом через широко известные сети, таких как локальные вычислительные сети (LAN), региональные сети, WLAN, сеть Internet и т.д. Передача информации, в том числе скомпилированная программа и модуль файла трассировки, сформированный на стороне разработчика, может осуществляться по различным сетям с использованием модемов. Аналогичным способом передается информация, в том числе и окончательный модуль файла трассировки, сформированный на стороне пользователя, также может передаваться по сети с использованием модемов и локальных вычислительных сетей (ЛВС).Computers on the user side and computers on the developer side can connect to each other through well-known networks such as local area networks (LANs), regional networks, WLANs, the Internet, etc. Information transfer, including a compiled program and a trace file module generated on the developer's side, can be carried out on various networks using modems. In a similar way, information is transmitted, including the final trace file module generated on the user side, can also be transmitted over the network using modems and local area networks (LANs).

Однако здесь необходимо отметить, что модуль файла трассировки, сформированный на стороне разработчика, и скомпилированная программа может передаваться пользователю другим способом. Например, путем продажи на других носителях информации: CD, DVD и др.However, it should be noted here that the trace file module generated on the developer's side and the compiled program can be transferred to the user in another way. For example, by selling on other storage media: CD, DVD, etc.

На фиг.2 показана блок-схема формирования и передачи модуля файла трассировки в соответствии с настоящим изобретении. Есть две стороны - сторона разработчика (201) и сторона пользователя приложения (203). Разработчик на своей стороне разрабатывает программный продукт (205) и как результат собирает исполняемый программный модуль (207), который содержит данные (209), необходимые для трассировки работы этого программного модуля.Figure 2 shows a block diagram of the formation and transmission of a trace file module in accordance with the present invention. There are two sides - the developer side (201) and the application user side (203). The developer, on his side, develops the software product (205) and as a result collects the executable software module (207), which contains the data (209) needed to trace the operation of this software module.

Далее модуль обрабатывается специальным образом (211), когда строки трассировки из модуля помещаются в базу данных (219). Строки заменяются идентификаторами строк, а данные о форматировании - строкой типов параметров (213). Этот процесс замены будет подробно описан далее со ссылкой на фиг.3.Next, the module is processed in a special way (211) when trace lines from the module are placed in the database (219). Strings are replaced by string identifiers, and formatting data is replaced by a string of parameter types (213). This replacement process will be described in detail below with reference to FIG.

Затем разработчик выпускает продукт или другим способом передает пользователю свои модули (215). Как выше отмечалось, такая передача может быть осуществлена, например, путем продажи пользователю этого модуля или путем передачи этого модуля по сети.Then, the developer releases the product or transfers its modules to the user in another way (215). As noted above, such a transfer can be carried out, for example, by selling to the user this module or by transmitting this module over the network.

На стороне пользователя данные трассировки не видны в читабельном виде (217). Во время исполнения (221), программный модуль создает трассировку своей работы (227). Пользователь отсылает трассировку разработчику (225), где полученные данные (223) декодируются (229). На этом этапе по идентификаторам строк из базы данных (219) получаются оригинальные строки, данные их трассировки (223) форматируются и выводятся в читабельном виде (231). Этот процесс замены будет подробно описан ниже со ссылкой на фиг.4On the user side, trace data is not readable (217). At runtime (221), the software module creates a trace of its work (227). The user sends the trace to the developer (225), where the received data (223) is decoded (229). At this stage, using the line identifiers from the database (219), the original lines are obtained, their trace data (223) are formatted and displayed in a readable form (231). This replacement process will be described in detail below with reference to FIG.

Полученные читабельные данные анализируются (233) разработчиком.The readable data obtained is analyzed (233) by the developer.

Как видим, в этой схеме на стороне пользователя нет читабельных в программном модуле (217). В данных, полученных при трассировке (227), отсутствует описание действий, только объекты, над которыми выполнялись действия. Также стоит отметить, что в данных (227) числа сохраняются в бинарном виде. Таким образом единственные данные, которые остаются читабельными - это строковые параметры, например имена файлов, которые обычно составляют незначительную часть трассировки. Пользователь на основании этих данных не может предполагать внутреннюю логику работы модуля.As you can see, in this scheme on the user side there are no readable ones in the software module (217). The data obtained during trace (227) does not contain a description of actions, only the objects on which actions were performed. It is also worth noting that in the data (227) the numbers are stored in binary form. Thus, the only data that remains readable is string parameters, such as file names, which usually make up a small part of the trace. Based on this data, the user cannot assume the internal logic of the module.

Следует также отметить, что такой способ формирования файла трассировки позволяет разработчику решать, нужно ли ему конвертировать программный модуль, и таким образом скрывать данные трассировки, либо не конвертировать программный модуль и иметь файл трассировки в читабельном виде. Последнее может использоваться при внутреннем тестировании продукта.It should also be noted that this method of generating a trace file allows the developer to decide whether he needs to convert the software module, and thus hide the trace data, or not convert the software module and have the trace file readable. The latter can be used for internal product testing.

Далее со ссылкой на фиг.3 будет описана замена текстовых строк программного модуля на соответствующие идентификаторы для бинарной трассировки.Next, with reference to FIG. 3, the replacement of the text lines of the program module with the corresponding identifiers for binary tracing will be described.

После начала обработки программного модуля (301) открывается файл модуля (303), в котором находятся все строки трассировки (305). Файл модуля регистрируется (307) в базе данных (309) и получает идентификатор модуля (311). Далее для каждой строки выполняется набор операций (313). Строка помещается (315) в базу данных (317) и получает идентификатор строки (319). Пара идентификаторов модуля и строки позволяют уникально определить строку. В строке выделяется форматирование параметров и формируется строка типов параметров (321). Далее формируется бинарная последовательность (323), которой заменяется (325) оригинальная строка в модуле. Эта процедура повторяется для каждой строки (327). После замены всех строк файл закрывается (329) и на выходе (331) получается программный модуль с бинарной трассировкой.After the processing of the program module (301) has begun, the module file (303) opens, in which all trace lines (305) are located. The module file is registered (307) in the database (309) and receives the module identifier (311). Next, for each row, a set of operations (313) is performed. The row is placed (315) in the database (317) and receives the row identifier (319). A pair of module identifiers and a string allow you to uniquely identify a string. The parameter formatting is highlighted in the line and a line of parameter types is formed (321). Next, a binary sequence (323) is formed, which replaces (325) the original string in the module. This procedure is repeated for each row (327). After replacing all the lines, the file is closed (329) and at the output (331) a software module with binary tracing is obtained.

Теперь со ссылкой на фиг.4 будет подробно описан процесс восстановления данных трассировки в читабельный вид.Now with reference to figure 4 will be described in detail the process of restoring trace data in a readable form.

Полученные от пользователя данные бинарной трассировки открываются для чтения (403) и подготавливается вывод для текстовых данных (405). Далее начинается цикл (407). Из файла трассировки считывается блок данных (409) и разделяется на идентификатор модуля, идентификатор строки и параметры (411). По идентификаторам определяется (413) из базы строк (415) вынимается оригинальная строка (417), для которой выполняется форматирование с помощью параметров (419) и выводится полученная текстовая строка (421). Цикл (423) повторяется пока не обработаны все данные бинарной трассировки. По окончании входных данных файлы закрываются (425).The binary trace data received from the user is opened for reading (403) and the output for text data is prepared (405). Next begins the cycle (407). A data block (409) is read from the trace file and divided into module identifier, line identifier, and parameters (411). The identifiers determine (413) from the database of strings (415) the original string (417) is taken out, for which formatting is performed using parameters (419) and the resulting text string (421) is output. Loop (423) is repeated until all binary trace data has been processed. At the end of the input, the files are closed (425).

На фиг.5 представлена структура базы данных. Как видно из этого чертежа база данных состоит из двух баз данных - база программных модулей (TraceFiles) и база строк (TraceStrings).Figure 5 presents the structure of the database. As you can see from this drawing, the database consists of two databases - the database of software modules (TraceFiles) and the database of strings (TraceStrings).

База программных модулей содержит идентификатор модуля и ассоциированные с ним - имя файла модуля, дату компиляции модуля, количество строк трассировки, имя и версия продукта, в который входил файл, и версия модуля.The base of program modules contains the identifier of the module and associated with it - the name of the module file, the compilation date of the module, the number of trace lines, the name and version of the product that included the file, and the version of the module.

База строк содержит идентификатор модуля, в котором была строка, идентификатор строки, уникальный для модуля, и тест строки.The string database contains the identifier of the module in which the string was, a string identifier unique to the module, and a string test.

Отметим также, что база программных модулей используется реферативно и в процессе восстановления бинарной трассировки практически не участвует. Возможна реализация, когда база программных модулей не ведется. В таком случае идентификатор строки уникально определяет строку между всеми строками для всех модулей.We also note that the base of software modules is used abstractly and is practically not involved in the process of restoring binary tracing. Implementation is possible when the base of software modules is not maintained. In this case, the row identifier uniquely identifies the row between all rows for all modules.

Описанный выше способ формирования и передачи файла трассировки реализуется с помощью системы формирования и передачи файла трассировки.The method for generating and transmitting a trace file described above is implemented using a system for generating and transmitting a trace file.

Эта система, как видно из чертежа (фиг.6), содержит взаимосвязанные между собой средство (610) для компиляции программы и формирования исполняемого программного модуля; базу данных (620) для хранения текстовых строк трассировки и соответствующих им идентификаторов; средство (630) для замены имеющихся текстовых строк трассировки в скомпилированном программном модуле на соответствующие идентификаторы, хранящиеся в упомянутой базе данных; средство передачи (640) пользователю упомянутой скомпилированной программы с программным модулем, в котором заменены строки трассировки на соответствующие идентификаторы; средство (650) формирования файла трассировки, которое предназначено для сохранения информации о ходе работы программы в файл трассировки во время исполнения программы; средство (660) передачи сформированного файла трассировки на сторону разработчика; средство (670) замены идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки, хранящиеся в базе данных и которые ранее были заменены на стороне разработчика во время компиляции программы; средство (680) вывода разработчику полученных замененных текстовых строк и упомянутой информации, сохраненной в упомянутый окончательный модуль на стороне пользователя, для осуществления анализа разработчиком этих текстовых строк и упомянутой информации.This system, as can be seen from the drawing (Fig.6), contains interconnected means (610) for compiling a program and forming an executable program module; a database (620) for storing trace text strings and their corresponding identifiers; means (630) for replacing existing trace text strings in the compiled program module with corresponding identifiers stored in said database; transmission means (640) to the user of said compiled program with a software module in which trace lines are replaced with corresponding identifiers; means (650) for generating a trace file, which is designed to save information about the program progress to a trace file during program execution; means (660) for transmitting the generated trace file to the developer side; means (670) for replacing line identifiers in said trace file with corresponding text lines stored in the database and which were previously replaced on the developer's side during program compilation; means (680) for outputting to the developer the received replaced text strings and said information stored in said final module on the user side, for the developer to analyze these text strings and said information.

Здесь следует отметить, что средства 610, 620, 630, 640, 670, 680 устанавливаются на стороне разработчика. Все остальные средства устанавливаются на стороне пользователя.It should be noted here that the means 610, 620, 630, 640, 670, 680 are installed on the side of the developer. All other means are installed on the user side.

Как было отмечено выше со ссылкой на фиг.2-4, разработчик с помощью средства 610 осуществляет компиляцию программы и программного модуля, содержащего текстовые строки. После чего средство 630 осуществляет замену текстовых строк на соответствующие идентификаторы. Для этого средство 630 обращается к базе данных 620, из которой это средство получает соответствующие идентификаторы заменяемых строк модуля файла трассировки. Этот процесс был подробно описан выше со ссылкой на фиг.3.As noted above with reference to figure 2-4, the developer using the means 610 compiles the program and program module containing text strings. After which the tool 630 replaces the text strings with the corresponding identifiers. For this, the tool 630 accesses the database 620, from which the tool obtains the corresponding identifiers of the replaced lines of the trace file module. This process has been described in detail above with reference to FIG. 3.

После того, как средство 630 осуществило замену текстовых строк на соответствующие идентификаторы, то оно передает сформированный программный модуль на средство 640 передачи. Это средство осуществляет передачу модуля на сторону пользователя.After the means 630 has replaced the text strings with the corresponding identifiers, it transmits the generated program module to the transmission means 640. This tool transfers the module to the user side.

На стороне пользователя средство 650 формирования файла трассировки осуществляет сохранение информации о ходе работы программы в файл трассировки во время исполнения программы. После того, как был сформирован файл трассировки средство 660 передачи осуществляет передачу сформированного файла трассировки на сторону разработчика.On the user side, the trace file generation tool 650 stores information on the progress of the program into a trace file during program execution. After the trace file has been generated, the transmission means 660 transfers the generated trace file to the developer.

Полученный файл поступает на средство 670 замены идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки. Для этого это средство обращается к базе данных 620, из которой получает текстовые строки, хранящиеся в базе данных и которые соответствуют тем идентификаторам, которые содержатся в файле трассировке. Таким образом, осуществляется замена идентификаторов на строки, которые ранее были заменены на стороне разработчика во время компиляции программы. Этот процесс был подробно описан выше со ссылкой на фиг.4.The resulting file is supplied to the means 670 replacing the line identifiers in said trace file with the corresponding text lines. To do this, this tool accesses the database 620, from which it receives text strings stored in the database and which correspond to those identifiers contained in the trace file. Thus, identifiers are replaced with strings that were previously replaced on the developer's side during program compilation. This process has been described in detail above with reference to FIG. 4.

После этого полученная текстовая информация передается со средства 670 на средство 680 вывода. Это средство осуществляет вывод полученной текстовой информации (т.е. полученные замененные текстовые строки и упомянутая информация, сохраненная в упомянутый файл трассировки на стороне пользователя) на экран, в файл или на бумажный носитель. После чего разработчик может осуществлять анализ этих текстовых строк и упомянутой информации.After that, the received text information is transmitted from the means 670 to the means 680 output. This tool outputs the received text information (i.e., received replaced text strings and said information stored in said trace file on the user side) to a screen, a file, or to paper. Then the developer can analyze these text strings and the information mentioned.

Следует также отметить, что средства замены 630 и 670 могут быть выполнены в виде одного средства.It should also be noted that the replacement means 630 and 670 can be made in the form of a single tool.

В заключении следует отметить, что приведенные в описании сведения являются только примерами, которые не ограничивают объем настоящего изобретения, определенного формулой. Специалисту в данной области становится понятным, что могут существовать и другие варианты осуществления настоящего изобретения, согласующиеся с сущностью и объемом настоящего изобретения.In conclusion, it should be noted that the information provided in the description are only examples that do not limit the scope of the present invention defined by the claims. One skilled in the art will recognize that there may be other embodiments of the present invention consistent with the spirit and scope of the present invention.

Claims (10)

1. Способ формирования и передачи файла трассировки, содержащий этапы, на которых:
на стороне разработчика компилируют программу с формированием исполняемого программного модуля, который содержит данные, необходимые для трассировки работы этого модуля;
в сформированном программном модуле заменяют имеющиеся текстовые строки трассировки на соответствующие идентификаторы, пользователю передают упомянутую скомпилированную программу с программным модулем, в котором заменены строки трассировки на соответствующие идентификаторы,
во время исполнения программы упомянутый программный модуль сохраняет информацию о ходе работы модуля, формируя тем самым файл трассировки,
передают файл трассировки на сторону разработчика, где осуществляют замену идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки, которые ранее были заменены на стороне разработчика после компиляции программы, после чего осуществляют анализ полученных замененных текстовых строк и упомянутой информации, сохраненной в упомянутый файл трассировки на стороне пользователя.
1. A method for generating and transmitting a trace file, comprising the steps of:
on the developer's side, the program is compiled with the formation of an executable program module that contains the data necessary to trace the operation of this module;
in the generated program module, the existing text trace lines are replaced with the corresponding identifiers, the user is given the mentioned compiled program with the program module in which the trace lines are replaced with the corresponding identifiers,
during program execution, said program module saves information about the module’s progress, thereby forming a trace file,
transmit the trace file to the developer side, where they replace the identifiers of the lines in the said trace file with the corresponding text lines that were previously replaced on the developer's side after compiling the program, and then analyze the received replaced text lines and the information stored in the mentioned trace file on user side.
2. Способ по п.1, в котором текстовые строки и соответствующие им идентификаторы хранятся в базе данных.2. The method according to claim 1, in which text strings and their corresponding identifiers are stored in a database. 3. Способ по п.2, в котором на этапе замены текстовых строк трассировки на соответствующие идентификаторы дополнительно осуществляют замену данных о форматировании строкой типов параметров.3. The method according to claim 2, in which at the stage of replacing the trace text strings with the corresponding identifiers, the formatting data is additionally replaced with a string of parameter types. 4. Способ по п.3, в котором при замене идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки дополнительно осуществляют форматирование данных их трассировки.4. The method according to claim 3, in which when replacing the line identifiers in the said trace file with the corresponding text lines, formatting data of their trace is additionally carried out. 5. Способ по п.4, в котором упомянутая база данных содержит базу программных модулей и базу строк, при этом база программных модулей содержит по крайней мере идентификатор модуля и ассоциированные с ним имя файла модуля, дату компиляции модуля, количество строк трассировки, имя и версия продукта, в который входил модуль, и версия модуля, а база строк содержит идентификатор программного модуля, в котором была строка, идентификатор строки, уникальный для модуля, и текст строки.5. The method according to claim 4, in which said database contains a database of program modules and a database of strings, while the database of program modules contains at least a module identifier and associated module file name, module compilation date, number of trace lines, name and the version of the product, which included the module, and the version of the module, and the database of strings contains the identifier of the program module, in which there was a string, a string identifier unique to the module, and the text of the string. 6. Система формирования и передачи файла трассировки, содержащая средство, установленное на стороне разработчика, для компиляции программы и формирования исполняемого программного модуля, который содержит данные, необходимые для трассировки работы этого модуля;
базу данных для хранения текстовых строк трассировки и соответствующих им идентификаторов;
средство для замены имеющихся текстовых строк трассировки в скомпилированном программном модуле на соответствующие идентификаторы, хранящиеся в упомянутой базе данных;
средство передачи пользователю упомянутой скомпилированной программы с программным модулем, в котором заменены строки трассировки на соответствующие идентификаторы, средство формирования файла трассировки, которое предназначено для сохранения информации о ходе работы программного модуля в файл трассировки во время исполнения программы;
средство передачи сформированного файла трассировки на сторону разработчика,
средство замены идентификаторов строк в упомянутом файле трассировки на соответствующие текстовые строки, хранящиеся в базе данных и которые ранее были заменены на стороне разработчика после компиляции программы,
средство вывода разработчику полученных замененных текстовых строк и упомянутой информации, сохраненной в упомянутый файл трассировки на стороне пользователя, для осуществления анализа разработчиком этих текстовых строк и упомянутой информации.
6. A system for generating and transmitting a trace file containing a tool installed on the developer's side for compiling a program and generating an executable program module that contains data necessary for tracing the operation of this module;
a database for storing trace text strings and their corresponding identifiers;
means for replacing the existing text trace lines in the compiled program module with the corresponding identifiers stored in said database;
means for transmitting to the user the aforementioned compiled program with a software module in which the trace lines are replaced with the corresponding identifiers; means for generating a trace file which is intended to store information about the progress of the program module into the trace file during program execution;
means for transmitting the generated trace file to the developer side,
means for replacing line identifiers in said trace file with corresponding text lines stored in the database and which were previously replaced on the developer's side after compiling the program,
means for outputting to the developer the received replaced text strings and said information stored in said trace file on the user side, for the developer to analyze these text strings and said information.
7. Система по п.6, в которой упомянутые средства замены выполнены в виде одного средства.7. The system according to claim 6, in which the said means of replacement are made in the form of a single tool. 8. Система по п.7, в которой упомянутое средство замены имеющихся текстовых строк трассировки на соответствующие идентификаторы дополнительно осуществляет замену данных о форматировании строкой типов параметров.8. The system according to claim 7, in which said means of replacing existing text trace lines with corresponding identifiers additionally replaces the formatting data with a string of parameter types. 9. Система по п.8, в которой упомянутое средство замены идентификаторов на соответствующие текстовые строки дополнительно осуществляет форматирование данных их трассировки.9. The system of claim 8, in which the said means of replacing identifiers with the corresponding text strings further formats the data of their trace. 10. Система по п.8, в которой упомянутая база данных содержит базу программных модулей и базу строк, при этом база программных модулей содержит по крайней мере идентификатор программного модуля и ассоциированные с ним имя файла модуля, дату компиляции модуля, количество строк трассировки, имя и версия продукта, в который входил модуль, и версия модуля, а база строк содержит идентификатор программного модуля, в котором была строка, идентификатор строки, уникальный для модуля, и текст строки. 10. The system of claim 8, in which said database contains a database of program modules and a database of strings, while the database of program modules contains at least an identifier of a program module and associated module file name, module compilation date, number of trace lines, name and the version of the product, which included the module, and the version of the module, and the database of strings contains the identifier of the program module in which there was a string, a string identifier unique to the module, and the text of the string.
RU2008130952/09A 2008-07-29 2008-07-29 System and method of control over programs execution with help of binary applications tracing RU2385485C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2008130952/09A RU2385485C1 (en) 2008-07-29 2008-07-29 System and method of control over programs execution with help of binary applications tracing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2008130952/09A RU2385485C1 (en) 2008-07-29 2008-07-29 System and method of control over programs execution with help of binary applications tracing

Publications (1)

Publication Number Publication Date
RU2385485C1 true RU2385485C1 (en) 2010-03-27

Family

ID=42138467

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2008130952/09A RU2385485C1 (en) 2008-07-29 2008-07-29 System and method of control over programs execution with help of binary applications tracing

Country Status (1)

Country Link
RU (1) RU2385485C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2459236C1 (en) * 2011-07-19 2012-08-20 Федеральное государственное военное образовательное учреждение высшего профессионального образования "Военная академия связи им. маршала Советского Союза С.М. Буденного" Министерства обороны Российской Федерации Method and system for monitoring program execution using routing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2459236C1 (en) * 2011-07-19 2012-08-20 Федеральное государственное военное образовательное учреждение высшего профессионального образования "Военная академия связи им. маршала Советского Союза С.М. Буденного" Министерства обороны Российской Федерации Method and system for monitoring program execution using routing

Similar Documents

Publication Publication Date Title
Watson et al. On learning meaningful assert statements for unit test cases
Miles et al. Prime: A methodology for developing provenance-aware applications
US6964034B1 (en) Application development server and a mechanism for providing different views into the same constructs within a strongly encapsulated environment
US11893385B2 (en) Methods and systems for automated software natural language documentation
US7216340B1 (en) Analysis data validation tool for use in enterprise architecture modeling with result based model updating
US7424702B1 (en) Data integration techniques for use in enterprise architecture modeling
US7500149B2 (en) Generating finite state machines for software systems with asynchronous callbacks
Kwon et al. Cloud refactoring: automated transitioning to cloud-based services
CN112104709B (en) Intelligent contract processing method, device, medium and electronic equipment
US9170787B2 (en) Componentization of compiler functionality
Manner et al. Troubleshooting serverless functions: a combined monitoring and debugging approach
JP2006500670A (en) Verifiable processes within heterogeneous distributed computing environments
IL136836A (en) Automatic configuration generation
US10083029B2 (en) Detect application defects by correlating contracts in application dependencies
Cavallaro et al. Synthesizing adapters for conversational web-services from their WSDL interface
US20220237057A1 (en) Code consolidation system
CN101866315A (en) Test method and system of software development tool
Arcelli et al. Exploiting architecture/runtime model-driven traceability for performance improvement
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
Makady et al. Validating pragmatic reuse tasks by leveraging existing test suites
Kirschner et al. Automatic derivation of vulnerability models for software architectures
RU2385485C1 (en) System and method of control over programs execution with help of binary applications tracing
JP7172986B2 (en) Configuration management device, configuration management method, and configuration management program
Becker et al. Modeling of correct self-adaptive systems: a graph transformation system based approach
JP2013030017A (en) Method, device, and program for generating test program