Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Extend remote protocol to allow symbol look-up service.
Date: Fri, 27 Apr 2001 07:54:00 -0000	[thread overview]
Message-ID: <3AE987D5.7D14DDCA@cygnus.com> (raw)
In-Reply-To: <3AE89184.6B6BF207@cygnus.com>

[this really belongs on gdb@]

> > Could a target encounter a situtation where it needed symbol values
> > before it could report back a program status?  The problem is very much
> > like the input/output cases where the target is wanting to nest a query
> > request within the normal packet flow.  Should input/output and this
> > query all use the same mechanism?
> 
> I can't see it.  The target may need the symbols earlier, but until the
> shared library is loaded, they aren't available.  Should the target just
> keep polling gdb for the symbols?  That would be terribly inefficient.
> This way, the target won't ask for them until there's at least some
> reason to believe that they might have become available.

Ah, yes, ok.  It's a trade off between:

	a)	GDB learning new symbol info
		and prompting the target.

	b)	The target finding it would
		like a symbol and prompting
		GDB.

For case a) could there be a situtation where, when GDB discovers more
symbols and informs the target but the target doesn't yet know all the
symbols that it will need?  Given you've got your thread-db code working
I'd guess that you've solved this problem for your case.

--

SinceGDB is prompting the target is because it has discovered new symbol
info rather than it has loaded a shared library, should the initiation
be a message saying ``psst target, wana buy some new symbol info?''
rather than ``so, nudge nudge, wink wink, its a shared library, ...''. 
That way the exact purpose of the query is clear.  It should also mean
that the cases:

	o	static program with all
		symbols available

	o	symbols loaded via symbol
		file or such command.

can eventually be fixed without a further protocol change.  In each
case, since new symbol info has become available, the target should be
notified.

	Andrew


  reply	other threads:[~2001-04-27  7:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-17 16:29 Michael Snyder
2001-04-17 18:50 ` Jonathan Larmour
2001-04-19 13:40 ` Jim Blandy
2001-04-19 15:07   ` Michael Snyder
2001-04-21 16:35 ` Andrew Cagney
2001-04-26 14:22   ` Michael Snyder
2001-04-27  7:54     ` Andrew Cagney [this message]
2001-04-21 16:40 ` Andrew Cagney
2001-04-26 14:26   ` Michael Snyder
2001-04-27  8:20     ` Andrew Cagney

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=3AE987D5.7D14DDCA@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@cygnus.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