This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Issue an internal warning on first deprecated function call
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: Andrew Cagney <ac131313 at ges dot redhat dot com>, gdb at sources dot redhat dot com
- Date: Thu, 15 Aug 2002 21:15:18 -0400
- Subject: Re: Issue an internal warning on first deprecated function call
- References: <3D5C248D.4030003@ges.redhat.com> <1020815223303.ZM7495@localhost.localdomain>
On Thu, Aug 15, 2002 at 03:33:03PM -0700, Kevin Buettner wrote:
> On Aug 15, 6:00pm, Andrew Cagney wrote:
>
> > The problem behind this was discussed in:
> > http://sources.redhat.com/ml/gdb/2001-03/msg00227.html
> >
> > The idea is to issue an internal-warning on the first call to a
> > deprecated [multi-arch] function.
> >
> > The intent is to better alert the user to the possability that their GDB
> > is on its last legs.
> >
> > Thoughts? Variations on the idea?
>
> I think we should strive to just fix (eliminate) the calls to
> deprecated functions instead. However, there are times when it's too
> hard or can't be sufficiently tested.
>
> A variation on the above idea is to scan a newly created gdbarch
> struct to see if any deprecated functions are being used. If so,
> print only one message per session. (I.e, instead of seeing N
> messages from N deprecated function, you'd only see one message for
> the whole lot.) The nuisance factor could be cut back even further if
> we arrange for .gdbinit setting which can be used to disable such
> messages.
>
> This variation will also cause the message to be printed at a more
> predictable time, probably either at startup or just after a ``file''
> operation.
I definitely like this idea.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer