This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Issue an internal warning on first deprecated function call


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.

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]