[go: up one dir, main page]

DE102008028702A1 - Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit - Google Patents

Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit Download PDF

Info

Publication number
DE102008028702A1
DE102008028702A1 DE200810028702 DE102008028702A DE102008028702A1 DE 102008028702 A1 DE102008028702 A1 DE 102008028702A1 DE 200810028702 DE200810028702 DE 200810028702 DE 102008028702 A DE102008028702 A DE 102008028702A DE 102008028702 A1 DE102008028702 A1 DE 102008028702A1
Authority
DE
Germany
Prior art keywords
debug
application
unit
information
state information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
DE200810028702
Other languages
German (de)
Inventor
Jörn TREGER
Bertram Drost
Tobias Beschnidt
Emir Rizvanovic
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Giesecke and Devrient GmbH
Original Assignee
Giesecke and Devrient GmbH
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 Giesecke and Devrient GmbH filed Critical Giesecke and Devrient GmbH
Priority to DE200810028702 priority Critical patent/DE102008028702A1/en
Publication of DE102008028702A1 publication Critical patent/DE102008028702A1/en
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3636Debugging of software by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3644Debugging of software by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The method involves carrying out a transmission of the state information (RTS) at the debug-unit (DS). The debug-unit stores the state information in a temporary storage (SP) and it reads from the temporary storage for further processing, if the state information is required for debugging of the debug-event. An independent claim is included for a device for monitoring the progress of an application in a virtual machine of an integrated system.

Description

Die Erfindung betrifft ein Verfahren zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems, bei der die virtuelle Maschine mit einer Debug-Überwachungseinheit versehen wird, welche den Ablauf der Applikation steuert und bei einem Debug-Ereignis zumindest eine Zustandsinformation der Applikation an eine, insbesondere auf einem Testrechner angeordnete, Debug-Einheit überträgt. Die Erfindung betrifft ferner eine Vorrichtung zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems, bei der die virtuelle Maschine mit einer Debug-Überwachungseinheit versehen ist, welche dazu ausgebildet ist, den Ablauf der Applikation zu steuern und bei einem Debug-Ereignis zumindest eine Zustandsinformation der Applikation an eine, insbesondere auf einem Testrechner angeordnete, Debug-Einheit zu übertragen. Weiterhin betrifft die Erfindung einen tragbaren Datenträger.The The invention relates to a method for monitoring the process an application in a virtual machine of an embedded Systems where the virtual machine with a debug monitor is provided, which controls the flow of the application and at a debug event at least a state information of the application to a, in particular arranged on a test computer, debug unit transmits. The invention further relates to a device for monitoring the flow of an application in a virtual machine of a Embedded system in which the virtual machine with a Debug monitoring unit is provided, which is designed to is to control the flow of the application and at least during a debug event a status information of the application to one, in particular on a debug unit arranged to be transmitted to a test computer. Furthermore, the invention relates to a portable data carrier.

Smartcards sind intelligente Vorrichtungen, welche typischerweise einen Prozessor, einen Speicher sowie Ein- und Ausgabemittel aufweisen. Auf diesen ist ein Betriebssystem zum Steuern des Ablaufs von einer oder mehreren Applikationen installiert, welche in den Speicher der Smartcard geladen werden können. In ähnlicher Weise sind viele mobile Endgeräte ausgestattet. Derartige Smartcards und mobile Endgeräte werden auch als eingebettetes System bezeichnet.Smart Cards are smart devices, which are typically a processor, have a memory and input and output means. On this is an operating system for controlling the operation of one or more Applications installed in the memory of the smart card can be loaded. In a similar way equipped many mobile devices. Such smartcards and mobile devices are also called embedded system designated.

Bei der Entwicklung neuer oder der Modifizierung bestehender Applikationen ist die Möglichkeit der Durchführung eines einfachen und schnellen Tests notwendig, um Programmfehler auffinden und beheben zu können.at the development of new or the modification of existing applications is the possibility of carrying out a simple and quick tests necessary to detect and fix bugs to be able to.

Hierzu können sog. Debug-Überwachungseinheiten oder -Monitore verwendet werden. Das Auffinden und Beheben eines Fehlers, das sog. Debuggen, ist bei Applikationen für eingebettete Systeme aufgrund der begrenzten Ressourcen und der eingeschränkten Kommunikation zwischen dem eingebetteten System und einem korrespondierenden Terminal in der Regel schwierig. Die Kommunikation zwischen dem eingebetteten System und einer Terminal-Applikation erfolgt meist über eine serielle Schnittstelle, wobei ein Datenaustausch auf der Basis von Binärdaten erfolgt.For this can use so-called debug monitoring units or monitors be used. Finding and fixing an error, the so-called Debugging is in applications for embedded systems due to limited resources and limited Communication between the embedded system and a corresponding terminal usually difficult. The communication between the embedded System and a terminal application is usually about a serial interface, being based on a data exchange of binary data.

Üblicherweise wird eine sog. Master-Slave-Kommunikation durchgeführt, wobei die Terminal-Applikation den Master und die Applikation des eingebetteten Systems den Slave darstellt. Wenn die Applikation des eingebetteten Systems mit einer entsprechenden Terminal-Applikation zusammenarbeitet, wird von der Master-Applikation ein Kommando in einem nachrichtenähnlichen Format erzeugt, welches als Application Protocol Data Unit (APDU) bezeichnet wird. Diese Nachricht wird zu der Slave-Applikation übertragen, wobei die Master-Applikation auf eine Antwort der Slave-Applikation wartet. Dieses Vorgehen erschwert den Prozess des Debuggens und damit die effiziente Entwicklung von Applikationen für eingebettete Systeme.Usually a so-called master-slave communication is performed, where the terminal application is the master and the application of the embedded Systems represents the slave. If the application of the embedded Systems cooperates with a corresponding terminal application, becomes a command in a message-like form from the master application Format generated as Application Protocol Data Unit (APDU) referred to as. This message is transmitted to the slave application, wherein the master application to a response of the slave application waiting. This approach complicates the process of debugging and thus the efficient development of applications for embedded systems.

Üblicherweise werden deshalb Simulationen auf einem Test-Rechner durchgeführt, wobei dieses Vorgehen den Nachteil aufweist, dass das Debuggen der Simulation nicht das echte Verhalten des eingebetteten Systems zeigt. Es besteht deshalb das Bedürfnis, das Debuggen einer Applikation eines eingebetteten Systems, insbesondere einer Java-Karte, direkt auf dem eingebetteten System vornehmen zu können.Usually Therefore, simulations are performed on a test computer, this approach has the disadvantage that debugging the Simulation does not show the real behavior of the embedded system. There is therefore a need to debug an application an embedded system, especially a Java card, directly on the embedded system.

Hierzu ist es aus der US 2002/0099953 A1 bekannt, einen Debug-Monitor direkt auf einer Chipkarte zu installieren und eine Standardkommunikation mit APDUs zu verwenden, wobei diese Standardkommunikation um Debug-Informationen und Kommandos ergänzt wird.For this it is from the US 2002/0099953 A1 It is known to install a debug monitor directly on a smart card and to use standard communication with APDUs, supplementing this standard communication with debug information and commands.

Die WO 00/68797 A1 schlägt vor, zwei Kommunikationskanäle zu einer Smartcard vorzusehen, wovon einer der beiden Kommunikationskanäle für das Debuggen verwendet wird.The WO 00/68797 A1 Proposes to provide two communication channels to a smartcard, of which one of the two communication channels is used for debugging.

Die US 2005/0128585 A1 offenbart ein Verfahren und ein System zum Überwachen des Betriebs einer Applikation in einer virtuellen Maschine. Mittels eines Debug-Interfaces des eingebetteten Systems wird der Zustand der Applikation in einem Debug-Modus überwacht. Während des Ablaufs der Applikation erzeugte Daten werden durch das Debug-Interface der virtuellen Maschine aufgezeichnet. Anhand der aufgezeichneten Daten kann dann eine Diagnose der beim Betrieb auftretenden Probleme der Applikation vorgenommen werden.The US 2005/0128585 A1 discloses a method and system for monitoring the operation of an application in a virtual machine. By means of a debug interface of the embedded system, the state of the application is monitored in a debug mode. Data generated during the execution of the application is recorded by the debug interface of the virtual machine. Based on the recorded data can then be made a diagnosis of the problems occurring during operation of the application.

