1a2e2270fSchristos /* Miscellaneous simulator utilities. 2a2e2270fSchristos 3*88241920Schristos Copyright (C) 2005-2024 Free Software Foundation, Inc. 4a2e2270fSchristos Contributed by Analog Devices, Inc. 5a2e2270fSchristos 6a2e2270fSchristos This file is part of simulators. 7a2e2270fSchristos 8a2e2270fSchristos This program is free software; you can redistribute it and/or modify 9a2e2270fSchristos it under the terms of the GNU General Public License as published by 10a2e2270fSchristos the Free Software Foundation; either version 3 of the License, or 11a2e2270fSchristos (at your option) any later version. 12a2e2270fSchristos 13a2e2270fSchristos This program is distributed in the hope that it will be useful, 14a2e2270fSchristos but WITHOUT ANY WARRANTY; without even the implied warranty of 15a2e2270fSchristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16a2e2270fSchristos GNU General Public License for more details. 17a2e2270fSchristos 18a2e2270fSchristos You should have received a copy of the GNU General Public License 19a2e2270fSchristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 20a2e2270fSchristos 214b169a6bSchristos /* This must come before any other includes. */ 224b169a6bSchristos #include "defs.h" 234b169a6bSchristos 24a2e2270fSchristos #include "sim-main.h" 25a2e2270fSchristos #include "sim-options.h" 26a2e2270fSchristos #include "sim-utils.h" 27a2e2270fSchristos 28a2e2270fSchristos /* Generic implementation of sim_do_command that works with simulators 29a2e2270fSchristos which add custom options via sim_add_option_table(). */ 30a2e2270fSchristos 31a2e2270fSchristos void 32837edd6bSchristos sim_do_command (SIM_DESC sd, const char *cmd) 33a2e2270fSchristos { 34a2e2270fSchristos if (sim_args_command (sd, cmd) != SIM_RC_OK) 35a2e2270fSchristos sim_io_eprintf (sd, "Unknown sim command: \"%s\". Try \"sim help\".\n", 36a2e2270fSchristos cmd); 37a2e2270fSchristos } 38