New commands `set architecture'', show architecture'' and `info

architecture''.  Update SH target to use new target_architecture_hook.
This commit is contained in:
Andrew Cagney
1997-08-28 10:20:21 +00:00
parent f40d28bfc0
commit d0aba53f38
8 changed files with 348 additions and 205 deletions

View File

@@ -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)
{