bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DDD 3.3 with jdb (IBM JDK 1.3) Array Display "Bug"


From: Luke Nezda
Subject: DDD 3.3 with jdb (IBM JDK 1.3) Array Display "Bug"
Date: Fri, 09 Feb 2001 02:29:55 -0600

Hello-

Arrays do not pretty-print, instead they show as:
B = instance of int[3] (id=220)
where B is a primitive int array of size 3.

This makes it difficult to figure out the values in the array.  I think
that this feature works with other JDKs (specifically I have seen
references to this feature working on/with the Sun Sparc JDK).  I have
tried all of the JDKs 1.2+ JDKs for Linux on i386.  The Blackdown and
Sun JDKs (1.2.2 & 1.3) both have buggy implementations  of jdb.  IBM 1.3
JDK's jdb seems to work fairly well except for this feature.  I suspect
that this "problem" is because the output of the IBM jdb is slightly
different syntax.

ddd --configuration
GNU DDD 3.3 (i386-redhat-linux-gnu)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (C) 1999-2001 Universität Passau, Germany.

Compiled with GCC 2.96 20000731 (Red Hat Linux 7.0), GNU libc 2.2
Requires X11R6, Xt11R6, Motif 2.1.30 (Motif Version 2.1.30)
Includes XPM 3.4.11, Athena Panner, DDD core
Built 2001-02-03 by prospector <address@hidden>.

java -version
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20000815 (JIT
enabled: jitc))

jdb -version
jdb version 99/06/11

~/.ddd/log

GNU DDD 3.3 (i386-redhat-linux-gnu)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (C) 1999-2001 Universität Passau, Germany.

Compiled with GCC 2.96 20000731 (Red Hat Linux 7.0), GNU libc 2.2
Requires X11R6, Xt11R6, Motif 2.1.30 (Motif Version 2.1.30)
Includes XPM 3.4.11, Athena Panner, DDD core
Built 2001-02-03 by prospector <address@hidden>.
$  ddd -jdb test
+  /bin/sh -c 'exec jdb '\''test'\'''
#  Hello, world!
#  Opening session "112f293949000098170242300000006470112"...
#  Running JDB (pid 4631, tty /dev/pts/2)...
#  Current language: Java
#  Searching "vsllib/ddd.vsl"...
#  Trying "/root/.ddd/vsllib/ddd.vsl"
#  Trying "/usr/share/ddd-3.3/vsllib/ddd.vsl"
#  Searching "vsllib/ddd.vsl"..."/usr/share/ddd-3.3/vsllib/ddd.vsl".
#  Creating
"/root/.ddd/sessions/112f293949000098170242300000006470112/"...
#  Creating
"/root/.ddd/sessions/112f293949000098170242300000006470112/"...done.
#  Copying "/root/.ddd/init" to
"/root/.ddd/sessions/112f293949000098170242300000006470112/init"...
#  Copying "/root/.ddd/init" to
"/root/.ddd/sessions/112f293949000098170242300000006470112/init"...done.

#  Copying "/root/.ddd/history" to
"/root/.ddd/sessions/112f293949000098170242300000006470112/history"...
#  Copying "/root/.ddd/history" to
"/root/.ddd/sessions/112f293949000098170242300000006470112/history"...done.

#  Saving session in
"/root/.ddd/sessions/112f293949000098170242300000006470112/init"...
#  Saving session in
"/root/.ddd/sessions/112f293949000098170242300000006470112/init"...done.

<- "Initializing jdb...\n"
   "> "
-> "# reset\n"
<- "Command \'#\' is not valid until the VM is started with the \'run\'
command\n"
   "> "
#  Opening session "112f293949000098170242300000006470112"...done.
#  Welcome to DDD 3.3 "Blues by Night" (i386-redhat-linux-gnu)
-> "help\n"
<- "** command list **\n"
   "run [class [args]]        -- start execution of application\'s main
