aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorDmitry Kozlov <ddk@sourceware.org>2013-06-26 15:14:39 +0000
committerDmitry Kozlov <ddk@sourceware.org>2013-06-26 15:14:39 +0000
commitf30aa5affef01c27955e33d8e05960c58e9b8a66 (patch)
tree2d717ad23a3d9d075da462a4eeedc49c3b630911 /gdb/tracepoint.c
parent1aee363c16e15b48e09ddb17f7aa4d007f80fbe7 (diff)
downloadgdb-f30aa5affef01c27955e33d8e05960c58e9b8a66.zip
gdb-f30aa5affef01c27955e33d8e05960c58e9b8a66.tar.gz
gdb-f30aa5affef01c27955e33d8e05960c58e9b8a66.tar.bz2
Fix trace-status to output proper start-time and stop-time.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 4277843..67735bc 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -2125,20 +2125,20 @@ trace_status_command (char *args, int from_tty)
/* Reporting a run time is more readable than two long numbers. */
printf_filtered (_("Trace started at %ld.%06ld secs, stopped %ld.%06ld secs later.\n"),
- (long int) ts->start_time / 1000000,
- (long int) ts->start_time % 1000000,
- (long int) run_time / 1000000,
- (long int) run_time % 1000000);
+ (long int) (ts->start_time / 1000000),
+ (long int) (ts->start_time % 1000000),
+ (long int) (run_time / 1000000),
+ (long int) (run_time % 1000000));
}
else
printf_filtered (_("Trace started at %ld.%06ld secs.\n"),
- (long int) ts->start_time / 1000000,
- (long int) ts->start_time % 1000000);
+ (long int) (ts->start_time / 1000000),
+ (long int) (ts->start_time % 1000000));
}
else if (ts->stop_time)
printf_filtered (_("Trace stopped at %ld.%06ld secs.\n"),
- (long int) ts->stop_time / 1000000,
- (long int) ts->stop_time % 1000000);
+ (long int) (ts->stop_time / 1000000),
+ (long int) (ts->stop_time % 1000000));
/* Now report any per-tracepoint status available. */
tp_vec = all_tracepoints ();
@@ -2256,12 +2256,12 @@ trace_status_mi (int on_stop)
char buf[100];
xsnprintf (buf, sizeof buf, "%ld.%06ld",
- (long int) ts->start_time / 1000000,
- (long int) ts->start_time % 1000000);
+ (long int) (ts->start_time / 1000000),
+ (long int) (ts->start_time % 1000000));
ui_out_field_string (uiout, "start-time", buf);
xsnprintf (buf, sizeof buf, "%ld.%06ld",
- (long int) ts->stop_time / 1000000,
- (long int) ts->stop_time % 1000000);
+ (long int) (ts->stop_time / 1000000),
+ (long int) (ts->stop_time % 1000000));
ui_out_field_string (uiout, "stop-time", buf);
}
}