David,

Thanks for your hint, I can attach JDE-->JDB to a running process now. What I 
was doing wrong is that I misunderstood how to attach JDB and kept starting 
Tomcat under "jdb" rather than "java" using the dt_shmem option. JDE-->JDB 
then did have nothing to attach to.

Thanks, Milan

On March 22, 2002 01:36 am:
> Milan,
>
> from Java doc for jdb (Start page=>Tool Documentation=>Basic Tools=>jdb):
>
> ############################################
> There are many ways to start a jdb session. The most frequently used way is
> to have jdb launch a new Java Virtual Machine (VM) with the
>           main class of the application to be debugged. This is done by
> substituting the command jdb for java in the command line. For example, if
> your
>           application's main class is MyClass, you use the following
> command to debug it under JDB:
>
>            % jdb MyClass
>
>           When started this way, jdb invokes a second Java VM with any
> specified parameters, loads the specified class, and stops the VM before
>           executing that class's first instruction.
>
>           Another way to use jdb is by attaching it to a Java VM that is
> already running. A VM that is to be debugged with jdb must be started with
>           the following options:
>
>                 option
>                                                                  purpose
>                 -Xdebug
>                                                                  Enables
> debugging support in the VM
>                 -Xrunjdwp:transport=dt_socket,server=y,suspend=n
>                                                                  Loads
> in-process debugging libraries and specifies the kind
>                                                                  of
> connection to be made.
>
>
>           For example, the following command will run the MyClass
> application, and allow jdb to connect to it at a later time.
>
>            % java -Xdebug
> -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
>
>           You can then attach jdb to the VM with the following commmand:
>
>            % jdb -attach 8000
>
> #################################################
>
> Well in my case it is more complex, because my Application is running on
> the remote machine. So I need something like
> host:adrres specification. You can find this in the same Docu:
>
> #################################################
>
>
> Socket Transport
>
> The JPDA reference implementation provides a socket transport on both
> Solaris and Win32 platforms. The socket transport uses standard TCP/IP
> sockets to
> communicate information between debugger applications and target VM. With
> the socket transport, the debugger application and target VM can reside
> either on the
> same machine or on different machines. The socket transport is identified
> through a unique string, dt_socket. This name can be used to select the
> socket transport
> when invoking the target VM and when selecting a JDI connector.
>
> In contexts where a client is attaching to a server, socket transport
> addresses have the format "<name>:<port>" where <name> is the host name and
> <port> is the
> socket port number at which it attaches or listens. In contexts where a
> server is waiting for a client to attach, the address consists of the port
> number alone (the host
> name is implicit).
>
> #################################################
>
> So, I'm starting the Application with:
> java -Xdebug -Xrunjdwp:transport=dt_socket,address=7003,server=y,suspend=n
> ....
>
> and I've customized the variable jde-db-option-connect-address to
> "w001705E:7003"
>
> In this way I can connect to my application, hit the breakpoints, see the
> value of variables.
> The only problem is, that with each command I'm getting elisp warning/error
> (split-string ...).
>
> Regards
> David Ostrovsky
>
>
>
>
>
>                     Milan Zimmermann
>                     <milan.zimmermann@sym        An:     [EMAIL PROTECTED]
>                     patico.ca>                   Kopie:
>                                                  Thema:  Re: Debugging with
> jdb (JDE-2.2.9beta9) 22.03.02 06:22
>
>
>
>
>
>
> How are you starting the process you are attaching to from jdb? the reason
> I
> ask is that you are further that I - I cannot even attach jdb to a running
> process - thanks.
>
> On March 19, 2002 06:46 am, you wrote:
> > After activating the debugger (I can connect, set breakpoints etc)
> > I'm getting error/warninig with each action. The action is executed.
> >
> > Backtrace:
> > Signaling: (args-out-of-range 0 0)
> >   split-string("ExecuteThread: '14' for queue: 'default'[1] " "\n")
> >   (let ((msgs ...)) (loop for msg in msgs do (if ... ...)))
> >   jde-jdb-breakpoint-listener([object jde-jdb-breakpoint-listener "jdb
> > breakpoint listener" [object jde-db-jpda-jdb "jpda jdb" "jdb" "*debug
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound (... #0) [object
> > jde-jdb-cmd-set "jdb commands" #1 ... ... ... ... ... ... ... ... ... ...
> > .... ...] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #1]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" ... ""] "jdb"
> > "/usr/j2se/bin/jdb"] "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.
> > *\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "^Breakpoint hit: .*(pc \\([0-9]
> > *\\))" ""] "ExecuteThread: '14' for queue: 'default'[1] ")
> >   apply(jde-jdb-breakpoint-listener ([object jde-jdb-breakpoint-listener
> > "jdb breakpoint listener" [object jde-db-jpda-jdb "jpda jdb" "jdb" "
>
> *debug
>
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound ... ... nil ... ... "jdb"
> > "/usr/j2se/bin/jdb"] "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.
> > *\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "^Breakpoint hit: .*(pc \\([0-9]
> > *\\))" ""] "ExecuteThread: '14' for queue: 'default'[1] "))
> >   eieio-generic-call(jde-jdb-set-breakpoint-listener ([object
> > jde-jdb-breakpoint-listener "jdb breakpoint listener" [object
> > jde-db-jpda-jdb "jpda jdb" "jdb" "*debug w001705E:7003*" #<buffer "*debug
> > w001705E:7003*"> #<process "*debug w001705E:7003*" pid 11211 state:run> t
> > unbound ... ... nil ... ... "jdb" "/usr/j2se/bin/jdb"] "^.*: thread=.*,
> > \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.*\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "
> > ^Breakpoint hit: .*(pc \\([0-9]*\\))" ""] "ExecuteThread: '14' for queue:
> > 'default'[1] "))
> >   jde-jdb-set-breakpoint-listener([object jde-jdb-breakpoint-listener
>
> "jdb
>
> > breakpoint listener" [object jde-db-jpda-jdb "jpda jdb" "jdb" "*debug
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound (... #0) [object
> > jde-jdb-cmd-set "jdb commands" #1 ... ... ... ... ... ... ... ... ... ...
> > .... ...] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #1]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" ... ""] "jdb"
> > "/usr/j2se/bin/jdb"] "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.
> > *\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "^Breakpoint hit: .*(pc \\([0-9]
> > *\\))" ""] "ExecuteThread: '14' for queue: 'default'[1] ")
> >   (let ((jdb ...) (output "")) (oset this :marker-acc (concat ... input))
> > (jde-jdb-fixup-output this) (let* (... ... ...) (if ... ...)) (if
> > (string-match ... ...) (let ... ...)) (if (string-match "\\(^Breakpoint
> > hit:\\)\\|\\(^Step completed:\\)" ...) (progn ... ...) (setq output ...)
> > (oset this :marker-acc "")) (jde-jdb-set-breakpoint-listener this output)
> > output)
> >   jde-jdb-breakpoint-listener([object jde-jdb-breakpoint-listener "jdb
> > breakpoint listener" [object jde-db-jpda-jdb "jpda jdb" "jdb" "*debug
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound (... #0) [object
> > jde-jdb-cmd-set "jdb commands" #1 ... ... ... ... ... ... ... ... ... ...
> > .... ...] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #1]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" ... ""] "jdb"
> > "/usr/j2se/bin/jdb"] "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.
> > *\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "^Breakpoint hit: .*(pc \\([0-9]
> > *\\))" ""] "ExecuteThread: '14' for queue: 'default'[1] ")
> >   apply(jde-jdb-breakpoint-listener ([object jde-jdb-breakpoint-listener
> > "jdb breakpoint listener" [object jde-db-jpda-jdb "jpda jdb" "jdb" "
>
> *debug
>
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound ... ... nil ... ... "jdb"
> > "/usr/j2se/bin/jdb"] "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.
> > *\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "^Breakpoint hit: .*(pc \\([0-9]
> > *\\))" ""] "ExecuteThread: '14' for queue: 'default'[1] "))
> >   eieio-generic-call(jde-db-listener-filter-output ([object
> > jde-jdb-breakpoint-listener "jdb breakpoint listener" [object
> > jde-db-jpda-jdb "jpda jdb" "jdb" "*debug w001705E:7003*" #<buffer "*debug
> > w001705E:7003*"> #<process "*debug w001705E:7003*" pid 11211 state:run> t
> > unbound ... ... nil ... ... "jdb" "/usr/j2se/bin/jdb"] "^.*: thread=.*,
> > \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.*\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "
> > ^Breakpoint hit: .*(pc \\([0-9]*\\))" ""] "ExecuteThread: '14' for queue:
> > 'default'[1] "))
> >   jde-db-listener-filter-output([object jde-jdb-breakpoint-listener "jdb
> > breakpoint listener" [object jde-db-jpda-jdb "jpda jdb" "jdb" "*debug
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound (... #0) [object
> > jde-jdb-cmd-set "jdb commands" #1 ... ... ... ... ... ... ... ... ... ...
> > .... ...] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #1]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" ... ""] "jdb"
> > "/usr/j2se/bin/jdb"] "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.
> > *\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "^Breakpoint hit: .*(pc \\([0-9]
> > *\\))" ""] "ExecuteThread: '14' for queue: 'default'[1] ")
> >   (setq output (jde-db-listener-filter-output listener output))
> >   (while (consp G66489) (setq listener (car G66489)) (setq output
> > (jde-db-listener-filter-output listener output)) (setq G66489 (cdr
> > G66489)))
> >   (let* ((G66489 listeners) (listener nil)) (while (consp G66489) (setq
> > listener ...) (setq output ...) (setq G66489 ...)) nil)
> >   (catch (quote --cl-block-nil--) (let* (... ...) (while ... ... ... ...)
> > nil))
> >   (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... nil)))
> >   (block nil (let* (... ...) (while ... ... ... ...) nil))
> >   (loop for listener in listeners do (setq output
> > (jde-db-listener-filter-output listener output)))
> >   (let ((proc ...) (listeners ...) (response output) (last-cmd ...))
>
> (loop
>
> > for listener in listeners do (setq output ...)) (comint-output-filter
>
> proc
>
> > output) (if last-cmd (jde-db-cmd-notify-response last-cmd response)) (if
> > (jde-db-ready-p this output) (jde-db-exec-next-cmd this)))
> >   jde-db-debugger([object jde-db-jpda-jdb "jpda jdb" "jdb" "*debug
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound ([object
> > jde-jdb-stack-listener "jdb stack listener" #0 ""] [object
> > jde-jdb-breakpoint-listener "jdb breakpoint listener" #0 "^.*: thread=.*,
> > \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.*\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "
> > ^Breakpoint hit: .*(pc \\([0-9]*\\))" ""]) [object jde-jdb-cmd-set "jdb
> > commands" #0 [object jde-jdb-cmd-launch "launch" "launch" #0] [object
> > jde-jdb-cmd-run "run" "run" #0] [object jde-jdb-cmd-cont "cont" "cont"
>
> #0]
>
> > [object jde-jdb-cmd-quit "jdb quit" "quit" #0] [object
> > jde-jdb-cmd-step-over "jdb step-over cmd" "next" #0] [object
> > jde-jdb-cmd-step-into "jdb step-into cmd" "step" #0] [object
> > jde-jdb-cmd-step-out "jdb step-out cmd" "step up" #0] [object
> > jde-jdb-cmd-up "jdb up cmd" "up" #0] [object jde-jdb-cmd-down "jdb down
> > cmd" "down" #0] [object jde-jdb-cmd-where "jdb where cmd" "where" #0]
> > [object jde-jdb-cmd-set-breakpoint "jdb set breakpoint" "stop at" #0 nil]
> > [object jde-jdb-cmd-clear-breakpoint "jdb clear breakpoint" "clear" #0
> > unbound]] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #0]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" [object
> > jde-db-debuggee-status "debuggee status" t nil nil] ""] "jdb"
> > "/usr/j2se/bin/jdb"] "ExecuteThread: '14' for queue: 'default'[1] ")
> >   apply(jde-db-debugger ([object jde-db-jpda-jdb "jpda jdb" "jdb" "*debug
> > w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "*debug
> > w001705E:7003*" pid 11211 state:run> t unbound (... ...) [object
> > jde-jdb-cmd-set "jdb commands" #1 ... ... ... ... ... ... ... ... ... ...
> > .... ...] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #1]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" ... ""] "jdb"
> > "/usr/j2se/bin/jdb"] "ExecuteThread: '14' for queue: 'default'[1] "))
> >   eieio-generic-call(jde-db-process-debugger-output ([object
> > jde-db-jpda-jdb "jpda jdb" "jdb" "*debug w001705E:7003*" #<buffer "*debug
> > w001705E:7003*"> #<process "*debug w001705E:7003*" pid 11211 state:run> t
> > unbound (... ...) [object jde-jdb-cmd-set "jdb commands" #1 ... ... ...
>
> ....
>
> > .... ... ... ... ... ... ... ...] nil [object jde-jdb-cmd-step-over "jdb
> > step-over cmd" "next" #1] [object jde-db-debuggee "debuggee" unbound
> > "w001705E:7003" ... ""] "jdb" "/usr/j2se/bin/jdb"] "ExecuteThread: '14'
>
> for
>
> > queue: 'default'[1] "))
> >   jde-db-process-debugger-output([object jde-db-jpda-jdb "jpda jdb" "jdb"
>
> "
>
> > *debug w001705E:7003*" #<buffer "*debug w001705E:7003*"> #<process "
>
> *debug
>
> > w001705E:7003*" pid 11211 state:run> t unbound ([object
> > jde-jdb-stack-listener "jdb stack listener" #0 ""] [object
> > jde-jdb-breakpoint-listener "jdb breakpoint listener" #0 "^.*: thread=.*,
> > \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.*\\)*[.].+(), line=\\([0-9]*\\)," 3 5 "
> > ^Breakpoint hit: .*(pc \\([0-9]*\\))" ""]) [object jde-jdb-cmd-set "jdb
> > commands" #0 [object jde-jdb-cmd-launch "launch" "launch" #0] [object
> > jde-jdb-cmd-run "run" "run" #0] [object jde-jdb-cmd-cont "cont" "cont"
>
> #0]
>
> > [object jde-jdb-cmd-quit "jdb quit" "quit" #0] [object
> > jde-jdb-cmd-step-over "jdb step-over cmd" "next" #0] [object
> > jde-jdb-cmd-step-into "jdb step-into cmd" "step" #0] [object
> > jde-jdb-cmd-step-out "jdb step-out cmd" "step up" #0] [object
> > jde-jdb-cmd-up "jdb up cmd" "up" #0] [object jde-jdb-cmd-down "jdb down
> > cmd" "down" #0] [object jde-jdb-cmd-where "jdb where cmd" "where" #0]
> > [object jde-jdb-cmd-set-breakpoint "jdb set breakpoint" "stop at" #0 nil]
> > [object jde-jdb-cmd-clear-breakpoint "jdb clear breakpoint" "clear" #0
> > unbound]] nil [object jde-jdb-cmd-step-over "jdb step-over cmd" "next"
>
> #0]
>
> > [object jde-db-debuggee "debuggee" unbound "w001705E:7003" [object
> > jde-db-debuggee-status "debuggee status" t nil nil] ""] "jdb"
> > "/usr/j2se/bin/jdb"] "ExecuteThread: '14' for queue: 'default'[1] ")
> >   (lambda (process output) (jde-db-process-debugger-output (oref ...
> > the-debugger) output))(#<process "*debug w001705E:7003*" pid 11211
> > state:run> "ExecuteThread: '14' for queue: 'default'[1] ")
> >
> > Debugger window:
> > > stop at de.dvg.fdl.zv.activity.GenericTestActivity:128
> >
> > Set breakpoint de.dvg.fdl.zv.activity.GenericTestActivity:128
> >
> > Breakpoint hit: thread="ExecuteThread: '14' for queue: 'default'",
> > de.dvg.fdl.zv.activity.GenericTestActivity.startDomain(), line=128,
>
> bci=11
>
> > ExecuteThread: '14' for queue: 'default'[1] next
> > Step completed: thread="ExecuteThread: '14' for queue: 'default'",
> > de.dvg.fdl.zv.activity.GenericTestActivity.startDomain(), line=132,
>
> bci=24
>
> > ExecuteThread: '14' for queue: 'default'[1] next
> > Step completed: thread="ExecuteThread: '14' for queue: 'default'",
> > de.dvg.fdl.zv.activity.GenericTestActivity.startDomain(), line=134,
>
> bci=40
>
> > ExecuteThread: '14' for queue: 'default'[1]
> >
> >
> > Any  Ideas? All my libraries are new.
> >
> > Another question: I cannot find jde-jdb-launch. All I have:
>
> jde-jdb-attach
>
> > and jde-jdb-listen.
> > Am I missing something?
> >
> >
> >
> > Regards
> > David Ostrovsky
> >
> > e-Mail   [EMAIL PROTECTED]

Reply via email to