From: Andrew Cagney <ac131313@ges.redhat.com>
To: Simon Posnjak <simon.posnjak@siol.net>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] set osabi command
Date: Mon, 19 Aug 2002 15:31:00 -0000 [thread overview]
Message-ID: <3D6171DA.7000100@ges.redhat.com> (raw)
In-Reply-To: <1029446386.30623.13.camel@klada.dyndns.org>
> Hi,
>
> This patch adds a set osabi <which> command that it used to override the
> automatic osabi detection. This is needed for some libary that don't
> provide the .note.ABI-tag and the auto detection fails.
Thanks! While the command works, I think it can be improved upon.
Have a look at the existing ``set architecture'' command. For instance:
(gdb) set debug architecture 1
(gdb) set architecture <tab>
... a list of architectures ...
(gdb) set architecture <choose-one>
... gdb will immediatly change architecture updating everthing ...
(gdb) set architecture <rubbish>
... and error message should appear and the architecture doesn't change ...
(gdb) set architecture auto
... gdb's architecture is determined by the target ...
I think a ``set osabi'' command should be similar in that it always and
immediatly has an effect.
It gets complex though because the user could enter a sequence like:
(gdb) set architecture arm
... architecture forced to arm ...
(gdb) set osabi arm_eabi_v1
... osabi forced to arm_eabi_v1
(gdb) set architecture mips
... architecture forced to mips, what should happen to the OSABI? It
can't remain arm_eabi_v1 ...
Idea's?
> +static char *osabi_set_val = NULL;
> +
> +enum gdb_osabi
> +gdbarch_osabi_var_set ()
> +{
FYI, it is important that the OSABI not be hardwired in this way.
> + if (strcmp(osabi_set_val, "SVR4") == 0)
> + return GDB_OSABI_SVR4;
> + c = add_set_cmd ("osabi", class_support, var_string,
> + (char *) &osabi_set_val, "Set the osabi. Posible targets are: linux,
> + hurd, irix, freebsd_aout, freebsd_elf, netbsd_aout, netbsd_aout,
> + netbsd_elf, OSF1, SVR4, solaris, wince, netware, go32, arm_apcs,
> + arm_eabi_v1, arm_eabi_v2, lynxos", &setlist);
> + add_show_from_set (c, &showlist);
> + set_cmd_completer (c, filename_completer);
> +
Have a look at the add_set_enum() command.
Andrew
next prev parent reply other threads:[~2002-08-19 22:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-15 14:19 Simon Posnjak
2002-08-19 15:31 ` Andrew Cagney [this message]
2002-08-19 15:40 ` Jason R Thorpe
2002-08-19 16:09 ` Andrew Cagney
2002-08-19 16:19 ` Jason R Thorpe
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=3D6171DA.7000100@ges.redhat.com \
--to=ac131313@ges.redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=simon.posnjak@siol.net \
/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