This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch v3 00/23] record-btrace: reverse
- From: Markus Metzger <markus dot t dot metzger at intel dot com>
- To: jan dot kratochvil at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Jun 2013 10:04:33 +0200
- Subject: [patch v3 00/23] record-btrace: reverse
This is a PING for v2 of the series. I meanwhile extended it to add
reverse support on top, so I call the entire series v3.
This patch series adds support for the "record goto" command and for
reverse execution to the btrace record target.
Since btrace only records the control flow, reverse execution is limited
to modifying the PC register. It does not support evaluating variables.
We do support the "backtrace" command, though. The back trace is computed
from the control-flow trace rather than by unwinding stack frames.
There are a number of opens wrt unwinding and reverse execution. The
opens are listed in the commit messages of the respective patches towards
the end of the series. This makes the series more an RFC than a real
PATCH series, I suppose.
It also changes the existing "record function-call-history" and "record
instruction-history" commands slightly and fixes PR/15240. The "record
function-call-history" command can now show the call relationship like this:
(gdb) record function-call-history /cli
12 fib inst 101,111 at src/fib.c:3,7
13 fib inst 112,124 at src/fib.c:3,8
14 fib inst 125,129 at src/fib.c:7
15 fib inst 130,142 at src/fib.c:3,8
16 fib inst 143,147 at src/fib.c:7,8
17 fib inst 148,152 at src/fib.c:7,8
18 fib inst 153,157 at src/fib.c:7
19 fib inst 158,168 at src/fib.c:3,7
20 fib inst 169,179 at src/fib.c:3,7
21 fib inst 180,185 at src/fib.c:3,4
Markus Metzger (23):
gdbarch: add instruction predicate methods
record: upcase record_print_flag enumeration constants
btrace: change branch trace data structure
record-btrace: fix insn range in function call history
record-btrace: start counting at one
btrace: increase buffer size
record-btrace: optionally indent function call history
record-btrace: make ranges include begin and end
btrace: add replay position to btrace thread info
target: add ops parameter to to_prepare_to_store method
record-btrace: supply register target methods
frame, backtrace: allow targets to supply a frame unwinder
record-btrace, frame: supply target-specific unwinder
record-btrace: provide xfer_partial target method
record-btrace: add to_wait and to_resume target methods.
record-btrace: provide target_find_new_threads method
record-btrace: add record goto target methods
record-btrace: extend unwinder
btrace, linux: fix memory leak when reading branch trace
btrace, gdbserver: read branch trace incrementally
record-btrace: show trace from enable location
record-btrace: add (reverse-)stepping support
record-btrace: skip tail calls in back trace
gdb/NEWS | 18 +
gdb/amd64-tdep.c | 67 +
gdb/arch-utils.c | 15 +
gdb/arch-utils.h | 4 +
gdb/btrace.c | 1370 +++++++++++++++++---
gdb/btrace.h | 262 ++++-
gdb/common/btrace-common.h | 6 +-
gdb/common/linux-btrace.c | 110 ++-
gdb/common/linux-btrace.h | 5 +-
gdb/doc/gdb.texinfo | 30 +-
gdb/dwarf2-frame.c | 8 +-
gdb/frame-unwind.c | 80 +-
gdb/frame.c | 47 +-
gdb/frame.h | 8 +-
gdb/gdbarch.c | 105 ++
gdb/gdbarch.h | 24 +
gdb/gdbarch.sh | 9 +
gdb/gdbserver/linux-low.c | 18 +-
gdb/gdbserver/server.c | 11 +-
gdb/gdbserver/target.h | 6 +-
gdb/i386-tdep.c | 59 +
gdb/inf-child.c | 2 +-
gdb/monitor.c | 2 +-
gdb/ravenscar-thread.c | 7 +-
gdb/record-btrace.c | 1347 +++++++++++++++++---
gdb/record-full.c | 3 +-
gdb/record.c | 8 +-
gdb/record.h | 7 +-
gdb/remote-m32r-sdi.c | 2 +-
gdb/remote-mips.c | 5 +-
gdb/remote.c | 28 +-
gdb/target.c | 51 +-
gdb/target.h | 26 +-
gdb/testsuite/gdb.btrace/Makefile.in | 3 +-
gdb/testsuite/gdb.btrace/delta.exp | 76 ++
gdb/testsuite/gdb.btrace/exception.cc | 56 +
gdb/testsuite/gdb.btrace/exception.exp | 67 +
gdb/testsuite/gdb.btrace/finish.exp | 70 +
gdb/testsuite/gdb.btrace/function_call_history.exp | 328 +++--
gdb/testsuite/gdb.btrace/instruction_history.exp | 72 +-
gdb/testsuite/gdb.btrace/next.exp | 89 ++
gdb/testsuite/gdb.btrace/nexti.exp | 89 ++
gdb/testsuite/gdb.btrace/record_goto.c | 51 +
gdb/testsuite/gdb.btrace/record_goto.exp | 166 +++
gdb/testsuite/gdb.btrace/step.exp | 113 ++
gdb/testsuite/gdb.btrace/stepi.exp | 114 ++
gdb/testsuite/gdb.btrace/tailcall.exp | 85 ++
gdb/testsuite/gdb.btrace/unknown_functions.c | 45 +
gdb/testsuite/gdb.btrace/unknown_functions.exp | 60 +
gdb/testsuite/gdb.btrace/x86-record_goto.S | 332 +++++
gdb/testsuite/gdb.btrace/x86-tailcall.S | 269 ++++
gdb/testsuite/gdb.btrace/x86-tailcall.c | 39 +
52 files changed, 5166 insertions(+), 708 deletions(-)
create mode 100644 gdb/testsuite/gdb.btrace/delta.exp
create mode 100644 gdb/testsuite/gdb.btrace/exception.cc
create mode 100644 gdb/testsuite/gdb.btrace/exception.exp
create mode 100644 gdb/testsuite/gdb.btrace/finish.exp
create mode 100644 gdb/testsuite/gdb.btrace/next.exp
create mode 100644 gdb/testsuite/gdb.btrace/nexti.exp
create mode 100644 gdb/testsuite/gdb.btrace/record_goto.c
create mode 100644 gdb/testsuite/gdb.btrace/record_goto.exp
create mode 100644 gdb/testsuite/gdb.btrace/step.exp
create mode 100644 gdb/testsuite/gdb.btrace/stepi.exp
create mode 100644 gdb/testsuite/gdb.btrace/tailcall.exp
create mode 100644 gdb/testsuite/gdb.btrace/unknown_functions.c
create mode 100644 gdb/testsuite/gdb.btrace/unknown_functions.exp
create mode 100644 gdb/testsuite/gdb.btrace/x86-record_goto.S
create mode 100644 gdb/testsuite/gdb.btrace/x86-tailcall.S
create mode 100644 gdb/testsuite/gdb.btrace/x86-tailcall.c