This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Re: RFA: [gdb/gdbarch.c] (set_architecture_from_file) Fix undue warning


Fernando Nasser wrote:
> 
> When target_architecture_auto is not set (case in which whatever is
> the exec file architecture will be used) GDB tests for compatibility
> between the file being loaded and the architecture manually set by
> the user.
> 
> I believe gdb should trust the architecture supplied method and only
> issue the warning when compatible returns false (i.e. NULL).
> 
> The compatible() function also (theoretically) returns the minimal common
> denominator between the file "mach" and the "mach" in the user specified
> architecture (assuming "arch" is the same).  This could be used to decide
> what architecture to se (between the two).  But here we are only testing
> if it is compatible or not, as architecture was set manually.
> All we need is a yes/no answer: Is it compatible?
> 
> The patch is attached.
> 
> P.S.: Command line users are not bothered much by this warning, although it
> sounds scary.  The GUI users are really pested by it as Insight memorizes the
> user preference for architecture/disassembly-flavor and warnings come in
> pop-up windows that has to be dismissed.

I think there should still be a warning if the architecture in the file
isn't a common demonator to the architecture specified by the user. 
Perhaphs the warning shouldn't be reported everytime but it should be
reported.

	Andrew

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