]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add sim_do_commandf - printf version of sim_do_command.
authorAndrew Cagney <cagney@redhat.com>
Fri, 5 Sep 1997 07:57:27 +0000 (07:57 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 5 Sep 1997 07:57:27 +0000 (07:57 +0000)
sim/common/ChangeLog
sim/common/sim-utils.c

index a998bc3062e072686e8aaab0b38138ceec6b4f42..3718b6a95bba9f9ee02d7dbafd5ab2005bda0004 100644 (file)
@@ -1,5 +1,10 @@
 Fri Sep  5 08:39:02 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
+       * sim-utils.c (sim_do_commandf): New function, printf version of
+       sim_do_command.
+
+       * sim-basics.h (asprintf, vasprintf): Hack, define for CYGWIN32. 
+       
        * sim-alu.h (ALU64_ADD): Use explicit MSEXTRACTED64, do not assume
        bit endianness.
        (SIGNED64, UNSIGNED64): Delete.
index 6a7c5baf6d9b4c2bdd5ac02352768813d3b101f4..c628fd447a058f0c9f52e232474dd37dc7ed2d6c 100644 (file)
@@ -221,3 +221,20 @@ sim_elapsed_time_since (start)
 #endif
 #endif
 }
+
+
+
+/* do_command but with printf style formatting of the arguments */
+void
+sim_do_commandf (SIM_DESC sd,
+                const char *fmt,
+                ...)
+{
+  va_list ap;
+  char *buf;
+  va_start (ap, fmt);
+  vasprintf (&buf, fmt, ap);
+  sim_do_command (sd, buf);
+  va_end (ap);
+  free (buf);
+}