Nachteilig bei den oben beschriebenen Vorschlägen ist der Umstand, dass die Performance des Debuggers verhältnismäßig gering ist. Es ist daher Aufgabe der vorliegenden Erfindung, ein Verfahren und eine Vorrichtung anzugeben, mit welchen das Auffinden und Beheben von Fehlern in einer Applikation in einem eingebetteten System, insbesondere einer Java-Karte, auf einfachere und schnellere Weise möglich ist. Es ist ferner Aufgabe der Erfindung, einen tragbaren Datenträger anzugeben, der ein einfaches und effizientes Debuggen einer Applikation unter Umgehung einer Simulation erlaubt.adversely in the proposals described above, the circumstance that the performance of the debugger is proportionate is low. It is therefore an object of the present invention to provide a Specify a method and a device with which the finding and fixing bugs in an application in an embedded System, especially a Java card, on easier and faster Way is possible. It is a further object of the invention to specify a portable disk, which is a simple and efficient debugging of an application bypassing a Simulation allowed.

Diese Aufgaben werden durch ein Verfahren mit den Merkmalen des Patentanspruches 1, eine Vorrichtung mit den Merkmalen des Patentanspruches 15 und einen tragbaren Datenträger mit den Merkmalen des Patentan spruches 17 gelöst. Vorteilhafte Ausgestaltungen ergeben sich aus den abhängigen Patentansprüchen.These objects are achieved by a method having the features of claim 1, a device having the features of claim 15 and a portable data carrier having the features of patent claim 17. advantage Adhesive embodiments emerge from the dependent claims.

Die Erfindung schafft ein Verfahren zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems, bei dem die virtuelle Maschine mit einer Debug-Überwachungseinheit versehen wird, welche den Ablauf der Applikation steuert und bei einem Debug-Ereignis zumindest eine Zustandsinformation der Applikation an eine, insbesondere auf einem Testrechner angeordnete, Debug-Einheit überträgt. Die Übertragung zumindest der Zustandsinformation an die Debug-Einheit erfolgt auf Anforderung der Debug-Einheit. Die Debug-Einheit speichert die Zustandsinformation in einem temporären Speicher und liest diese zur weiteren Verarbeitung aus dem temporären Speicher aus, wenn zum Debugging des Debug-Ereignisses die Zustandsinformation benötigt wird.The The invention provides a method for monitoring the process an application in a virtual machine of an embedded Systems where the virtual machine with a debug monitor is provided, which controls the flow of the application and at a debug event at least a state information of the application to a, in particular arranged on a test computer, debug unit transmits. The transmission of at least the state information to the Debug unit is done at the request of the debug unit. The debug unit stores the state information in a temporary memory and read them for further processing from the temporary Memory if the state information is used to debug the debug event is needed.

Ein Vorteil des erfindungsgemäßen Vorgehens besteht darin, dass durch das Speichern von bestimmten Debugging-Informationen eine wesentlich bessere Performance beim Debuggen erreicht werden kann. Insbesondere kann die Kommunikation zwischen dem zu debuggenden, eingebetteten System mit der darauf ablaufenden Applikation und der auf einem Testrechner angeordneten Debug-Einheit reduziert werden. Bei manchen eingebetteten Systemen ermöglicht das erfindungsgemäße Vorgehen überhaupt erst das Debuggen einer Applikation.One Advantage of the procedure according to the invention exists in that by saving certain debugging information a much better performance can be achieved during debugging can. In particular, the communication between the debugging, embedded system with the running application and the arranged on a test computer debug unit can be reduced. In some embedded systems, the inventive allows First of all, debugging an application.

Zweckmäßigerweise überträgt die Debug-Überwachungseinheit neben der Zustandsinformation zumindest eine statische Debug-Information an die Debug-Einheit, welche die zumindest eine statische Debug-Information in dem temporären Speicher speichert. Die zumindest eine statische Debug-Information umfasst eine oder mehrere statische Variablen und/oder Ob jektbezüge und/oder Methoden oder Frame-Informationen und/oder Methoden-Komponenten-Informationen. Das zusätzliche Speichern von einer oder mehreren der statischen Debug-Informationen ermöglicht eine einfachere und zuverlässigere Erkennung eines Fehlers in der zu überprüfenden Applikation des eingebetteten Systems.Conveniently transmits the debug monitor next to the state information at least static debug information to the debug unit, which is the at least one static debug information in the temporary Memory stores. The at least one static debug information includes one or more static variables and / or object references and / or methods or frame information and / or method component information. The additional storage of one or more of the static debug information allows a simpler and more reliable Detecting an error in the to be checked Application of the embedded system.

In einer weiteren zweckmäßigen Ausgestaltung ist vorgesehen, dass die Debug-Einheit eine Aktualisierung der Zustandsinformation und/oder der zumindest einen statischen Debug-Information durch die Debug-Überwachungseinheit veranlasst, wenn sich nach Wiederaufnahme der zu überwachenden Applikation deren Laufzeitzustand ändert, wobei die aktualisierten Daten an die Debug-Einheit zur Speicherung in dem Speicher übertragen werden. Wenn die Applikation angehalten wird, fordert die Debug-Einheit die Zustandsinformation und/oder die zumindest eine statische Debug-Information von der Debug-Überwachungseinheit an. Diese Informationen werden von der Debug-Einheit dazu verwendet, den gegenwärtigen Programmzustand (einer Software oder einem Softwareingenieur) darzustellen. Der Zustand der Applikation ändert sich nicht, so lange der Ablauf der Applikation weiter unterbrochen bleibt. Wenn jedoch der Ablauf der Applikation fortgesetzt wird, ändert sich deren Laufzeitzustand und die zwischengespeicherten Daten sind hinfällig. Aus diesem Grund stellt die Debug-Einheit eine Aktualisierung der notwendigen Daten sicher, indem sie diese von der Debug-Überwachungseinheit anfordert.In another expedient embodiment provided that the debug unit updating the state information and / or the at least one static debug information by the Debug Monitor initiates when after recovery the application being monitored changes its runtime state, taking the updated data to the debug unit for storage be transmitted in the memory. If the application is stopped, the debug unit requests the state information and / or the at least one static debug information from the debug monitor at. This information is used by the debug unit to do the current program state (a software or a Software engineer). The state of the application changes not, as long as the application process continues interrupted remains. However, if the process of the application continues to change their runtime state and the cached data are obsolete. Because of this, the debug unit sets one Update the necessary data securely by getting these from the Request debug monitor.

Es kann weiter vorgesehen sein, dass der Speicher verschiedene Speicherbereiche umfasst, in welchen die Zustandsinformation und die zumindest eine statische Information abgespeichert werden. Es können beispielsweise unterschiedliche Speicher für unterschiedliche Zwecke oder unterschiedliche Arten von Daten vorgesehen sein. Die Aufteilung und Speicherung der Infor mationen in unterschiedliche Speicherabschnitte kann beispielsweise abhängig davon gemacht werden, welche der Daten regelmäßig aktualisiert werden müssen und welche über einen längeren Zeitraum für die Auswertung weiter verwendet werden können.It can be further provided that the memory different memory areas in which the state information and the at least one Static information is stored. It can, for example different memory for different purposes or be provided different types of data. The breakdown and storing the information in different memory sections can be made, for example, depending on which the data must be updated regularly and which for a longer period of time the evaluation can continue to be used.

In einer konkreten Realisierung der Erfindung stellt das eingebettete System eine Java-Karte dar.In a concrete realization of the invention provides the embedded System is a java card.

In einer weiteren Ausgestaltung ist das nachträgliche Einbringen zumindest eines Patches in den Quellcode eines Betriebssystems des eingebetteten Systems für das Debugging der zu überwachenden Applikation vorgesehen. Dies ermöglicht es, das Debuggen einer Applikation direkt in dem eingebetteten System vornehmen zu können, auch wenn das eingebettete System bereits produziert ist. Hierdurch braucht eine Debug-Überwachungseinheit nicht standardmäßig in dem eingebetteten System vorgesehen zu werden, wodurch Sicherheitsrisiken reduziert werden können.In Another embodiment is the subsequent introduction at least one patch into the source code of an operating system of the Embedded system for debugging the application to be monitored intended. This allows debugging an application directly in the embedded system, even if the embedded system is already produced. This requires a debug monitor is not by default to be provided in the embedded system, thereby reducing security risks can be reduced.