class\n"
   "\n"
   "threads [threadgroup]     -- list threads\n"
   "thread <thread id>        -- set default thread\n"
   "suspend [thread id(s)]    -- suspend threads (default: all)\n"
   "resume [thread id(s)]     -- resume threads (default: all)\n"
   "where [thread id] | all   -- dump a thread\'s stack\n"
   "wherei [thread id] | all  -- dump a thread\'s stack, with pc info\n"

   "up [n frames]             -- move up a thread\'s stack\n"
   "down [n frames]           -- move down a thread\'s stack\n"
   "kill <thread> <expr>      -- kill a thread with the given exception
object\n"
   "interrupt <thread>        -- interrupt a thread\n"
   "\n"
   "print <expr>              -- print value of expression\n"
   "dump <expr>               -- print all object information\n"
   "eval <expr>               -- evaluate expression (same as print)\n"
   "set <lvalue> = <expr>     -- assign new value to
field/variable/array element\n"
   "locals                    -- print all local variables in current
stack frame\n"
   "\n"
   "classes                   -- list currently known classes\n"
   "class <class id>          -- show details of named class\n"
   "methods <class id>        -- list a class\'s methods\n"
   "fields <class id>         -- list a class\'s fields\n"
   "\n"
   "threadgroups              -- list threadgroups\n"
   "threadgroup <name>        -- set current threadgroup\n"
   "\n"
   "stop in <class id>.<method>[(argument_type,...)]\n"
   "                          -- set a breakpoint in a method\n"
   "stop at <class id>:<line> -- set a breakpoint at a line\n"
   "clear <class id>.<method>[(argument_type,...)]\n"
   "                          -- clear a breakpoint in a method\n"
   "clear <class id>:<line>   -- clear a breakpoint at a line\n"
   "clear                     -- list breakpoints\n"
   "catch <class id>          -- break when specified exception
thrown\n"
   "ignore <class id>         -- cancel \'catch\'  for the specified
exception\n"
   "watch [access|all] <class id>.<field name>\n"
   "                          -- watch access/modifications to a
field\n"
   "unwatch [access|all] <class id>.<field name>\n"
   "                          -- discontinue watching
access/modifications to a field\n"
   "trace methods [thread]    -- trace method entry and exit\n"
   "untrace methods [thread]  -- stop tracing method entry and exit\n"
   "step                      -- execute current line\n"
   "step up                   -- execute until the current method
returns to its caller\n"
   "stepi                     -- execute current instruction\n"
   "next                      -- step one line (step OVER calls)\n"
   "cont                      -- continue execution from breakpoint\n"
   "\n"
   "list [line number|method] -- print source code\n"
   "use (or sourcepath) [source file path]\n"
   "                          -- display or change the source path\n"
   "exclude [class id ... | \"none\"]\n"
   "                          -- do not report step or method events for
specified classes\n"
   "classpath                 -- print classpath info from target VM\n"
   "\n"
   "monitor <command>         -- execute command each time the program
stops\n"
   "monitor                   -- list monitors\n"
   "unmonitor <monitor#>      -- delete a monitor\n"
   "read <filename>           -- read and execute a command file\n"
   "\n"
   "lock <expr>               -- print lock info for an object\n"
   "threadlocks [thread id]   -- print lock info for a thread\n"
   "\n"
   "disablegc <expr>          -- prevent garbage collection of an
object\n"
   "enablegc <expr>           -- permit garbage collection of an
object\n"
   "\n"
   "!!                        -- repeat last command\n"
   "<n> <command>             -- repeat command n times\n"
   "help (or ?)               -- list commands\n"
   "version                   -- print version information\n"
   "exit (or quit)            -- exit debugger\n"
   "\n"
   "<class id>: full class name with package qualifiers or a \n"
   "pattern with a leading or trailing wildcard (\'*\').\n"
   "<thread id>: thread number as reported in the \'threads\' command\n"

   "<expr>: a Java(tm) Programming Language expression.\n"
   "Most common syntax is supported.\n"
   "\n"
   "Startup commands can be placed in either \"jdb.ini\" or
