This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch v4 09/24] btrace: add replay position to btrace thread info
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 10 Sep 2013 13:24:15 +0000
- Subject: RE: [patch v4 09/24] btrace: add replay position to btrace thread info
- Authentication-results: sourceware.org; auth=none
- References: <1372842874-28951-1-git-send-email-markus dot t dot metzger at intel dot com> <1372842874-28951-10-git-send-email-markus dot t dot metzger at intel dot com> <20130818190704 dot GG24153 at host2 dot jankratochvil dot net>
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Sunday, August 18, 2013 9:07 PM
Thanks for your review.
> > + if (size < 0)
> > + {
> > + /* We want the current position covered, as well. */
> > + covered = btrace_insn_next (&end, 1);
> > + covered += btrace_insn_prev (&begin, context - covered);
> > + covered += btrace_insn_next (&end, context - covered);
> > + }
> > + else
> > + {
> > + covered = btrace_insn_next (&end, context);
> > + covered += btrace_insn_prev (&begin, context - covered);
> > + }
>
> These two COVERED calculations do not seem right to me, pointer is moving
> NEXT and PREV so the directions should be both added and subtracted.
context = abs (size).
Both iterator functions return the number of instructions they moved into
the respective direction.
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052