Es ist hierbei insbesondere vorgesehen, dass zum nachträglichen Einbringen des zumindest einen Patches ein oder mehrere definierte Patch-Punkte in dem Quellcode des Betriebssystems des eingebetteten Systems vorgesehen werden, an dem oder an denen die zum Debugging notwendigen Debug-Komponenten, insbesondere die Debug-Überwachungseinheit, eingefügt werden. Es ist somit vorgesehen, den Code des Betriebssystems des eingebetteten Systems zu verändern, indem durch den Patch eine entsprechende Debug-Überwachungseinheit eingebracht wird.It In this case, it is provided in particular that for the subsequent Introducing the at least one patch one or more defined patch points provided in the source code of the embedded system operating system at which or at which the debug components necessary for debugging, in particular the debug monitor, inserted become. It is thus intended to use the code of the operating system of the to change embedded system by passing through the patch introduced a corresponding debug monitoring unit becomes.

Durch den Patch kann der Quellcode des Betriebssystems um einen oder mehrere Befehle für die folgenden Funktionen erweitert werden: Verarbeiten der Debug-Komponente der Applikation; Setzen und/oder Entfernen eines Haltepunkts; Überwachung des Haltepunkts; Unterbrechung der Abarbeitung und Rückgabe eines Statusworts, wenn der Haltepunkt erreicht wird; Unterbrechung der Abarbeitung und Rückgabe eines Statusworts, wenn eine Ausnahmesituation erreicht wird; und Abfrage von Variablen der Applikation.The patch adds one or more commands to the operating system source code for the following functions: Processing the debug component of the application; Setting and / or removing a breakpoint; Monitoring the breakpoint; Interruption of processing and return of a status word when the breakpoint is reached; Interruption of the processing and return of a status word when an exceptional situation is reached; and query variables of the application.

Die Kommunikation zwischen der Debug-Einheit und der Debug-Überwachungseinheit kann in einer ersten Variante über einen gemeinsamen Kommunikationskanal erfolgen. In einer alternativen Variante erfolgt die Kommunikation zwischen der Debug-Einheit und der Debug-Überwachungseinheit über zwei Kommunikationskanäle, wobei über einen der beiden Kommunikationskanäle Daten betreffend das Debugging und über einen anderen der beiden Kommunikationskanäle APDU-Kommandos übertragen werden. In der zweiten Variante ist es zweckmäßig, wenn auf einem externen Rechner, welcher die Debug-Einheit umfasst, eine Software installiert ist, die eine sog. Terminal-Schnittstelle und eine sog. Debug-Schnittstelle anbietet. Die Software hat dabei die Aufgabe, Anfragen an die Debug-Schnittstelle in die entsprechenden APDU-Kommandos für das eingebettete System zu übersetzen. Ferner sorgt die Software für die Weitergabe der Terminal-Kommandos an das eingebettete System. Schließlich werden Antwortdaten des eingebetteten Systems ausgewertet und an die Debug-Schnittstelle oder das Terminal, mit dem das eingebettete System zwecks Kommunikation verbunden ist, weitergegeben. Ein Vorteil dieser Vorgehensweise besteht darin, dass ein Applikationsentwickler direkt in dem eingebetteten System die Applikation testen kann und dadurch auch das korrekte Verhalten des eingebetteten Systems beurteilen kann.The Communication between the debug unit and the debug monitor can in a first variant via a common communication channel respectively. In an alternative variant, the communication takes place between the debug unit and the debug monitor over two communication channels, with one of the Both communication channels data concerning the debugging and another one of the two communication channels APDU commands are transmitted. In the second variant it is useful if on an external computer, which The debug unit includes software that has a so-called terminal interface and a so-called debug interface offers. The software has the task of querying the debug interface into the appropriate APDU commands for the embedded System to translate. Furthermore, the software provides for the passing of the terminal commands to the embedded system. After all Response data of the embedded system are evaluated and sent to the debug interface or the terminal with which the embedded System connected for communication, passed. An advantage This approach is that an application developer directly in the embedded system the application can test and thereby also assess the correct behavior of the embedded system can.

Die Debug-Einheit verpackt zweckmäßigerweise eine Debug-Anforderung in einem APDU-Kommando und überträgt dieses an die Debug-Überwa chungseinheit des eingebetteten Systems zur weiteren Verarbeitung. Insbesondere ist die Debug-Überwachungseinheit Teil der virtuellen Maschine.The Debug unit expediently packs one Debug request in an APDU command and transmits this to the debug monitor unit of the embedded Systems for further processing. In particular, the debug monitor is Part of the virtual machine.

Von der Erfindung ist ferner eine Vorrichtung zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems umfasst, bei der die virtuelle Maschine mit einer Debug-Überwachungseinheit versehen ist, welche dazu ausgebildet ist, den Ablauf der Applikation zu steuern und bei einem Debug-Ereignis zumindest eine Zustandsinformation der Applikation an eine, insbesondere auf einem Testrechner angeordnete, Debug-Einheit zu übertragen. Die Debug-Überwachungseinheit ist weiter dazu ausgebildet, die Zustandsinformation an die Debug-Einheit auf Anforderung der Debug-Einheit zu übertragen. Die Debug-Einheit ist dazu ausgebildet, die Zustandsinformation in einem temporären Speicher zu speichern und diese zur weiteren Verarbeitung aus dem temporären Speicher auszulesen, wenn zum Debugging des Debug-Ereignisses die Zustandsinformation benötigt wird.From The invention further provides an apparatus for monitoring the flow of an application in a virtual machine of a embedded system in which the virtual machine with a debug monitoring unit is provided, which is designed to is to control the flow of the application and during a debug event at least one status information of the application to one, in particular on a test computer arranged to transmit debug unit. The debug monitor is further designed to the state information to the debug unit on request of the Debug unit to transfer. The debug unit is to trained, the state information in a temporary Store memory and store it for further processing to read out temporary memory when debugging the Debug event the state information is needed.

Die erfindungsgemäße Vorrichtung weist die gleichen Vorteile auf, wie diese in Verbindung mit dem voran beschriebenen Verfahren erläutert wurden.The Device according to the invention has the same Advantages such as these in connection with the one described above Procedures have been explained.

In einer weiteren Ausgestaltung umfasst die erfindungsgemäße Vorrichtung weitere Mittel zur Durchführung des erfindungsgemäßen Verfahrens.In a further embodiment comprises the inventive Device further means for carrying out the inventive Process.

Es wird ferner ein tragbarer Datenträger vorgeschlagen, welcher eine virtuelle Maschine aufweist, wobei zum nachträglichen Einbringen zumindest eines Patches zum Debuggen einer Applikation ein oder mehrere definierte Patch-Punkte in dem Quellcode seines Betriebssystems vorgesehen sind, an dem oder an denen die zum Debugging notwendigen Debug-Komponenten, insbesondere eine Debug-Überwachungseinheit, einfügbar sind.It Furthermore, a portable data carrier is proposed, which having a virtual machine, wherein the subsequent Introduce at least one patch for debugging an application or multiple defined patch points in the source code of its operating system are provided on or at which the necessary for debugging Debug components, especially a debug monitor, are insertable.

Die Erfindung wird nachfolgend näher anhand eines Ausführungsbeispiels in den Zeichnungen erläutert. Es zeigen:The Invention will be described in more detail below with reference to an embodiment explained in the drawings. Show it:

1 eine schematische Darstellung einer erfindungsgemäßen Vorrichtung zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine des eingebetteten Systems, und 1 a schematic representation of a device according to the invention for monitoring the flow of an application in a virtual machine of the embedded system, and

2 eine weitere schematische Darstellung einer Umgebung zum Debuggen einer Applikation des eingebetteten Systems. 2 another schematic representation of an environment for debugging an application of the embedded system.

1 zeigt eine schematische Darstellung einer erfindungsgemäßen Vorrichtung zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems ES. Ein solches eingebettetes System wird auch als „Embedded System” bezeichnet. Das eingebettete System kann beispielsweise durch eine Smartcard oder ein mobiles Endgerät gebildet sein. Das eingebettete System ES weist im Ausführungsbeispiel eine virtuelle Maschine (nicht dargestellt) auf, die eine virtuelle Laufzeitumgebung für Applikationen innerhalb des eingebetteten Systems ES zur Verfügung stellt. Als Teil der virtuellen Maschine ist eine Debug-Überwachungseinheit DM vorgesehen, welche auch als Debug-Monitor bezeichnet wird. Über eine Schnittstelle IF1 kann das eingebettete System über einen Kommunikationskanal CC mit einer zweiten Schnittstelle IF2 eines Testrechners PC kommunizieren. Auf dem Testrechner PC ist eine Debug-Einheit DS vorgesehen, welche u. a. über einen Speicher SP verfügt. Die Debug-Einheit DS ist somit nicht Bestandteil des eingebetteten Systems ES, sondern stellt vielmehr eine „Blackbox” dar, welche auf dem externen Testrechner PC abläuft. 1 shows a schematic representation of an inventive device for monitoring the flow of an application in a virtual machine of an embedded system ES. Such an embedded system is also referred to as an "embedded system". The embedded system may be formed, for example, by a smart card or a mobile terminal. The embedded system ES in the exemplary embodiment has a virtual machine (not shown), which provides a virtual runtime environment for applications within the embedded system ES. As part of the virtual machine, a debug monitoring unit DM is provided, which is also called a debug monitor. Via an interface IF1, the embedded system can communicate via a communication channel CC with a second interface IF2 of a test computer PC. On the test computer PC, a debug unit DS is provided, which, inter alia, has a memory SP. The debug unit DS is thus not part of the inserted embedded system ES, but rather represents a "black box", which runs on the external test computer PC.

