This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFA: [gdb/gdbarch.c] (set_architecture_from_file) Fix undue warning
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: RFA: [gdb/gdbarch.c] (set_architecture_from_file) Fix undue warning
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 24 Jun 2000 11:25:23 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <3953B465.1ABB85A7@cygnus.com>
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