[patch v4 09/24] btrace: add replay position to btrace thread info
Metzger, Markus T
markus.t.metzger@intel.com
Tue Sep 10 13:24:00 GMT 2013
> -----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
More information about the Gdb-patches
mailing list