aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/sim_calls.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-10-02 18:19:17 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-10-02 18:19:17 +0000
commit83d96c6e3ef740fa40558b4a12bfa832838fcc8e (patch)
treeb1c803117e0de74519082309450efb600f3a5a37 /sim/ppc/sim_calls.c
parent3d7c42c988b599c12302a1d5786be79b7097248e (diff)
downloadgdb-83d96c6e3ef740fa40558b4a12bfa832838fcc8e.zip
gdb-83d96c6e3ef740fa40558b4a12bfa832838fcc8e.tar.gz
gdb-83d96c6e3ef740fa40558b4a12bfa832838fcc8e.tar.bz2
Add support to count the number of instructions issued.
Diffstat (limited to 'sim/ppc/sim_calls.c')
-rw-r--r--sim/ppc/sim_calls.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 542267c..44ab5b7 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -40,6 +40,7 @@
static psim *simulator;
static int nr_cpus;
static char *register_names[] = REGISTER_NAMES;
+static int print_info = 0;
void
sim_open (char *args)
@@ -65,7 +66,7 @@ sim_open (char *args)
while (*++p != '\0') {
switch (*p) {
default:
- error ("Usage: target sim [ -a -p -c -C -s -i -t ]\n");
+ error ("Usage: target sim [ -a -p -c -C -s -i -I -t ]\n");
break;
case 'a':
for (i = 0; i < nr_trace; i++)
@@ -86,6 +87,9 @@ sim_open (char *args)
case 'i':
trace[trace_icu_device] = 1;
break;
+ case 'I':
+ print_info = 1;
+ break;
case 't':
trace[trace_device_tree] = 1;
break;
@@ -107,6 +111,9 @@ void
sim_close (int quitting)
{
TRACE(trace_gdb, ("sim_close(quitting=%d) called\n", quitting));
+ if (print_info)
+ psim_print_info (simulator, 1);
+
/* nothing to do */
}
@@ -187,8 +194,7 @@ void
sim_info (int verbose)
{
TRACE(trace_gdb, ("sim_info(verbose=%d) called\n", verbose));
- TRACE(trace_tbd, ("sim_info(verbose=%d) should do something\n"));
- /* FIXME: */
+ psim_print_info (simulator, verbose);
}