harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Harmony Wiki] Update of "Harmony_JDB_Command_Line_Tool" by DanielGong
Date Fri, 13 Aug 2010 15:33:02 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Harmony Wiki" for change notification.

The "Harmony_JDB_Command_Line_Tool" page has been changed by DanielGong.
http://wiki.apache.org/harmony/Harmony_JDB_Command_Line_Tool?action=diff&rev1=3&rev2=4

--------------------------------------------------

  
  === 2. Design ===
  
+ Since the JDB implementation is supposed to be compatible enough with RI (Sun JDK), I don't
have to specify the commands and function it supports. However, as I will mention in the challenges
part, a detailed specification of JDB will be very helpful. I'm planning to create and maintain
such an open document during the development of JDB.
+ 
+ For the code framework, the most important point I have to mention is I use enum to implement
commands, define match and run methods in the enum class and  override them in the enum instance
if necessary. I believe the design makes the code structure clear and the only shortage is
the long code.
+ 
+ For those developers who are not familiar with JDI, I'd like to provide a metaphor to describe
how to design debugger with JDI: it's not the debugger that drives the program to run (debuggee)
or stop; the program just run by itself, if the debugger wants it to stop, set up a barrier
(any event request that will cause the program to be blocked) to stop it; if you want it to
continue, jump over the barrier (handle the corresponding event) and go on.
  
  
  === 3. Challenges ===
@@ -24, +29 @@

  
   *JDB supports not only variable value display but also Java expression value, which raise
the problem of how to calculate a Java expression in JDB. Regis (Regis Xu) suggested that
we need to parse the expression string to find out which part should be calculated at debuggee
side, and which can be done at jdb side.
  
+  *Matching, parsing and error handling of JDB commands might be easily implemented with
straightforward simple algorithm but difficult (at least for me) to find a perfect way. In
my implementation, I split the command with spaces and match them by the prefix. For commands
with just the same prefix, distinguish them by the following arguments. This makes it easier
to match commands and parse them, but fails to handle errors in a uniform way. An alternative
way is regular expression matching, which will still need to parse the command. I'm considering
whether it's a better way.
+ 
  
  === 4. Achievement so far ===
  
- The project started as a project of Google Summer of Code 2010. By the time when gsoc 2010
ends, the project has a code base which have a framework or structure of how commands are
parsed, matched and executed in jdb, but do not have all commands implemented.
+ The project started as a project of Google Summer of Code 2010. By the time when gsoc 2010
ends, the project has a code base which have a framework or structure of how commands are
parsed, matched and executed in jdb, but do not have all commands implemented and there are
still some commands do not work well. Don't worry, I'll go on with it.
  
  
  === 5. Future work ===
  
- 
+  *First of all, implement all of the commands and fix the bugs.
+  *If time permits, create and maintain a document that specifies jdb.
+  *Add enhancement to the jdb implementation.
  
  === 6. Contact info ===
  

Mime
View raw message