Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Alan Modra <amodra@bigpond.net.au>
Cc: binutils@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: objdump -M for x86
Date: Fri, 02 Nov 2001 12:10:00 -0000	[thread overview]
Message-ID: <3BF200F9.4070601@cygnus.com> (raw)
In-Reply-To: <20011114134429.G6922@bubble.sa.bigpond.net.au>

> Applying to mainline.  Note to gdb people: Some backwards compatibility
> stuff can be removed when i386-tdep.c and x86-64-tdep are updated to use
> the new (old!) print_insn_i386.
> 
> binutils/ChangeLog
> 	* doc/binutils.texi (objdump): Document x86 -M options.
> include/ChangeLog
>  	* dis-asm.h (print_insn_i386): Declare.
> opcodes/ChangeLog
> 	* disassemble.c (disassembler): Call print_insn_i386.
> 	* i386-dis.c (SUFFIX_ALWAYS): Define.
> 	(struct dis_private): Add orig_sizeflag.
> 	(print_insn_i386): Make it a wrapper, calling..
> 	(print_insn): ..The old body of print_insn_i386.  Avoid longjmp
> 	warning without using volatile by moving orig_sizeflag to priv,
> 	and removing inbuf.  Parse disassembler_options.
> 	(print_insn_i386_att, print_insn_i386_intel): Move initialisation
> 	code to print_insn.
> 	(putop): Remove #ifdef SUFFIX_ALWAYS.
> 

Hmm, I was wondering what you were talking about until I found this:

> +  for (p = info->disassembler_options; p != NULL; )
> +    {
> +      if (strncmp (p, "x86_64", 6) == 0)
> +	{
> +	  mode_64bit = 1;
> +	  priv.orig_sizeflag = AFLAG | DFLAG;
> +	}
> +      else if (strncmp (p, "i386", 4) == 0)
> +	{
> +	  mode_64bit = 0;
> +	  priv.orig_sizeflag = AFLAG | DFLAG;
> +	}
> +      else if (strncmp (p, "i8086", 5) == 0)
> +	{
> +	  mode_64bit = 0;
> +	  priv.orig_sizeflag = 0;
> +	}
> +      else if (strncmp (p, "intel", 5) == 0)
> +	{
> +	  intel_syntax = 1;
> +	}
> +      else if (strncmp (p, "att", 3) == 0)
> +	{
> +	  intel_syntax = 0;
> +	}
> 

(x86-64?)

Thanks!

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?  That way GDB could 
incorporate them into its CLI so that things like ``set 
disassembly-options <tab>'' worked.

To get the feel for what I'm talking about check gdb/arm-tdep.c which 
queries opcodes for the ARM register naming conventions.

enjoy,
Andrew



       reply	other threads:[~2001-11-14  5:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20011114134429.G6922@bubble.sa.bigpond.net.au>
2001-11-02 12:10 ` Andrew Cagney [this message]
2001-11-02 15:12   ` Alan Modra
2001-11-02 23:08     ` Andrew Cagney
2001-11-03  1:01       ` Alan Modra
2001-11-27 22:37         ` Andrew Cagney
2001-11-18 12:47           ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BF200F9.4070601@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox