aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-08-28 10:20:21 +0000
committerAndrew Cagney <cagney@redhat.com>1997-08-28 10:20:21 +0000
commitd0aba53f38a67ebccc29d691e878ff324bd4de14 (patch)
treec6bd2dea594fb2e5968c2f7606b2b4c0f02b11a4 /gdb/remote-sim.c
parentf40d28bfc07c793f413cf7523a1f93385f546d95 (diff)
downloadgdb-d0aba53f38a67ebccc29d691e878ff324bd4de14.zip
gdb-d0aba53f38a67ebccc29d691e878ff324bd4de14.tar.gz
gdb-d0aba53f38a67ebccc29d691e878ff324bd4de14.tar.bz2
New commands ``set architecture'', ``show architecture'' and ``info
architecture''. Update SH target to use new target_architecture_hook.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 71a73d3..49e573f 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -504,7 +504,11 @@ gdbsim_open (args, from_tty)
if (gdbsim_desc != NULL)
unpush_target (&gdbsim_ops);
- len = 7 + 1 + (args ? strlen (args) : 0) + 50;
+ len = (7 + 1 /* gdbsim */
+ + strlen (" -E little")
+ + strlen (" --arch=xxxxxxxxxx")
+ + (args ? strlen (args) : 0)
+ + 50) /* slack */;
arg_buf = (char *) alloca (len);
strcpy (arg_buf, "gdbsim"); /* 7 */
/* Specify the byte order for the target when it is both selectable
@@ -525,6 +529,13 @@ gdbsim_open (args, from_tty)
}
}
#endif
+ /* Specify the architecture of the target when it has been
+ explicitly specified */
+ if (!target_architecture_auto)
+ {
+ strcat (arg_buf, " --arch=");
+ strcat (arg_buf, target_architecture->printable_name);
+ }
/* finally, any explicit args */
if (args)
{