From: Andreas Jaeger <aj@suse.de>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Jiri Smid <smid@suse.cz>, gdb-patches@sources.redhat.com
Subject: i386 flavors [Was: Re: Misc; Was: [RFA]: x86_64 target files]
Date: Fri, 31 Aug 2001 02:00:00 -0000 [thread overview]
Message-ID: <u8elpsr4dp.fsf_-_@gromit.moeb> (raw)
In-Reply-To: <u866b4so44.fsf@gromit.moeb>
Here's a proposal for an implementation - it's similar to the arm way
of doing it.
I would additionally export print_insn_i386 and then gdb would use
that call. i386-tdep.c and x86-64-tdep.c would need to use the new
interface, I can send patches if we like to go this way.
Mark, as i386 maintainer, what do you think?
Andreas
typedef struct
{
const char *name;
const char *description;
}
i386_flavor;
static i386_flavor i386_flavors [] =
{
{ "att", "Select ATT syntax."},
{ "intel", "Select Intel syntax."}
};
enum {ATT_FLAVOR, INTEL_FLAVOR};
static int current_i386_flavor;
int
get_i386_num_flavors (void)
{
return sizeof (i386_flavors) / sizeof (i386_flavor);
}
int
set_i386_flavor (int flavor);
{
int old = current_i386_flavor;
current_i386_flavor = flavor;
switch (flavor)
{
case ATT_FLAVOR:
intel_syntax = 0;
open_char = '(';
close_char = ')';
separator_char = ',';
scale_char = ',';
break;
case INTEL_FLAVOR:
intel_syntax = 1;
open_char = '[';
close_char = ']';
separator_char = '+';
scale_char = '*';
break;
default:
abort ();
}
return old;
}
void
get_i386_flavor (int flavor, const char **name, const char **description)
{
*name = i386_flavors [flavor].name;
*description = i386_flavors [flavor].description;
}
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
next prev parent reply other threads:[~2001-08-31 2:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-02 7:20 [RFA]: x86_64 target files Jiri Smid
2001-08-02 8:39 ` Eli Zaretskii
2001-08-02 9:37 ` Andreas Jaeger
2001-08-02 9:43 ` Kevin Buettner
2001-08-09 22:53 ` Andrew Cagney
2001-08-09 23:12 ` config/i386/xm-x86_64.h; Was " Andrew Cagney
2001-08-09 23:25 ` configure.host; Was: " Andrew Cagney
2001-08-09 23:41 ` configure.tgt; " Andrew Cagney
2001-08-09 23:57 ` Misc; " Andrew Cagney
2001-08-30 1:35 ` Jiri Smid
2001-08-30 7:39 ` Andrew Cagney
2001-08-30 11:03 ` Andreas Jaeger
2001-08-30 16:53 ` Andrew Cagney
2001-08-31 0:13 ` Andreas Jaeger
2001-08-31 2:00 ` Andreas Jaeger [this message]
2001-08-31 10:39 ` Andrew Cagney
2001-08-31 13:12 ` Andreas Jaeger
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=u8elpsr4dp.fsf_-_@gromit.moeb \
--to=aj@suse.de \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=smid@suse.cz \
/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