Issue an internal warning on first deprecated function call
Daniel Jacobowitz
drow@mvista.com
Thu Aug 15 18:14:00 GMT 2002
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
More information about the Gdb
mailing list