diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-08-28 10:20:21 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-08-28 10:20:21 +0000 |
commit | d0aba53f38a67ebccc29d691e878ff324bd4de14 (patch) | |
tree | c6bd2dea594fb2e5968c2f7606b2b4c0f02b11a4 /gdb/remote-sim.c | |
parent | f40d28bfc07c793f413cf7523a1f93385f546d95 (diff) | |
download | gdb-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.c | 13 |
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) { |