This is the mail archive of the gdb-patches@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: [patch/testsuite] revert return-type of gdb_file_cmd, gdb_load


Andrew Cagney <cagney@gnu.org> wrote:
> What of two interfaces -> an existing one with preserved behavior and a 
> new one with extended behavior?

In a way, that's what we have now.  The "extended behavior" is to set
the global variable gdb_file_cmd_debug_info.

The problem with "two interfaces" is that there really are nine
different procedures named gdb_load, and the caller does not know
which of the nine procedures is active.  So the new interface has
to be compatible with the old, or I have to change nine implementations
of "gdb_load" simultaneously.

Also, if gdb.gdb/*.exp runs in an environment where the implementation of
gdb_load does not provide this extended behavior, then it will
see that gdb_file_cmd_debug_info is still set to "unset" and it can
react appropriately.  From inspection, I believe the only gdb_load
that will *not* get the extended behavior is the stubby
"not implemented yet" implementation in config/nind.exp.

Michael


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