This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [rfc] btrace: change record instruction-history /m
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 17 Aug 2015 07:23:06 +0000
- Subject: RE: [rfc] btrace: change record instruction-history /m
- Authentication-results: sourceware.org; auth=none
- References: <1439552272-6256-1-git-send-email-markus dot t dot metzger at intel dot com> <CADPb22R4MY9rv62NmVvJ6=0064TW7nC=ghoChqHJ4Hs7aCkXrQ at mail dot gmail dot com>
> -----Original Message-----
> From: Doug Evans [mailto:dje@google.com]
> Sent: Friday, August 14, 2015 7:02 PM
> To: Metzger, Markus T
> Cc: Pedro Alves; gdb-patches
> Subject: Re: [rfc] btrace: change record instruction-history /m
> > Alternatively, we could extend Doug Evan's new algorithm
> > https://sourceware.org/ml/gdb-patches/2015-08/msg00335.html to take a
> vector
> > of PCs.
> >
> > 2015-08-14 Markus Metzger <markus.t.metzger@intel.com>
> >
> > gdb/
> > * record-btrace.c (struct btrace_line_range): New.
> > (btrace_mk_line_range, btrace_line_range_add)
> > (btrace_line_range_is_empty, btrace_line_range_contains_range)
> > (btrace_find_line_range, btrace_print_lines): New.
> > (btrace_insn_history): Add source interleaving algorithm.
>
> Yeah, I'd like to avoid having multiple copies of code
> doing basically the same thing.
> Plus, no one is going to look in record-btrace.c for
> "smart disassembly support".
> disasm.c should be providing the necessary API
> that the rest of gdb an use.
OK, I'll look into it. I have a few other things to do first.
I wouldn't get too fancy, though, and simply replace the low/high
PC pair with a vector of PCs. We may have a small wrapper that
generates the vector out of a low/high pair to keep the original
API.
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928