This is the mail archive of the
mailing list for the GDB project.
Re: ``set disassembly-flavour'' vs ``set architecture'' for i386
- To: Jim Ingham <jingham at apple dot com>
- Subject: Re: ``set disassembly-flavour'' vs ``set architecture'' for i386
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 08 Nov 2001 14:11:21 -0500
- Cc: gdb at sources dot redhat dot com
- References: <5813D5A8-D479-11D5-B0DD-000393540DDC@apple.com>
> Note that this command works both on x86 and on arm, so you have to check both if you are doing anything to it. However, it is not implemented for other architectures - which is formally incorrect, though these are the only two that have more than one flavor, so it hasn't mattered up to now.
> I am not sure how far the "set architecture" goes here, but theoretically set architecture and set disassembly-flavor are not wholly independent. The way it should really work is that each architecture should have a list of disassembly flavors. Then when you switch architectures, you should check the disassembly flavor list. If the current flavor exists in the list for the new architecture then the flavor should not be changed. Otherwise, you should switch it to whatever the default for the new architecture is. If you switched, for instance, from i586 to arm, you would have to choose a new disassembly-flavor, since there are more than one flavor in each set, and they are non-overlapping.
Yes this is true and it is a user interface problem that hasn't really
being resolved. Some possabilities are:
detect a change in the current architecture (frame, target) and update
its self accordingly.
set <arch> disassembly-flavour
so that it is clear that it is only being applied to <arch>. Yet
set architecture <blah> [ <disassembly-flavour> ]