Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jelmer Vernooij <jelmer@samba.org>
To: Scott Moser <ssmoser@us.ibm.com>
Cc: Eli Zaretskii <eliz@is.elta.co.il>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] plugin patch
Date: Wed, 06 Nov 2002 07:54:00 -0000	[thread overview]
Message-ID: <20021106155151.GA2522@charis.vernstok> (raw)
In-Reply-To: <Pine.LNX.4.44.0211060905230.18844-100000@dmfet>

On Wed, Nov 06, 2002 at 09:13:44AM -0600, Scott Moser wrote about 'Re: [PATCH] plugin patch':
> On Wed, 6 Nov 2002, Jelmer Vernooij wrote:

> > On Wed, Nov 06, 2002 at 08:45:18AM -0600, Scott Moser wrote about 'Re: [PATCH] plugin patch':

> > >    If my patch was submitted incorrectly, there was something else
> > > that I was missing, or anything else I'd need to change/update/add,
> > > please let me know.
> > One small suggestion; add some kind of version system for the plugins.
> > The API for plugins might change in the future and you don't want bug
> > reports from users complaining that gdb segfaults when they're trying
> > to load a plugin. We had the same thing when implementing this in
> > samba.

>    While its not by any means ideal due to the changing format of the
> GDB version, the patch did have a method for a plugin to require a
> specific version of GDB.
>    when the plugin is loaded, its passed the gdb version (from
> gdb/version.in).  If it decides it can't work with that version, then it
> can return false and the plugin loader will say "failed to load".
>    This way, the weight is on the plugin to decide if it can run or not,
> rather than GDB.  Is that something like what you were looking for?
Plugins won't "know" the API that is used in newer versions of GDB, so
they can't really decide whether they are or are not compatible with
it. Only allowing plugins to be loaded with _exactly_ the same version 
as the gdb they are loaded into works well (same way the linux kernel
does).

If the plugins are using a small number of functions only, you
might want to consider using an API version number - whenever one of
these functions changes, you increase the version number. This would
allow plugins from various gdb versions (but with the same API
version) to be used without the need of recompiling.

Jelmer


  reply	other threads:[~2002-11-06 15:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-28 14:01 Scott Moser
2002-10-28 22:28 ` Eli Zaretskii
2002-10-29  7:55   ` Paul A. Clarke
2002-11-06  6:45   ` Scott Moser
2002-11-06  6:56     ` Jelmer Vernooij
2002-11-06  7:13       ` Scott Moser
2002-11-06  7:54         ` Jelmer Vernooij [this message]
2002-11-06  9:14           ` Andrew Cagney
2002-11-06 15:07             ` Paul A. Clarke
2002-11-06 15:56               ` Andrew Cagney
2002-11-07 10:05                 ` Paul A. Clarke
2002-11-07 11:57                   ` Andrew Cagney
2002-11-07 13:10                   ` Klee Dienes
2002-11-06 15:56 ` Andrew Cagney
2002-11-06  7:47 Howell, David P
2002-11-06  7:55 ` Daniel Jacobowitz
2002-11-06 11:12 ` Andrew Cagney
2002-11-06 11:55   ` Paul A. Clarke
2002-11-06 12:29     ` 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=20021106155151.GA2522@charis.vernstok \
    --to=jelmer@samba.org \
    --cc=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ssmoser@us.ibm.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