Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb vs gdbserver
@ 2005-01-02 13:02 Tobias Grimm
  2005-01-02 15:02 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Grimm @ 2005-01-02 13:02 UTC (permalink / raw)
  To: GDB

Hi!

These are my first steps with gdb, but I'm already stuck and need some kind of 
jump start. I would like to debug a multithreaded application (VDR), which works 
fine if I do this "directly" with gdb. Using gdbserver, only one thread is 
created and then everything stops.

What I'm doing is this:

gdbserver host:1000 /usr/bin/vdr-dbg <arguments>

on the same (target-)machine, just another terminal:

gdb /usr/bin/vdr-dbg

(gdb) target remote localhost:1000
Remote debugging using localhost:1000
0x40000c20 in ?? ()
(gdb) c
Continuing.
[New Thread 16384]


And that's it - no other thread is loaded. Running gdb directly works perfectly.

Am I doing something wrong? What can I do to trace down the problem?

bye,

Tobias



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb vs gdbserver
  2005-01-02 13:02 gdb vs gdbserver Tobias Grimm
@ 2005-01-02 15:02 ` Daniel Jacobowitz
  2005-01-02 17:28   ` Tobias Grimm
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-01-02 15:02 UTC (permalink / raw)
  To: Tobias Grimm; +Cc: GDB

On Sun, Jan 02, 2005 at 02:06:55PM +0100, Tobias Grimm wrote:
> gdbserver host:1000 /usr/bin/vdr-dbg <arguments>

You are root so that it can open port 1000, right? :-)

> on the same (target-)machine, just another terminal:
> 
> gdb /usr/bin/vdr-dbg
> 
> (gdb) target remote localhost:1000
> Remote debugging using localhost:1000
> 0x40000c20 in ?? ()
> (gdb) c
> Continuing.
> [New Thread 16384]
> 
> 
> And that's it - no other thread is loaded. Running gdb directly works 
> perfectly.
> 
> Am I doing something wrong? What can I do to trace down the problem?

You could give us some information about your target, system,
and version.  And the output of "set debug remote 1".

-- 
Daniel Jacobowitz


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb vs gdbserver
  2005-01-02 15:02 ` Daniel Jacobowitz
@ 2005-01-02 17:28   ` Tobias Grimm
  0 siblings, 0 replies; 5+ messages in thread
From: Tobias Grimm @ 2005-01-02 17:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: GDB

Daniel Jacobowitz wrote:

>>gdbserver host:1000 /usr/bin/vdr-dbg <arguments>
> You are root so that it can open port 1000, right? :-)

Of course. And gdb also connects to port 1000, so this part
seems to work.

> You could give us some information about your target, system,
> and version.

Target is i386 (Debian Sarge running kernel 2.4.27). I tried it with gdb version 
6.1 and 6.3.

> And the output of "set debug remote 1".

Ok, thats funny - with this option set it works. Without "set debug remote 1" 
the application "hangs". But I can disable it after starting the application and 
it continues to work. So at least this is something I can work with. It still
shows only the creation of the main thread, but "info threads" prints out all
eight threads and I can switch to each of it.

Tobias


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb Vs gdbserver
  2002-10-04  5:53 gdb Vs gdbserver Usman S. Ansari
@ 2002-10-04  9:54 ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-10-04  9:54 UTC (permalink / raw)
  To: Usman S. Ansari; +Cc: Gdb List

On Fri, Oct 04, 2002 at 05:53:39AM -0700, Usman S. Ansari wrote:
> My multithreaded application has about 12 - 13 threads. One of the thread wakes up every 100
> millisecond, does its thing and than wait for next 100 millisecond interval.
> 
> If I ran this under gdb, and put break point in 100 millisecond thread, control returns to gdb,
> every time this thread is invoked. However, under gdbserver & gdb combination, only one time break
> point is hit.
> 
> I am setting solib-absolute-prefix option and otherwise multithread debugging under gdbserver is
> fine.
> 
> My target is 8xx and host is i386 (Redhat 7.2)
> 
> any ideas.

No ideas.  Do you have a small testcase, or can you make one?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* gdb Vs gdbserver
@ 2002-10-04  5:53 Usman S. Ansari
  2002-10-04  9:54 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Usman S. Ansari @ 2002-10-04  5:53 UTC (permalink / raw)
  To: Gdb List

My multithreaded application has about 12 - 13 threads. One of the thread wakes up every 100
millisecond, does its thing and than wait for next 100 millisecond interval.

If I ran this under gdb, and put break point in 100 millisecond thread, control returns to gdb,
every time this thread is invoked. However, under gdbserver & gdb combination, only one time break
point is hit.

I am setting solib-absolute-prefix option and otherwise multithread debugging under gdbserver is
fine.

My target is 8xx and host is i386 (Redhat 7.2)

any ideas.

Thanks
Please reply all.

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-02 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-02 13:02 gdb vs gdbserver Tobias Grimm
2005-01-02 15:02 ` Daniel Jacobowitz
2005-01-02 17:28   ` Tobias Grimm
  -- strict thread matches above, loose matches on Subject: below --
2002-10-04  5:53 gdb Vs gdbserver Usman S. Ansari
2002-10-04  9:54 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox