[RFA] Expand "info record"
Michael Snyder
msnyder@vmware.com
Tue Oct 20 22:31:00 GMT 2009
Pedro Alves wrote:
> 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
OK to all.
>> + /* 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?
Because I don't want it to say "-1".
> Given this post inc:
>> + rec->u.end.insn_num = record_insn_count++;
No, the post inc implies that the count is actually one greater
than the last insn that used it. Yes?
> 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?
Yep, done, see attached.
Thanks!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: info2.txt
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20091020/63e85c3b/attachment.txt>
More information about the Gdb-patches
mailing list