This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Expand "info record"
On Tuesday 20 October 2009 20:44:16, Michael Snyder wrote:
> + ?unsigned long long insn_num;
ULONGEST
> + (p != NULL) && (p->type != record_end);
Superfluous parens.
> + printf_filtered (_("Lowest recorded instruction number is %llu.\n"),
> + p->u.end.insn_num);
pulongest
> + /* Display instruction number for last instruction in the log. */
> + printf_filtered (_("Highest recorded instruction number is %llu.\n"),
> + record_insn_count ? record_insn_count - 1 : 0);
Why the conditional subtraction?
Given this post inc:
> + rec->u.end.insn_num = record_insn_count++;
The subtraction looks suspicious.
Could you add a comment to record_insn_num and
record_insn_count's definitions explaining what they are and
how they're different, if it doesn't become obvious?
--
Pedro Alves