Stop gdb [message #118308] |
Tue, 31 August 2004 10:36  |
Eclipse User |
|
|
|
Originally posted by: cenedese.nospam.indel.ch
Hi
Is there a possibility to stop or restart gdb? I don't know where things go
wrong, but sometimes gdb doesn't communicate with my gdbserver anymore,
commands from eclipse seem to go in gdb but gdb won't pay attention to
them.
Also terminating the debug process and restarting doesn't work, I get a
"Failed launching CDI Debugger" error. I have to quit eclipse.
Here is a short output from the debug console. I had it connected the first
time and could read the thread info. Then it should show me the variables.
That's why it's looking for this (=CMainTask*) and _ini_. But I don't know
why this stops gdb from working as it is still resolving the symbols for
which it doesn't need the target...
[1'093'960'786'828] 18 whatis this
[1'093'960'786'843] &"whatis this\n"
[1'093'960'786'843] ~"type = CMainTask *\n"
[1'093'960'786'859] 18^done
[1'093'960'786'859] (gdb)
[1'093'960'786'859] 19 ptype CMainTask *
[1'093'960'786'859] &"ptype CMainTask *\n"
[1'093'960'786'859] &"A syntax error in expression, near `'.\n"
[1'093'960'786'859] 19^error,msg="A syntax error in expression, near `'."
[1'093'960'786'859] 20 ptype CMainTask *
[1'093'960'786'859] (gdb)
[1'093'960'786'859] &"ptype CMainTask *\n"
[1'093'960'786'875] &"A syntax error in expression, near `'.\n"
[1'093'960'786'875] 20^error,msg="A syntax error in expression, near `'."
[1'093'960'786'875] (gdb)
[1'093'960'786'875] 21 ptype this
[1'093'960'786'875] &"ptype this\n"
[1'093'960'786'875] ~"type = class CMainTask : public CINOSTask {\n"
[1'093'960'786'875] ~" public:\n"
[1'093'960'786'875] ~" CMainTask & operator=(CMainTask const &);\n"
[1'093'960'786'875] ~" virtual ~CMainTask(void);\n"
[1'093'960'796'875] 22 ptype this
[1'093'960'830'515] 23-var-create - * this
[1'093'960'847'593] 24 whatis _ini_
[1'093'960'857'593] 25 whatis _ini_
[1'093'960'867'593] 26 whatis _ini_
[1'093'960'877'593] 27 whatis _ini_
[1'093'960'887'593] 28 whatis _ini_
[1'093'960'897'593] 29-var-create - * _ini_
[1'093'960'907'671] 30 whatis _ini_
[1'093'960'917'671] 31 whatis _ini_
[1'093'960'927'671] 32 whatis _ini_
[1'093'960'937'671] 33 whatis _ini_
[1'093'960'947'734] 34 whatis _ini_
[1'093'960'957'734] 35 whatis _ini_
[1'093'960'967'734] 36 whatis _ini_
[1'093'960'977'734] 37 whatis _ini_
[1'093'960'987'734] 38 whatis _ini_
[1'093'960'997'734] 39 whatis _ini_
[1'093'961'065'000] 40-thread-select 2
[1'093'961'081'312] 41-thread-select 14
[1'093'961'176'437] 42-thread-select 14
[1'093'961'225'828] 43-thread-select 13
[1'093'961'235'828] 44-thread-select 13
[1'093'962'060'562] 45 kill
[1'093'962'137'421] gdb --cd=N:\Temp\JavaProjectsCpp\inos3
--command=.gdbinit --quiet -nw -i mi1 N:\\
Temp\JavaProjectsCpp\inos3\Debug\inos3
[1'093'962'137'500] 46-gdb-set confirm off
[1'093'962'137'500] 46^done
[1'093'962'137'500] (gdb)
[1'093'962'137'500] 47-gdb-set width 0
[1'093'962'137'500] 47^done
[1'093'962'137'500] (gdb)
[1'093'962'137'500] 48-gdb-set height 0
[1'093'962'137'500] 48^done
[1'093'962'137'500] (gdb)
[1'093'962'137'500] 49-target-select remote localhost:10372
[1'093'962'147'515] 51 whatis _ini_
[1'093'962'157'515] 52 whatis _ini_
[1'093'962'167'515] 53 whatis _ini_
[1'093'962'177'515] 54 whatis _ini_
[1'093'962'187'515] 55 whatis _ini_
[1'093'962'197'562] 56 whatis _ini_
[1'093'962'207'562] 57 whatis _ini_
During this whole log I had no communication to the gdbserver anymore. Also
the kill command was not delivered as it should be I guess.
Thanks
bye Fabi
|
|
|
|
|
Re: Stop gdb [message #119407 is a reply to message #119261] |
Fri, 03 September 2004 17:31   |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
Fabi wrote:
..
> > Not much the CDT debugger can do when the backend crash(GDB).
> > We have a timeout per command.
> Well, gdb is started upon Debug, no?
Yes.
> And when I end the debug session gdb is stopped again.
Yes, when you terminate the debug session:
- a MI kill command is sent to gdb(terminates the application)
- a MI exit command is sent to gdb (terminates gdb)
- the pipe is close
> So shouldn't this work even if gdb is crashed?
In your case gdb did not crash .. it stops responding, this is
why you see to commands accumulate. Since by default the pipe is still
open, the session is not (really)terminated yet.
By killing gdb, we can detect
that the other end of the pipe is close and terminate the eclipse
debug session.
> I mean also
> closing eclipse makes gdb stop, I never had to use the task manager.
Yes, when you terminate eclipse, all the debug sessions are close i.e.
all the gdb pipes are close .. by default the OS should kill gdb.
> But I
> can try next time, this would keep me from restarting eclipse...
Yes.
...
> > GDB went on a buble 8-). Try to start gdb by end and do
> > the same command we are doing. It is not a very pleasant situation
> > basically you need to debug gdb and see why it fails.
> I found out that the standalone gdb also has a problem with this symbol and
> crashes with stackdump. I already reported it on the gdb mailing list
> though
> I don't know when a solution will be available. For me debugging gdb is
> still
> a bit over my head though I have a reproducible case (the best thing for a
> developer :)
Excellent, hopefully the GDB folks can be of more help
|
|
|
Re: Stop gdb [message #119502 is a reply to message #119407] |
Mon, 06 September 2004 02:36  |
Eclipse User |
|
|
|
Originally posted by: cenedese.nospam.indel.ch
> Yes, when you terminate the debug session:
> - a MI kill command is sent to gdb(terminates the application)
> - a MI exit command is sent to gdb (terminates gdb)
> - the pipe is close
> Yes, when you terminate eclipse, all the debug sessions are close i.e.
> all the gdb pipes are close .. by default the OS should kill gdb.
Thanks for the explanations.
> > I found out that the standalone gdb also has a problem with this symbol and
> > crashes with stackdump. I already reported it on the gdb mailing list
> > though
> > I don't know when a solution will be available. For me debugging gdb is
> > still
> > a bit over my head though I have a reproducible case (the best thing for a
> > developer :)
> Excellent, hopefully the GDB folks can be of more help
Well, I offered to send anyone interested the debug file but got no reply.
I guess they're already busy doing other things :) Maybe I'll find another
workaround (like debugging another task :)
Thanks
bye Fabi
|
|
|
Powered by
FUDForum. Page generated in 0.07047 seconds