Das Vorhandensein der Debug-Überwachungseinheit DM erlaubt es, eine in dem eingebetteten System ES ablaufende Applikation direkt in dem eingebetteten System auf Fehler hin zu untersuchen, also zu debuggen. Zu diesem Zweck werden spezielle Debug-Kommandos zwischen der Debug-Einheit DS und der Debug-Überwachungseinheit DM über den Kommunikationskanal CC ausgetauscht. Die Debug-Überwachungseinheit DM ist Teil des eingebetteten Systems und steuert die Ausführung des auf Fehler zu untersuchenden Programms (Applikation) und stellt Informationen über den Laufzeitzustand der Applikation zur Verfügung. Die Debug-Kommandos werden von der Debug-Einheit DS zu der Debug-Überwachungseinheit DM übertragen, um die Programmausführung z. B. anzuhalten oder wieder aufzunehmen oder bestimmte Informationen über z. B. den Programmstack, Variablewerte, usw. anzufordern.The Existence of the debug monitoring unit DM allowed it, a running in the embedded system ES application directly in the embedded system to investigate for errors, ie to debug. For this purpose, special debug commands are used the debug unit DS and the debug monitor DM exchanged over the communication channel CC. The debug monitor DM is part of the embedded system and controls the execution of the program to be examined for error (application) and provides Information about the running time status of the application to disposal. The debug commands are from the debug unit DS to the debug monitor DM transmit to the program execution z. B. stop or resume or certain information about z. The program stack, Request variable values, etc.

Der Kommunikationskanal CC kann entweder durch eine kontaktbehaftete oder eine kontaktlose Verbindung, z. B. unter Verwendung von Mikrowellen, hergestellt sein. Der Kommunikationskanal CC kann einen einzigen Kommunikationskanal sowohl für die Übertragung von APDU-Kommandos und Debug-Kommandos umfassen. Ebenso kann der Kommunikationskanal über separate Kanäle für die getrennte Übertragung von APDU-Kommandos oder Debug-Kommandos verfügen.Of the Communication channel CC can either be contacted by a contact or a contactless compound, e.g. Using microwaves, be prepared. The communication channel CC can be a single Communication channel for both transmission of APDU commands and debug commands. Likewise, the communication channel over separate channels for separate transmission APDU commands or debug commands.

Wenn die Applikation während des Debuggers angehalten wird, fordert die Debug-Einheit DS eine für das Debuggen relevante Information von der Debug-Überwachungseinheit DM an. Diese Information umfasst den gegenwärtigen Laufzeitzustand der Applikation (Zustandsinformation RTS, auch Run Time State genannt) und optional weitere statische Debug-Informationen SDI, welche als Static Debug Information bezeichnet werden. Diese Informationen können von der Debug-Einheit DS verwendet werden, um den gegenwärtigen Programmzustand für die weitere Verarbeitung und Auswertung anzugeben.If the application is stopped during the debugger, The debug unit DS requests a debug-relevant one Information from the debug monitor DM. These Information includes the current runtime state of the application (State information RTS, also called run time state) and optional further static debug information SDI, which is called Static Debug Information be designated. This information can be obtained from the debug unit DS used to the current program state for further processing and evaluation.

Der Laufzeitzustand SDI der Applikation ändert sich nicht, so lange die Applikation angehalten ist. Üblicherweise wird während des Debuggens von der Debug-Überwachungseinheit DM die gleiche Zustandsinformation mehrfach durch die Debug-Einheit DS angefordert. Um dies zu vermeiden und damit die Performance des Debuggers zu erhöhen, werden die von der Debug-Überwachungseinheit DM an die Debug-Einheit DS übertragenen Informationen in dem Speicher SP zwischengespeichert (vgl. SDI' und RTS'). Der Speicher SP kann deshalb auch als Cache für die Debug-Informationen bezeichnet werden. Diese Informationen SDI' und RTS' werden dann von der Debug-Einheit DS für das Debuggen verwendet, so dass zusätzliche Kommunikation zwischen der Debug-Einheit DS und der Debug-Überwachungseinheit DM vermieden werden kann.Of the Runtime state SDI of the application does not change, as long as the application is stopped. Usually is used during debugging by the debug monitor DM the same state information multiple times through the debug unit DS requested. To avoid this and thus the performance of the Debuggers are incremented by the debug monitor DM transmitted to the debug unit DS in the memory SP cached (see SDI 'and RTS'). The memory SP can therefore also be used as a cache for the debug information be designated. This information SDI 'and RTS' will then be used by the debug unit DS for debugging, so that additional communication between the debug unit DS and the debug monitoring unit DM are avoided can.

Wenn die Applikation wieder fortgeführt wird, ändert sich deren Laufzeitzustand und die in dem Speicher SP gespeicherten Informationen sind möglicherweise nicht mehr korrekt. Aus diesem Grunde wird eine Aktualisierung der für das Debuggen notwendigen Informationen durch die Debug-Einheit DS initiiert, so dass die Debug-Überwachungseinheit DM des eingebetteten Systems ES die entsprechenden Informationen an die Debug-Einheit DM überträgt, so dass diese erneut zwischengespeichert werden können. Dabei sorgt die Debug-Einheit DS dafür, dass die Aktualisierung zu geeigneten Zeitpunkten bzw. in geeigneten Zeitabständen erfolgt.If the application is resumed changes their running time state and those stored in the memory SP Information may not be correct. Out This is why an update is made for debugging necessary information initiated by the debug unit DS, so that the debug watchdog DM of the embedded Systems ES the appropriate information to the debug unit DM transfers, so they are cached again can be. The debug unit DS ensures that that the update at appropriate times or in appropriate Time intervals takes place.

In einer Abwandlung dieses grundsätzlichen Gedankens kann vorgesehen sein, verschiedene Speicherbereiche oder Speicher (nicht dargestellt) in der Debug-Einheit DS vorzusehen. In die unterschiedlichen Speicherbereiche oder Speicher können beispielsweise Debug-Informationen getrennt eingespeichert werden, abhängig davon, ob diese während des Debuggers aktualisiert werden müssen oder nicht.In a modification of this fundamental thought can be provided, different memory areas or memory (not shown) in the debug unit DS provide. In the different For example, memory areas or memory may have debug information be stored separately, depending on whether this during of the debugger need to be updated or not.

In manchen Situationen ist es notwendig, das Debuggen einer Applikation vorzunehmen, wenn das eingebettete System, z. B. eine Smartcard, bereits produziert wurde. Um das Debuggen der Applikation in dem eingebetteten System ES selbst vornehmen zu können, sind deshalb in den Quellcode des Betriebssystems Patches für das Debugging der zu überwachenden Applikation einbringbar. Hierzu können ein oder mehrere definierte Patch-Punkte in dem Quellcode des Betriebssystems vorgesehen sein, an dem oder an denen die zum Debugging notwendigen Debug-Komponenten, insbesondere die Debug-Überwachungseinheit, eingefügt werden. Auf diese Weise bekommt der Entwickler des Betriebssystems oder der Entwickler der zu testenden Applikation die Möglichkeit, einen Patch für das Debuggen in einem bereits produzierten eingebetteten System vorzusehen.In In some situations it is necessary to debug an application when the embedded system, e.g. A smart card, already produced. To debug the application in the Embedded system ES to make yourself are therefore in the source code of the operating system patches for the debugging of the application to be monitored can be introduced. You can do this with one or more defined patch points be provided in the source code of the operating system on or where the debugging components needed for debugging, in particular the debug monitor. That way, the developer gets the operating system or the developer of the application to be tested the possibility a patch for debugging in an already produced one to provide embedded system.

