This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch v6 02/12] cli, btrace: add btrace cli
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Monday, December 17, 2012 7:32 PM
Thanks for your review.
[...]
> > + if (trace->end < trace->begin)
> > + warning (_("Bad trace: %s - %s"), paddress (gdbarch, trace->begin),
> > + paddress (gdbarch, trace->end));
>
> Shouldn't this be rather gdb_assert? How to create such case?
I have not seen such a case, yet. This would indicate some corrupted trace buffer or problems reading the trace data correctly. It should normally not happen.
I didn't use gdb_assert since this is not checking gdb's internal state. Gdb would still function correctly even if we saw such unexpected trace.
I'm OK to change it to gdb_assert, if you want.
> No need for a repost wrt the changes above.
Does that mean you approve the patch?
Thanks,
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