From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2356 invoked by alias); 14 Nov 2001 08:50:10 -0000 Mailing-List: contact gdb-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 2143 invoked from network); 14 Nov 2001 08:49:58 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sourceware.cygnus.com with SMTP; 14 Nov 2001 08:49:58 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id CE0353D6C; Wed, 14 Nov 2001 03:49:54 -0500 (EST) Message-ID: <3BF23030.4070201@cygnus.com> Date: Fri, 02 Nov 2001 23:08:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: Alan Modra Cc: binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: objdump -M for x86 References: <20011114134429.G6922@bubble.sa.bigpond.net.au> <3BF200F9.4070601@cygnus.com> <20011114174350.K6922@bubble.sa.bigpond.net.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00044.txt.bz2 > > Actually, I was meaning that you don't need to call print_insn_i386_att > or ..._intel; Just call print_insn_i386 with info->mach set. Hmm, I didn't see that .... > mode_64bit = (info->mach == bfd_mach_x86_64_intel_syntax > || info->mach == bfd_mach_x86_64); > > + if (intel_syntax == -1) > + intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax > + || info->mach == bfd_mach_x86_64_intel_syntax); > + See my other e-mail. I can't find anything that sets ->mach to .._intel_syntax so, apart from backward compatibility, I can't think of a reason to hang on to those ``machine'' variants. I don't expect GDB to start using them again. >> Next problem ... If I understand things correctly, the set of possible >> options, for a given ISA family, is finite. Could that finite list be >> made available via a published interface? > > > Yes, good idea. Something like: > > const char **opcodes_disasm_options (enum bfd_architecture arch) > > returning a malloc'd list of strings for the given arch? (if gdb is going to freeargv() it then I don't think you want the const). Yes, anything like that. Could add it to bfd_arch_info_type, or .... What ever BINUTILS is comfortable with I guess. We'll need to do things like pin down the semantics. Which really means agree on what something like ``x86-64 i386 i8086 intel att addr16 addr32 data32 data16 suffix'' actually means, and ensure that GDB doesn't find it has accepted a set of options only to find them later rejected by the disasssembler. (May one day need to add pre-parsed disassembler-options to the disassemble_info due to the overhead of constant re-parsing. However, cross that bridge when someone notices a real problem :-) Andrew