From: Daniel Jacobowitz <drow@mvista.com>
To: gdb@sources.redhat.com
Subject: Re: Remote debugging of multithreaded programs using gdbserver
Date: Thu, 18 Apr 2002 07:56:00 -0000 [thread overview]
Message-ID: <20020418105635.A18461@nevyn.them.org> (raw)
In-Reply-To: <075b01c1e6dc$92861960$68b17fc0@wipro.com>
Comments about the rest later, but:
On Thu, Apr 18, 2002 at 06:55:56PM +0530, Subhashini Nagarajan Rao wrote:
> Hi Daniel,
>
> As you had stated there are instances of inheritance of the
> concepts in the implementation of the gdbserver from the native gdb. This
> is due to the fact that we want to get the code functionally correct and
> running
> and later revisions can be done to it. Reply to the comments follow.
You had a very thorough design document, and a design document ought to
consider the eventual goal and not the current step. Otherwise you
just waste a lot of work.
> > > 8. Miscellaneous changes
> > >
> > > When the user fires a 'thread <id>' command , switch to the specified
> > > thread but a step after this was not able to tell the server that the
> > > thread to be stepped is the new thread and not the previous one.
> Hence,
> > > there is a need for the client, to remotely specify the current thread
> > > in switch_to_thread(). However since switch_to_thread() is written
> >
> > I don't see anything here that requires information gdbserver does not
> > already have. It knows the last thread stepped and the thread
> > requested.
> >
> When we switch from one thread to another as a result of 'thread' command
> the inferior_ptid gets updated to the new thread. Now, when I do a `next',
> in the native gdb, all the threads are resumed and in this case the step
> signal will be given to the updated inferior_ptid. However, in the case
> remote
> debugging if I resume all the threads after the `thread' command by doing a
> next on the new thread I will be sending a Hc-1 packet and the server is not
> notified about the thread switch. To mention the current thread I need to
> send
> a Hc<id> packet so that the server will be informed about the current thread
> of
> execution and it will do a step on the correct thread. This is done by
> calling set_thread().
OK, I believe I see the problem. It looks like a bug in core GDB; we
resume all threads so remote_resume does not communicate which one to
step. I'll think about this for a bit.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-04-18 14:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-18 6:20 Subhashini Nagarajan Rao
2002-04-18 7:56 ` Daniel Jacobowitz [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-22 23:35 Subhashini Nagarajan Rao
2002-04-22 23:45 ` Daniel Jacobowitz
2002-04-19 5:56 Subhashini Nagarajan Rao
2002-04-19 9:16 ` Daniel Jacobowitz
2002-04-17 21:53 Subhashini Nagarajan Rao
2002-04-17 22:42 ` Daniel Jacobowitz
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=20020418105635.A18461@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb@sources.redhat.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