Durch das Vorsehen des Patches kann beispielsweise die virtuelle Maschine um Befehle für folgende Funktionen erweitert werden: das Verarbeiten der Debug-Komponente der Applikation; das Setzen und/oder Entfernen eines Haltepunkts (Brake Point); die Überwachung des Haltepunkts; die Unterbrechung der Abarbeitung und Rückgabe eines Statusworts, wenn der Haltepunkt erreicht wird; die Unterbrechung der Abarbeitung und Rückgabe eines Statusworts, wenn eine Ausnahmesituation erreicht wird; die Abfrage von Variablen der Applikation.By providing the patch, for example, the virtual machine can be extended with commands for the following functions: the processing of the debug component of the application; the setting and / or removal of a breakpoint (brake point); the monitoring of the breakpoint; the interruption of the processing and return of a status word when the breakpoint is reached; the interruption of processing and return of a status word when an exceptional situation is reached becomes; the query of variables of the application.

Über die Debug-Einheit kann das Debuggen der Applikation erfolgen. So kann die Debug-Einheit DS oder eine andere dafür ausgebildete Software eine Terminalschnittstelle und eine Debug-Schnittstelle für den Entwickler anbieten. Über die Terminalschnittstelle kann der Entwickler APDU-Kommandos an das zu untersuchende eingebettete System schicken. Über die Debug-Schnittstelle kann der Entwickler die Applikation auf dem eingebetteten System debuggen. Die Debug-Einheit oder die oben erwähnte Software übernimmt in dem beschriebenen Szenario die folgenden drei Aufgaben:

  • – Übersetzen der Anfragen an die Debug-Schnittstelle in die korrespondierenden APDU-Kommandos für das eingebettete System;
  • – Weitergabe der Terminalkommandos an das eingebettete System;
  • – Auswertung der Antwortdaten des eingebetteten Systems und Weitergabe an die Debug-Schnittstelle oder das Terminal. Das Terminal stellt dabei ein Gerät dar, mit welchem das eingebettete System zu Kommunikationszwecken verbunden ist. Die Debug-Einheit oder die dafür vorgesehene Software ist auf dem Testrechner installiert, welcher dann in Kommunikationsverbindung zu dem Terminal steht.
The debug unit can debug the application. Thus, the debug unit DS or other software designed for this purpose can offer a terminal interface and a debug interface for the developer. Via the terminal interface, the developer can send APDU commands to the embedded system to be examined. The debug interface allows the developer to debug the application on the embedded system. The debug unit or software mentioned above performs the following three tasks in the described scenario:
  • - translating the requests to the debug interface into the corresponding APDU commands for the embedded system;
  • - passing the terminal commands to the embedded system;
  • - Evaluation of the response data of the embedded system and forwarding to the debug interface or the terminal. The terminal represents a device with which the embedded system is connected for communication purposes. The debug unit or the software provided for this purpose is installed on the test computer, which is then in communication with the terminal.

Anhand von 2 wird die Erfindung für ein als Java-Karte ausgebildetes eingebettetes System beschrieben. Die grobe Struktur ist dabei in 2 dargestellt. Die Java-Karte ist kommunikativ mit einem Terminal T gekoppelt. Das Terminal T ist über eine serielle Kommunikationsverbindung C1 mit einem Testsystem TS verbunden. Das Testsystem TS umfasst neben anderen, nicht dargestellten Einheiten, einen Java-Kartensimulator JCS, welcher ein Managementwerkzeug JCSM und ein Modul OCM umfasst. Der Java-Kartensimulator JCS ist über eine Kommunikationsverbindung C2 mit einem Entwicklungswerkzeug DT verbunden. Die Kommunikationsverbindung C2 kann beispielsweise als TCP/IP-Verbindung ausgebildet sein. Das Testsystem TS entspricht dabei dem Testrechner PC aus 1.Based on 2 the invention will be described for a Java system embedded system. The rough structure is in 2 shown. The Java card is communicatively coupled to a terminal T. The terminal T is connected to a test system TS via a serial communication link C1. The test system TS includes, among other units, not shown, a Java map simulator JCS, which includes a management tool JCSM and a module OCM. The Java Map Simulator JCS is connected to a development tool DT via a communication link C2. The communication connection C2 can be designed, for example, as a TCP / IP connection. The test system TS corresponds to the test computer PC 1 ,

Das Modul OCM generiert Debug-Anforderungen und verpackt diese in generische C-APDU-Kommandos und sendet sie an die Java-Karte JC. Ein in der Figur nicht näher dargestelltes weiteres Modul der Java-Karte JC, welches Teil derer virtueller Maschine ist, verarbeitet das empfangene Debug-APDU-Kommando und fügt die angeforderten Daten in ein R-APDU-Kommando, um dieses zurück an das Modul OCM zu senden. Damit Debug-APDU-Kommandos an das verarbeitende Modul der Java-Karte übertragen werden können, ist das Betriebssystem derart geändert, dass dieses reguläre APDU-Kommandos von Debug-APDU-Kommandos trennen kann.The Module OCM generates debug requests and packages them into generic C-APDU commands and sends them to the Java JC card. An Indian Figure unspecified further module of the Java card JC, which is part of this virtual machine, handles this received debug APDU command and adds the requested data in an R-APDU command to return this to the module OCM to send. This will debug APDU commands to the processing module Java card can be transferred Operating system changed so that this regular APDU commands from debug APDU commands.

Das Modul OCM stellt keinen voll implementierten Debugger dar, sondern ist vielmehr Teil einer Kette von Werkzeugen, welche zusammen einen Debugger ausbilden. Der erste Teil dieser Kette ist das Entwicklungswerkzeug DT, welches als Entwicklungswerkzeug für Java-Karten-Applikationen und als graphische Benutzeroberfläche für den Debugger dient. Mit dieser Hilfe wird ein Entwickler in die Lage versetzt, eine Java-Karten-Applikation wie ein gewöhnliches Java-Programm zu entwickeln und zu debuggen.The Module OCM is not a fully implemented debugger, but Rather, it is part of a chain of tools that together form one Train Debugger. The first part of this chain is the development tool DT, which serves as a development tool for Java map applications and as a graphical user interface for the Debugger serves. With this help, a developer will be able to a java card application like an ordinary java program to develop and debug.

Das zweite Glied in der Kette stellt der Java-Kartensimulator JCS dar. Bislang werden das Entwicklungswerkzeug DT und der Java-Kartensimulator JCS zusammen verwendet, um Java-Karten-Applikationen zu entwickeln und zu debuggen. Hierzu sind das Entwicklungswerkzeug DT und der Java-Kartensimulator JCS über die Kommunikationsverbindung C2 verbunden, wobei diese als sog. „Java Debug Wire Protocol” (JDWP) ausgebildet sein kann.The the second link in the chain is the Java Map Simulator JCS. So far, the development tool DT and the Java map simulator JCS used together to develop Java map applications and to debug. For this purpose, the development tool DT and the Java Map Simulator JCS via the communication link C2, and this as a so-called. "Java Debug Wire Protocol" (JDWP) can be trained.

Der Java-Kartensimulator JCS selbst ist zweitteilig ausgebildet. Das Managementwerkzeug JCSM ist für die Kommunikation mit anderen Komponenten zuständig und managt darüber hinaus bestehende Java- Kartensimulationen. Der Java-Kartensimulator stellt eine Implementierung einer realen Java-Karte auf z. B. eine Windows 32-Plattform dar und weist sämtliche Merkmale einer realen Java-Karte auf: eine Java Virtuelle Maschine, eine Transportschicht, um APDU-Kommandos zu empfangen und zu senden, ein Speichermanagement usw. Der Java-Kartensimulator JCS hat direkten Zugang zu einer Simulation und kann Debug-Informationen verarbeiten, um z. B. Haltepunkte zu setzen oder zu löschen oder Frame- oder Referenz-Daten zu holen. Sämtliche angeforderten Daten werden dann an das Entwicklungswerkzeug DT weitergeleitet. Der Java-Kartensimulator informiert das Entwicklungswerkzeug DT über Debug-Ereignisse, z. B. ein Haltepunkt-Ereignis, welches durch die Java-Kartensimulation getriggert wurde.Of the Java card simulator JCS itself is designed in two parts. The Management tool JCSM is for communicating with others Components responsible and manages beyond existing Java map simulations. The java card simulator puts an implementation of a real Java map on z. For example, a Windows 32 platform and has all the features of a real Java map on: a Java virtual machine, a transport layer, to receive and send APDU commands, a memory management etc. The Java Map Simulator JCS has direct access to a simulation and can process debug information to B. breakpoints too set or delete or frame or reference data pick up. All requested data will be sent to the development tool DT forwarded. The Java Map Simulator informs the development tool DT about debug events, z. B. a breakpoint event, which by the Java card simulation was triggered.

