Browse Prior Art Database

A Debugger Architecture for J2ME Devices

IP.com Disclosure Number: IPCOM000005050D
Original Publication Date: 2001-Aug-01
Included in the Prior Art Database: 2001-Aug-01
Document File: 4 page(s) / 1M

Publishing Venue

Motorola

Related People

Samir Kakkar: AUTHOR [+3]

Abstract

This paper describes the design and implementation of a small, portable, extensible debugger architecture for an embedded Java virtual machine at Motorola.

This text was extracted from a WORD97 document.
This is the abbreviated version, containing approximately 24% of the total text.

A Debugger Architecture for J2ME Devices

by

Samir Kakkar, Da-Gung Lu, Sameer Patel

Abstract This paper describes the design and implementation of a small, portable, extensible debugger architecture for an embedded Java virtual machine at Motorola.

Introduction

While working on a Java 2 Platform, Micro Edition (J2ME) [1] implementation for the latest cellular telephone from Motorola iDEN Group, the tools team at WSAS was presented with the challenge of adding debugging support to an embeddable Java virtual machine. The idea was to allow a user to debug J2ME applications using the Metrowerks CodeWarrior Integrated Development Environment (IDE). The applications could be running on either a Motorola iDEN i85s phone or in an emulator running on Windows.

This paper describes the design and implementation of a small, portable, extensible debugger architecture for an embedded Java virtual machine. We first explain the requirements and challenges of adding debugging support to embedded virtual machines. Then we present a debugger architecture for J2ME compliant devices.

Motivation

Adding debugging support to an embedded virtual machine is a challenge. The implementation must be small to satisfy the tight memory constraints of the embedded environment. It must be portable across virtual machine implementations so that a single debugger will work with many different virtual machine implementations. It must be transport-independent since the debugger and the virtual machine may not be in the same process space. Finally, to be useful, the debugger must support common debugging functionality for execution control and variable watches. Users should be able to step into, step out, step over, and set breakpoints on individual threads, and examine variables. The current implementation supports most of this functionality: fine-grain thread control was omitted due to time constraints.

WSAS worked with Sun Microsystems to design a new debugging protocol, called KVM Debug Wire Protocol (KDWP), in order to satisfy these design goals. The KDWP allows developers to implement small, scaleable, virtual machine-independent debugging architectures suitable for the embedded environment. The protocol adds a layer of abstraction on top of any native debugging APIs resident in a virtual machine implementation. The base protocol is small, allowing access to standard debugging services and can be expanded to include non-standard, vendor-specific services. KDWP does not specify a transport mechanism, which allows the debugger and the debugee to exist anywhere.

Overview

Figure 1 shows the Motorola J2ME debugger architecture we implemented. It consists of the following components:

(1) A Java Debug Wire Protocol (JDWP)-compliant IDE. JDWP[2] is a debugging protocol used by many desktop debuggers (e.g. MetroWerks' CodeWarrior)

(2) The debug agent process, which transla...