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

Andrew Cagney ac131313@cygnus.com
Fri Jun 23 18:25:00 GMT 2000


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


More information about the Gdb-patches mailing list