Für das Debuggen der Applikation in der Java-Karte JC wird die Funktionalität des Java-Kartensimulators JCS für die Kommunikation mit dem Entwicklungswerkzeug DT, für die Kommunikation via APDU mit der Java-Karte JC und für das Handling der Debug-Komponenten verwendet. Das Modul OCM ist dazu ausgebildet, in dem Java-Kartensimulator integriert zu werden und ersetzt die eigentliche Java-Kartensimulation, welche für die Durchführung des erfindungsgemäßen Verfahrens nicht benötigt wird.For The debugging of the application in the Java Card JC becomes the functionality Java card simulator JCS for communication with the development tool DT, for communication via APDU with the java card JC and for handling the debug components used. The OCM module is designed to be in the Java Card Simulator to be integrated and replaces the actual Java map simulation, which for the implementation of the invention Procedure is not needed.

Das Entwicklungswerkzeug DT fungiert als eigentlicher Debugger und erlaubt es einem Entwickler, die auf der Java-Karte JC laufende Applikation durch Setzen von Haltepunkten, Schritten usw. zu steuern. Sämtliche Debug-Anforderungen werden deshalb an das Management-Tool JCSM des Java-Kartensimulators JCS über den Kommunikationskanal C2 übertragen. Das Management-Tool JCSM verarbeitet diese Kommandos und nutzt eine Schnittstelle S1 zu dem Modul OCM, um Debug-Anforderungen zu triggern, welche sie selbst nicht handhaben kann. Dies betrifft beispielsweise das Erstellen von Haltepunkten, Frame-Informationen, Referenzinformationen usw. Das Modul OCM leitet die empfangenen Anforderungen an die Java-Karte JC weiter oder beantwortet diese direkt, wenn die angeforderte Information in einem für das Modul OCM zugänglichen Speicher hinterlegt und aktuell ist. Falls die Anforderung an die Java-Karte weitergeleitet werden muss, wird diese durch das Modul OCM in einem C-APDU-Kommando verpackt und an die Java-Karte JC übertragen. Die Debug-Überwachungseinheit der Java-Karte ermittelt die erforderlichen Daten und überträgt diese an das Modul OCM unter Verwendung eines R-APDU-Kommandos zurück. Das Management-Tool JCSM verwendet die Daten von dem Modul OCM, um diese zurück an das Entwicklungswerkzeug DT zu übertragen.The development tool DT acts as the actual debugger and allows a developer to run the application running on the Java Card JC by setting breakpoints, steps, etc. to control. All debug requests are therefore transmitted to the JCSM management tool of the Java Card Simulator JCS via the communication channel C2. The management tool JCSM processes these commands and uses an interface S1 to the OCM module to trigger debug requests that it itself can not handle. This concerns, for example, the creation of breakpoints, frame information, reference information, etc. The module OCM forwards the received requests to the Java Card JC or answers them directly if the requested information is stored in a memory accessible to the module OCM and is up-to-date , If the request has to be forwarded to the Java card, it is packed by the module OCM in a C-APDU command and transmitted to the Java card JC. The Java Map debug monitor detects the required data and returns it to the OCM module using an R-APDU command. The management tool JCSM uses the data from the module OCM to transfer them back to the development tool DT.

Um die Ausführung einer Applikation der Java-Karte JC zu triggern, muss ein APDU-Kommando an die Java-Karte übertragen werden. Hierzu überträgt eine Anwendung das APDU-Kommando an das Management-Tool JCSM, welche diese an das Modul OCM weiterleitet. Dieses wiederum überträgt das APDU-Kommando an die Java-Karte JC. Auf der Java-Karte JC wird das APDU-Kommando durch die Applikation verarbeitet und ausgeführt. Wenn vorher ein Haltepunkt in dem Quellcode der Applikation durch das Entwicklungswerkzeug DT gesetzt wurde, wird die Ausführung der Applikation unterbrochen, sobald der Haltepunkt erreicht ist. Der Programmierer kann nun über den weiteren Fortgang entscheiden. Wenn die Ausführung der Applikation zum Ende gelangt, wird ein R-APDU-Kommando von der Java-Karte an das Modul OCM zurückgegeben, welches dieses an das Management-Tool JCSM weiterleitet. Diese leitet es letztendlich zu der Applikation weiter, welches das ursprüngliche C-APDU-Kommando gesendet hat.Around to trigger the execution of an application of the Java Card JC, An APDU command must be transferred to the Java card. An application transfers the APDU command to the management tool JCSM, which forwards them to the module OCM. This, in turn, transmits the APDU command the java card JC. On the java card JC becomes the APDU command processed and executed by the application. If before a breakpoint in the source code of the application through the Development tool DT has been set, the execution is the application is interrupted as soon as the breakpoint is reached. The programmer can now decide on the further progress. When the execution of the application comes to an end, returned an R-APDU command from the Java card to the OCM module, which forwards this to the management tool JCSM. This leads It eventually continues to the application, which is the original one C-APDU command has sent.

Das Modul OCM fungiert, wie aus der vorangegangenen Beschreibung bereits ersichtlich wurde, als Verbindungsglied zu der Java-Karte, da dieses alle Debug-Anforderungen und allgemeine Kommandos an die Java-Karte weiterleitet. Ebenso nimmt das Modul OCM Antworten von der Java-Karte entgegen und erledigt diese Antworten, abhängig davon, ob es eine Antwort auf eine Debug-Anforderung oder ein allgemeines ISO-Kommando ist. Darüber hinaus dient das Modul OCM als Datenspeicher. Daten, welche von der Java-Karte zu dem Modul OCM übertragen werden, werden für nachfolgende Datenanfragen des Java-Kartensimulators JCS zwischengespeichert. Dieser speichernde Mechanismus erlaubt es, die auf dem Kommunikationskanal C1 übertragenen Daten zu reduzieren, da die meisten durch das Management-Tool JCSM bzw. das Entwicklungswerkzeug DT angefragten Daten dem Speicher entnommen werden können.The Module OCM acts as already described in the previous description as a link to the java card, since this all Forwards debug requests and general commands to the Java Card. Similarly, the module OCM accepts responses from the Java card and does these answers, depending on whether it's an answer on a debug request or a general ISO command. In addition, the module OCM serves as a data memory. Dates, which are transferred from the Java card to the module OCM, are for subsequent data requests of the Java Map Simulator Cached JCS. This storing mechanism allows the data transmitted on the communication channel C1 reduce, as most through the management tool JCSM or the Development tool DT requested data taken from the memory can be.

