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


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.

I like the 'once per session' idea.
Can we make the that message a rather largish banner?
My intent is for it to use ``internal-warning'' which means it will look something like this:

(gdb) maint internal-error
/home/scratch/GDB/src/gdb/maint.c:121: gdb-internal-error: internal maintenance
An internal GDB error was detected. This may make further
debugging unreliable. Quit this debugging session? (y or n) n

Create a core file containing the current state of GDB? (y or n) n
(gdb)

s/error/warning/

Since the user is going to need to interact with this, they will get very annoyed with it pretty quick. This is why I'm also proposing another command for gaging it :-)

I think ``internal-warning'' is correct since there is a very very good chance that the deprecated interface will have been [unintentionally] broken by the introduction of the new mechanisms.

Andrew



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