From: Daniel Jacobowitz <drow@false.org>
To: veenu khanna <veenu_khanna@yahoo.com>
Cc: gdb@sourceware.org
Subject: Re: GDB Stub & GPL question
Date: Fri, 09 Feb 2007 15:34:00 -0000 [thread overview]
Message-ID: <20070209153400.GA11366@nevyn.them.org> (raw)
In-Reply-To: <123982.25433.qm@web53807.mail.yahoo.com>
On Fri, Feb 09, 2007 at 07:21:22AM -0800, veenu khanna wrote:
> You mean to say that if we implement our own stub for gdb then it HAS
> to be a serial connection. It can not be IP based.
No, TCP should work fine.
> We are pondering over the idea to implement a gdb & gdbserver/stub
> solution for our proprietary OS (embedded arch) And I have few doubts
> about the viability. It seems that multiple instances of gdbserver
> needs to be launched to connect it to multiple processes. Is there a
> way to debug multiple processes with single gdbserver instance ? Say
> we write our own command in gdb to list all the processes in our OS.
> And then we do an attach from gdb like attach <pid> .
>
> Do you have any leads/ideas about how have people handled this
> problem ? Is it do-able ? or the only way to debug multiple processes
> is to have multiple instances of gdbserver.
A single GDB can only control one process at a time. By process I mean
a program running with a shared data space; multiple threads of the
same process are fine.
So if you want to debug multiple different processes, then you need to
be able to connect one GDB to your target for each process you want to
debug. That can be one stub handling multiple connections, or many
instances of the stub.
I once wrote some extensions to the remote protocol to allow you to
connect to a stub and use the "attach" command to attach to a process
on the remote system. I haven't merged them to GDB HEAD yet, but I
hope I'll get a chance to do that this year.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-02-09 15:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 15:21 veenu khanna
2007-02-09 15:34 ` Daniel Jacobowitz [this message]
2007-02-12 21:02 ` Breakpoint Handling For Dynamic Processes veenu khanna
2007-02-09 15:35 ` GDB Stub & GPL question Paul Koning
-- strict thread matches above, loose matches on Subject: below --
2007-01-31 15:02 veenu khanna
2007-01-31 15:04 ` Daniel Jacobowitz
2007-01-31 19:10 ` Nicholas Mc Guire
2007-01-31 19:13 ` Daniel Jacobowitz
2007-02-01 1:12 ` Robert Dewar
2007-02-01 5:26 ` Nicholas Mc Guire
2007-02-01 9:44 ` Robert Dewar
2007-02-01 22:51 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070209153400.GA11366@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=veenu_khanna@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox