mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-29 06:50:32 +00:00
Add sim_do_commandf - printf version of sim_do_command.
This commit is contained in:
parent
6fea47635b
commit
1b465b54e1
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user