\".jdbrc\"\n"
   "in user.home or user.dir\n"
   "> "
#  Loading class "test"...
#  Searching for "test" source...
-> "use\n"
<- ".\n"
   "> "
#  Searching for "test" source..."test.java".
#  Reading file "/root/coolStuff/test.java"...
#  Reading file "/root/coolStuff/test.java"...done.
#  Loading class "test"...done.
#  File "/root/coolStuff/test.java" 34 lines, 959 characters
#  Setting buttons...
#  Setting buttons...done.
-> "load test\n"
<- "Command \'load\' is not valid until the VM is started with the
\'run\' command\n"
   "> "
-> "dump SIZE\n"
<- "Command \'dump\' is not valid until the VM is started with the
\'run\' command\n"
   "> "
-> "dump i\n"
<- "Command \'dump\' is not valid until the VM is started with the
\'run\' command\n"
   "> "
-> "dump print\n"
<- "Command \'dump\' is not valid until the VM is started with the
\'run\' command\n"
   "> "
-> "dump B\n"
<- "Command \'dump\' is not valid until the VM is started with the
\'run\' command\n"
   "> "
-> "stop at test:17\n"
<- "Deferring breakpoint test:17.\n"
   "It will be set after the class is loaded.\n"
   "> "
-> "clear\n"
<- "Breakpoints set:\n"
   "\tbreakpoint test:17\n"
   "> "
-> "run\n"
<- "run test\n"
<- "> "
<- "\n"
   "VM Started: "
<- "Set deferred breakpoint test:17"
<- "\n"
<- "Begin test\n"
<- "\n"
   "Breakpoint hit: "
<- "thread=\"main\""
<- ", "
<- "test.main(), line=17, bci=40"
<- "\n"
<- "  17 \tB = A;"
<- "\n"
<- "\n"
<- "main[1] "
-> "dump B\n"
<- " B = instance of int[3] (id=220) {"
<- "\n"
<- "}"
<- "\n"
<- "main[1] "
-> "print B\n"
<- " B = instance of int[3] (id=220)\n"
   "main[1] "
-> "dump for\n"
<- "Encountered \"for\" at line 1, column 2.\n"
   "Was expecting one of:\n"
   "    \"false\" ...\n"
   "    \"new\" ...\n"
   "    \"null\" ...\n"
   "    \"super\" ...\n"
   "    \"this\" ...\n"
   "    \"true\" ...\n"
   "    <INTEGER_LITERAL> ...\n"
   "    <FLOATING_POINT_LITERAL> ...\n"
   "    <CHARACTER_LITERAL> ...\n"
   "    <STRING_LITERAL> ...\n"
   "    <IDENTIFIER> ...\n"
   "    \"(\" ...\n"
   "    \"!\" ...\n"
   "    \"~\" ...\n"
   "    \"++\" ...\n"
   "    \"--\" ...\n"
   "    \"+\" ...\n"
   "    \"-\" ...\n"
   "    "
<- "\n"
<- "main[1] "
-> "dump A\n"
<- " A = instance of int[3] (id=222) {\n"
   "}\n"
   "main[1] "
-> "print A\n"
<- " A = instance of int[3] (id=222)"
<- "\n"
<- "main[1] "
-> "dump results\n"
<- "Name unknown: results\n"
   "main[1] "
#  Deleting session "112f293949000098170242300000006470112"...
#  Current session is [none].
#  Deleting session "112f293949000098170242300000006470112"...done.
-> "quit\n"
<- "A[0] = 2, A[1] = 4, A[2] = 6\n"
   "B[0] = 2, B[1] = 4, B[2] = 6\n"
   "Ending test\n"
#  Running JDB (pid 4631, tty /dev/pts/2)...Exit 0.
#  Saving history in "/root/.ddd/history"...
#  Saving history in "/root/.ddd/history"...done.
#  Thanks for using DDD 3.3!






reply via email to

[Prev in Thread] Current Thread [Next in Thread]