Der Speicher kann beispielsweise in vier unterschiedliche Bereiche aufgeteilt sein und einen Frame-Speicher (Frame Cache, einen statischen Speicher (Static Cache), einen Referenz-Speicher (Reference Cache) und einen Methoden-Komponenten-Speicher (Method Component Cache) umfassen.Of the For example, memory can be divided into four different areas be and a frame memory (frame cache, a static memory (Static cache), a reference memory (reference cache) and a Method component cache include.

Die Debug-Überwachungseinheit der Java-Karte JC ist für die Verarbeitung sämtlicher eingehender Debug-Kommandos und die Rückgabe der angeforderten Debug-Informationen verantwortlich. Dabei können die folgenden Funktionalitäten exportiert werden. Das Setzen eines Haltepunkts, das Löschen eines Haltepunkts, das Fortsetzen der virtuellen Maschine, das Holen einer Frame-Information, das Holen einer Referenzinformation, das Holen statischer Variablen und das Holen von Methoden-Komponenten-Informationen.The Java Card JC debug monitor is for the processing of all incoming debug commands and returning the requested debug information responsible. In doing so, the following functionalities be exported. Setting a Breakpoint, Deleting a breakpoint, resume the virtual machine, fetch frame information, getting reference information, the Get static variables and get method component information.

Die Debug-Überwachungseinheit ist Teil der virtuellen Maschine, da es das proprietäre virtuelle Maschinen-Debug-Interface implementiert, durch welches das Modul OCM interne Laufzeitinformationen anfordern kann. Um die erforderlichen Informationen zu empfangen, verwendet das Modul OCM ein öffentliches Interface.The Debug monitor is part of the virtual machine, because it's the proprietary virtual machine debug interface implements, through which the module OCM internal runtime information can request. To receive the required information, the module OCM uses a public interface.

Um eine Unterscheidung zwischen regulären APDU-Kommandos und Debug-APDU-Kommandos, welche an die Java-Karte zurückgesendet werden müssen, bevor die virtuelle Maschine durch den Debugger angehalten wird, unterscheiden zu können, weist die Debug-Überwachungseinheit ein Mittel zum Versenden von Debug-Kommandos auf. Dieses Mittel ist Teil des Betriebssystems und trennt Debug-Kommandos von anderen Kommandos. Wenn ein Debug-Kommando erkannt wurde, wird es durch die Debug-Überwachungseinheit verarbeitet. Das Resultat der Verarbeitung wird dann zurückgegeben.Around a distinction between regular APDU commands and Debug APDU commands sent back to the Java card need to be before the virtual machine through the debugger The debug monitor instructs you to distinguish a means for sending debug commands. This agent is part of the operating system and separates debug commands from others Commands. If a debug command has been detected, it will be replaced by the Debug Monitor Processed. The result of the Processing is then returned.

DMDM
Debug-ÜberwachungseinheitDebug Monitoring Unit
ESIT
Eingebettetes Systemembedded system
RTSRTS
Zustandsinformation (Runtime State)state information (Runtime State)
SDISDI
statische Debug-Information (Static Debug Information)static Debug Information (Static Debug Information)
IF1IF1
Schnittstelle der Debug-Überwachungseinheitinterface the debug monitor
PCPC
Testrechnertest computer
DSDS
Debug-EinheitDebug unit
SPSP
Speicher (Cache)Storage (Cache)
RTS'RTS '
gespeicherte Zustandsinformation (Runtime State)saved Status information (Runtime State)
SDI'SDI '
gespeicherte statische Debug-Information (Static Debug Information)saved static debug information (static debug information)
IF2IF2
Schnittstelle der Debug-Einheitinterface the debug unit
CCCC
Kommunikationskanalcommunication channel
DTDT
Entwicklungswerkzeugdevelopment tool
JCSJCS
Java KartensimulatorJava card simulator
JCSMJCSM
Management Toll des Java Kartensimulatorsmanagement Great of the Java map simulator
TT
Terminalterminal
JCJC
Java KarteJava map
OCMOCM
Modulmodule
TSTS
Testsystemtest system

ZITATE ENTHALTEN IN DER BESCHREIBUNGQUOTES INCLUDE IN THE DESCRIPTION

Diese Liste der vom Anmelder aufgeführten Dokumente wurde automatisiert erzeugt und ist ausschließlich zur besseren Information des Lesers aufgenommen. Die Liste ist nicht Bestandteil der deutschen Patent- bzw. Gebrauchsmusteranmeldung. Das DPMA übernimmt keinerlei Haftung für etwaige Fehler oder Auslassungen.This list The documents listed by the applicant have been automated generated and is solely for better information recorded by the reader. The list is not part of the German Patent or utility model application. The DPMA takes over no liability for any errors or omissions.

Zitierte PatentliteraturCited patent literature

  • - US 2002/0099953 A1 [0007] US 2002/0099953 A1 [0007]
  • - WO 00/68797 A1 [0008] WO 00/68797 A1 [0008]
  • - US 2005/0128585 A1 [0009] US 2005/0128585 A1 [0009]

Claims (17)

Verfahren zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems (ES), bei der die virtuelle Maschine mit einer Debug-Überwachungseinheit (DM) versehen wird, welche den Ablauf der Applikation steuert und bei einem Debug-Ereignis zumindest eine Zustandsinformation (RTS) der Applikation an eine, insbesondere auf einem Testrechner angeordnete, Debug-Einheit (DS) überträgt, wobei die Übertragung zumindest der Zustandsinformation (RTS) an die Debug-Einheit (DS) auf Anforderung der Debug-Einheit (DS) erfolgt und die Debug-Einheit (DS) die Zustandsinformation (RTS) in einem temporaren Speicher (SP) speichert und diese zur weiteren Verarbeitung aus dem temporaren Speicher (SP) ausliest, wenn zum Debugging des Debug-Ereignisses die Zustandsinformation (RTS) benötigt wird.Method for monitoring the process an application in a virtual machine of an embedded Systems (ES), in which the virtual machine with a debug monitoring unit (DM) is provided, which controls the flow of the application and at least one status information (RTS) during a debug event the application to a, in particular on a test computer arranged, Debug unit (DS) transmits, the transmission at least the state information (RTS) to the debug unit (DS) on request the debug unit (DS) and the debug unit (DS) the state information (RTS) in a temporary memory (SP) stores and this to read further processing from the temporary memory (SP), if the state information for debugging the debug event (RTS) is needed. Verfahren nach Anspruch 1, bei dem die Debug-Überwachungseinheit (DM) neben der Zustandsinformation (RTS) zumindest eine statische Debug-Information (SDI) an die Debug-Einheit (DS) überträgt, welche die zumindest eine statische Debug-Information (SDI) in dem temporären Speicher (SP) speichert.The method of claim 1, wherein the debug monitor (DM) in addition to the state information (RTS) at least one static Transfer Debug Information (SDI) to the Debug Unit (DS), which contains the at least one static debug information (SDI) in the temporary memory (SP) stores. Verfahren nach Anspruch 2, bei dem die zumindest eine statische Debug-Information (SDI) umfasst: – eine oder mehrere statische Variablen, und/oder – Objekt-Bezüge, und/oder – Methoden oder Frame-Informationen, und/oder – Methoden-Komponenten-Informationen.The method of claim 2, wherein the at least Static Debug Information (SDI) includes: - one or more static variables, and / or - object references, and or - methods or frame information, and / or - Method component information. Verfahren nach Anspruch 2 oder 3, bei dem die Debug-Einheit (DS) eine Aktualisierung der Zustandsinformation (RTS) und/oder der zumindest einen statischen Debug-Information (SDI) durch die Debug-Überwachungseinheit (DM) veranlasst wird, wenn sich nach Wiederaufnahme der zu überwachenden Applikation deren Laufzeitzustand ändert, wobei die aktualisierten Daten an die Debug-Einheit (DS) zur Speicherung in dem Speicher (SP) übertragen werden.Method according to claim 2 or 3, wherein the debug unit (DS) an update of the state information (RTS) and / or the at least one static debug information (SDI) through the Debug Monitor (DM) is triggered when after resuming the application to be monitored Running time state changes, with the updated data to the debug unit (DS) for storage in the memory (SP) become. Verfahren nach einem der Ansprüche 2 bis 4, bei dem der Speicher (SP) verschiedene Speicherbereiche umfasst, in welchen die Zustandsinformation (RTS) und die zumindest eine statische Information (SDI) abgespeichert werden.Method according to one of claims 2 to 4, in which the memory (SP) comprises different memory areas, in which the state information (RTS) and the at least one static information (SDI) are stored. Verfahren nach Anspruch 4 oder 5, bei dem eine Aktualisierung der Daten nur mancher der Speicherbereiche erfolgt.Method according to claim 4 or 5, wherein an update the data only some of the memory areas is done. Verfahren nach einem der vorherigen Ansprüche, bei dem als eingebettetes System (ES) eine Java-Karte verwendet wird.Method according to one of the preceding claims, where the Embedded System (ES) uses a Java Card becomes. Verfahren nach einem der vorherigen Ansprüche, bei dem das nachträgliche Einbringen zumindest eines Patches in den Quellcode des Betriebssystems des eingebetteten Systems für das Debugging der zu überwachenden Applikation in dem eingebetteten System (ES) vorgesehen ist.Method according to one of the preceding claims, in which the subsequent introduction of at least one patch in the source code of the operating system of the embedded system for the debugging of the application to be monitored in the embedded System (ES) is provided. Verfahren nach Anspruch 8, bei dem zum nachträglichen Einbringen des zumindest einen Patches ein oder mehrere definierte Patch-Punkte in dem Quellcode des Betriebssystems des eingebetteten Systems vorgesehen werden, an dem oder an denen die zum Debugging notwendigen Debug-Komponenten, insbesondere die Debug-Überwachungseinheit (DM), eingefügt werden.A method according to claim 8, wherein the subsequent Introducing the at least one patch one or more defined Patch points in the source code of the embedded operating system Systems are provided on or at which necessary for debugging Debug components, especially the debug monitor (DM). Verfahren nach Anspruch 8 oder 9, bei dem durch den Patch der Quellcode des Betriebssystems um einen oder mehrere Befehle für die folgenden Funktionen erweitert wird: – Verarbeiten der Debug-Komponente der Applikation; – Setzen und/oder Entfernen eines Haltepunkts; – Überwachung des Haltepunkts; – Unterbrechung der Abarbeitung und Rückgabe eines Statusworts, wenn der Haltepunkt erreicht wird; – Unterbrechung der Abarbeitung und Rückgabe eines Statusworts, wenn eine Ausnahmesituation erreicht wird; – Abfrage von Variablen der Applikation.A method according to claim 8 or 9, wherein the patch the source code of the operating system by one or more Commands for the following functions are extended: - To process the debug component of the application; - Put and / or Removing a breakpoint; - Monitoring the breakpoint; - interruption of processing and Return a status word when the breakpoint arrives becomes; - interruption of processing and return a status word when an exception situation is reached; - query of variables of the application. Verfahren nach einem der Ansprüche 1 bis 10, dadurch gekennzeichnet, dass die Kommunikation zwischen der Debug-Einheit (DS) und der Debug-Überwachungseinheit (DM) über einen gemeinsamen Kommunikationskanal (CC) erfolgt.Method according to one of claims 1 to 10, characterized in that the communication between the debug unit (DS) and the debug monitoring unit (DM) via a common communication channel (CC) takes place. Verfahren nach einem der Ansprüche 1 bis 10, bei dem die Kommunikation zwischen der Debug-Einheit (DS) und der Debug-Überwachungseinheit (DM) über zwei Kommunikationskanäle (CC) erfolgt, wobei über einen der beiden Kommunikationskanäle (CC) Daten betreffend das Debugging und über einen anderen der beiden Kommunikationskanäle (CC) APDU-Kommandos übertragen werden.Method according to one of claims 1 to 10, in which the communication between the debug unit (DS) and the Debug Monitoring Unit (DM) via two communication channels (CC), using one of the two communication channels (CC) data on debugging and on another the two communication channels (CC) transmit APDU commands become. Verfahren nach einem der vorherigen Ansprüche, bei dem die Debug-Einheit (DS) eine Debug-Anforderung in einem APDU-Kommando verpackt und an die Debug-Überwachungseinheit (DM) überträgt.Method according to one of the preceding claims, where the debug unit (DS) has a debug request in an APDU command packaged and transmitted to the Debug Monitoring Unit (DM). Verfahren nach einem der vorherigen Ansprüche, bei dem die Debug-Überwachungseinheit (DM) Teil der virtuellen Maschine ist.Method according to one of the preceding claims, where the debug monitor (DM) part of the virtual Machine is. Vorrichtung zum Überwachen des Ablaufs einer Applikation in einer virtuellen Maschine eines eingebetteten Systems (ES), bei der die virtuelle Maschine mit einer Debug-Überwachungseinheit (DM) versehen ist, welche dazu ausgebildet ist, den Ablauf der Applikation zu steuern und bei einem Debug-Ereignis zumindest eine Zustandsinformation (RTS) der Applikation an eine, insbesondere auf einem Testrechner angeordnete, Debug-Einheit (DS) zu übertragen, wobei die Debug-Überwachungseinheit (DM) weiter dazu ausgebildet ist, die Zustandsinformation (RTS) an die Debug-Einheit (DS) auf Anforderung der Debug-Einheit (DS) zu übertragen und die Debug-Einheit (DS) dazu ausgebildet ist, die Zustandsinformation (RTS) in einem temporären Speicher (SP) zu speichern und diese zur weiteren Verarbeitung aus dem temporären Speicher (SP) auszulesen, wenn zum Debugging des Debug-Ereignisses die Zustandsinformation (RTS) benötigt wird.Device for monitoring the execution of an application in a virtual machine of an embedded system (ES), in which the virtual machine is equipped with a debug monitoring unit (DM) which is designed to control the execution of the application and, in the event of a debug event, to transmit at least one status information item (RTS) of the application to a debug unit (DS), in particular arranged on a test computer, the debug unit Monitoring unit (DM) is further adapted to transmit the state information (RTS) to the debug unit (DS) at the request of the debug unit (DS) and the debug unit (DS) is adapted to the state information (RTS) in a temporary memory (SP) store and read them from the temporary memory (SP) for further processing when the state information (RTS) is required for debugging the debug event. Vorrichtung nach Anspruch 15, die weitere Mittel zur Durchführung des Verfahrens nach einem der Ansprüche 2 bis 14 umfasst.Apparatus according to claim 15, the further means for carrying out the method according to one of the claims 2 to 14. Tragbarer Datenträger, umfassend eine virtuelle Maschine, wobei zum nachträglichen Einbringen zumindest eines Patches zum Debuggen einer Applikation ein oder mehrere definierte Patch-Punkte in dem Quellcode seines Betriebssystems vorgesehen sind, an dem oder an denen die zum Debugging notwendigen Debug-Komponenten, insbesondere eine Debug-Überwachungseinheit, einfügbar sind.Portable data carrier, comprising a virtual Machine, wherein for subsequent introduction, at least a patch for debugging an application one or more defined ones Patch points are provided in the source code of his operating system, on or at which the debug components needed for debugging, in particular a debug monitoring unit, insertable are.
DE200810028702 2008-06-17 2008-06-17 Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit Ceased DE102008028702A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE200810028702 DE102008028702A1 (en) 2008-06-17 2008-06-17 Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE200810028702 DE102008028702A1 (en) 2008-06-17 2008-06-17 Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit

Publications (1)

Publication Number Publication Date
DE102008028702A1 true DE102008028702A1 (en) 2009-12-24

Family

ID=41334812

Family Applications (1)

Application Number Title Priority Date Filing Date
DE200810028702 Ceased DE102008028702A1 (en) 2008-06-17 2008-06-17 Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit

Country Status (1)

Country Link
DE (1) DE102008028702A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000068797A1 (en) 1999-05-11 2000-11-16 Microsoft Corporation Protocol for smart card application development
US20020099953A1 (en) 2000-11-30 2002-07-25 International Business Machines Corporation Debugging of chipcards
US20050128585A1 (en) 2003-02-10 2005-06-16 Fujitsu Limited Optical switch device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000068797A1 (en) 1999-05-11 2000-11-16 Microsoft Corporation Protocol for smart card application development
US20020099953A1 (en) 2000-11-30 2002-07-25 International Business Machines Corporation Debugging of chipcards
US20050128585A1 (en) 2003-02-10 2005-06-16 Fujitsu Limited Optical switch device

Similar Documents

Publication Publication Date Title
EP1265146A2 (en) Debugging method and system
DE4305522C2 (en) Device for computer-aided diagnosis of a technical system consisting of modules
EP2981926A1 (en) Data storage device for protected data exchange between different security zones
DE102006016303B4 (en) Subordinate test interface
EP3435270B1 (en) Device and method for cryptographically protected operation of a virtual machine
EP1315332A2 (en) Programmable data logger for CAN - systems
DE60029730T2 (en) IC card with self-diagnostic function
EP1119801B1 (en) Method for operating an automation system
DE102011007714A1 (en) Architecture for a shared memory
EP3712720A1 (en) Method for controlling a technical system using an adaptive simplex architecture
EP3647801A1 (en) Method for testing a fpga program
DE102015211036A1 (en) Check compatibility of device components of a medical device
WO2005022382A2 (en) Method for the installation of a program component
DE69915788T2 (en) Microcontroller with troubleshooting support
DE102008028702A1 (en) Method for monitoring progress of application in virtual machine of integrated system for portable data carrier, involves carrying out transmission of state information at debug-unit
DE102012003000A1 (en) System for diagnosing fault of vehicle, comprises central processing resource, which is configured such that it communicates wirelessly with vehicle, and communication unit, which is fixed in vehicle
DE112019007853T5 (en) CONTROL DEVICE
DE102019135079A1 (en) CANCEL INSTALLATION OF FIRMWARE BUNDLES
WO2015124320A1 (en) Dynamic programmable logic controller for emulating a controller
DE102006006843B4 (en) Method for responding to a control module failure
EP2634700A1 (en) Method and development environment for monitoring a running program
EP1628223B1 (en) Writing data to a non-volatile memory of a portable data carrier
DE102020006643A1 (en) Transmission of log data from a vehicle for a development process using a cloud
EP0945799B1 (en) Method and system for avoiding storage of outdated messages from a data preprocessing device in the memory of a computer
DE102020213809A1 (en) Method for operating a control device when testing software in the control device and method for operating a test computer when testing software in a control device

Legal Events

Date Code Title Description
OP8 Request for examination as to paragraph 44 patent law
R002 Refusal decision in examination/registration proceedings
R003 Refusal decision now final

Effective date: 20111119