aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/record-btrace.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c84ae2d..421c62a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
+ * record-btrace.c (btrace_call_history_insn_range): Print
+ insn range as [begin, end].
+
+2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
+
* btrace.h (struct btrace_func_link): New.
(enum btrace_function_flag): New.
(struct btrace_inst): Rename to ...
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 5bdab8d..95d7069 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -424,10 +424,13 @@ static void
btrace_call_history_insn_range (struct ui_out *uiout,
const struct btrace_function *bfun)
{
- unsigned int begin, end;
+ unsigned int begin, end, size;
+
+ size = VEC_length (btrace_insn_s, bfun->insn);
+ gdb_assert (size > 0);
begin = bfun->insn_offset;
- end = begin + VEC_length (btrace_insn_s, bfun->insn);
+ end = begin + size - 1;
ui_out_field_uint (uiout, "insn begin", begin);
ui_out_text (uiout, "-");