This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. 52834460bc1e8813c8cedd876dac7156b34fa60f
- From: mmetzger at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 16 Jan 2014 12:41:48 -0000
- Subject: gdb and binutils branch master updated. 52834460bc1e8813c8cedd876dac7156b34fa60f
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 52834460bc1e8813c8cedd876dac7156b34fa60f (commit)
via 118e6252ca1cabce6d4480a4f24c53e5456a2cfa (commit)
via 6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d (commit)
via 969c39fbcd6a5675c1f4b97cd23d680e4b5b6487 (commit)
via 0b722aec57e2e54083c1d56657762945ad4604fc (commit)
via 066ce621f46cabb382b31a682501f0de8120c9fc (commit)
via e2887aa34ff4d8d972047e48803ed97b23beb739 (commit)
via b2f4cfdebc3b7feb9572e83570d212f0ef31a78a (commit)
via 633785ff2876e5bf03070a235d3e8cfe94cbf6bd (commit)
via 3db08215d47b576303a8cbaf6195b5f4a3bb9a13 (commit)
via cecac1aba0917b4f87837e3037a84954ac013b5c (commit)
via 824344ca4f9765b5598aed2c11b6f3caf5cc77ba (commit)
via 32261e523447cdecdfffe93807ac9bd0de3fe88d (commit)
via ea001bdce2a4442eb556c64514c8ec2473f4c4d1 (commit)
via 1f3ef5810cab04310a11d4d561a4f32329dfb002 (commit)
via f32dbf8c793020592e09d6aafd5c2ed70ea4f2b1 (commit)
via 07bbe694e779f4953911a50751abdc00117be7d3 (commit)
via 0688d04e19c0e6305c1034eb5e97a66458fd805a (commit)
via 8710b7097e6564969c5e417007a438d8f4ab710e (commit)
via d0fa75352b7ffd586499d28983bff5d714e5211a (commit)
via 5de9129b066591c6ef57829ab9e1c2a030de49af (commit)
via 7acbe13307c209309f1733757b6d5d7a2d9bce9b (commit)
via 23a7fe7580c5625dd19c852faf9a3acb56293207 (commit)
via 8372a7cb96e9d193cb1f85f3fd2c01e38c33a750 (commit)
via c2170eeffa616c51ca4c7ab7142523c04b762603 (commit)
via 864089d2f64c6624aac3f52ece2c31dff6a8f59f (commit)
via ed9edfb5d5edb1dd0b6280ae4acdd9963a12ebe6 (commit)
via 724c7dd8a4520d4020883b4ae3a3f2fa489acb1a (commit)
via 6d78d93b8d3854dcab6c90307b19f43e1a93f592 (commit)
from 93a360cc5d11a18572239b30d5bae63703012086 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=52834460bc1e8813c8cedd876dac7156b34fa60f
commit 52834460bc1e8813c8cedd876dac7156b34fa60f
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon May 6 16:04:46 2013 +0200
record-btrace: add (reverse-)stepping support
Provide to_resume and to_wait target methods for the btrace record target
to allow reverse stepping and replay support.
Replay is limited in the sense that only stepping and source correlation
are supported. We do not record data and thus can not show variables.
Non-stop mode is not working. Do not allow record-btrace in non-stop mode.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* btrace.h (btrace_thread_flag): New.
(struct btrace_thread_info) <flags>: New.
* record-btrace.c (record_btrace_resume_thread)
(record_btrace_find_thread_to_move, btrace_step_no_history)
(btrace_step_stopped, record_btrace_start_replaying)
(record_btrace_step_thread, record_btrace_decr_pc_after_break)
(record_btrace_find_resume_thread): New.
(record_btrace_resume, record_btrace_wait): Extend.
(record_btrace_can_execute_reverse): New.
(record_btrace_open): Fail in non-stop mode.
(record_btrace_set_replay): Split into this, ...
(record_btrace_stop_replaying): ... this, ...
(record_btrace_clear_histories): ... and this.
(init_record_btrace_ops): Init to_can_execute_reverse.
* NEWS: Announce it.
testsuite/
* gdb.btrace/delta.exp: Check reverse stepi.
* gdb.btrace/tailcall.exp: Update. Add stepping tests.
* gdb.btrace/finish.exp: New.
* gdb.btrace/next.exp: New.
* gdb.btrace/nexti.exp: New.
* gdb.btrace/record_goto.c: Add comments.
* gdb.btrace/step.exp: New.
* gdb.btrace/stepi.exp: New.
* gdb.btrace/multi-thread-step.c: New.
* gdb.btrace/multi-thread-step.exp: New.
* gdb.btrace/rn-dl-bind.c: New.
* gdb.btrace/rn-dl-bind.exp: New.
* gdb.btrace/data.c: New.
* gdb.btrace/data.exp: New.
* gdb.btrace/Makefile.in (EXECUTABLES): Add new.
doc/
* gdb.texinfo: Document limited reverse/replay support
for target record-btrace.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=118e6252ca1cabce6d4480a4f24c53e5456a2cfa
commit 118e6252ca1cabce6d4480a4f24c53e5456a2cfa
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Dec 18 11:09:34 2013 +0100
target: allow decr_pc_after_break to be defined by the target
Allow the target to define which value to use in decr_pc_after_break.
It defaults to gdbarch_decr_pc_after_break (GDBARCH).
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* target.h (struct target_ops) <to_decr_pc_after_break>: New.
(forward_target_decr_pc_after_break)
(target_decr_pc_after_break): New.
* target.c (forward_target_decr_pc_after_break)
(target_decr_pc_after_break): New.
* aix-thread.c (aix_thread_wait): Call target_decr_pc_after_break
instead of gdbarch_decr_pc_after_break.
* darwin-nat.c (cancel_breakpoint): Call target_decr_pc_after_break
instead of gdbarch_decr_pc_after_break.
* infrun.c (adjust_pc_after_break): Call target_decr_pc_after_break
instead of gdbarch_decr_pc_after_break.
* linux-nat.c (cancel_breakpoint): Call target_decr_pc_after_break
instead of gdbarch_decr_pc_after_break.
* linux-thread-db.c (check_event): Call target_decr_pc_after_break
instead of gdbarch_decr_pc_after_break.
* record-full.c (record_full_wait_1): Call target_decr_pc_after_break
instead of gdbarch_decr_pc_after_break.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d
commit 6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Tue Sep 10 12:27:14 2013 +0200
record-btrace: show trace from enable location
The btrace record target shows the branch trace from the location of the first
branch destination. This is the first BTS records.
After adding incremental updates, we can now add a dummy record for the current
PC when we enable tracing so we show the trace from the location where branch
tracing has been enabled.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c: Include regcache.h.
(btrace_add_pc): New.
(btrace_enable): Call btrace_add_pc.
(btrace_is_empty): New.
* btrace.h (btrace_is_empty): New.
* record-btrace.c (require_btrace, record_btrace_info): Call
btrace_is_empty.
testsuite/
* gdb.btrace/Makefile.in (EXECUTABLES): Add delta.
* gdb.btrace/exception.exp: Update.
* gdb.btrace/instruction_history.exp: Update.
* gdb.btrace/record_goto.exp: Update.
* gdb.btrace/tailcall.exp: Update.
* gdb.btrace/unknown_functions.exp: Update.
* gdb.btrace/delta.exp: New.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=969c39fbcd6a5675c1f4b97cd23d680e4b5b6487
commit 969c39fbcd6a5675c1f4b97cd23d680e4b5b6487
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Jun 3 15:39:35 2013 +0200
btrace, gdbserver: read branch trace incrementally
Read branch trace data incrementally and extend the current trace rather than
discarding it and reading the entire trace buffer each time.
If the branch trace buffer overflowed, we can't extend the current trace so we
discard it and start anew by reading the entire branch trace buffer.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* common/linux-btrace.c (perf_event_read_bts, linux_read_btrace):
Support delta reads.
(linux_disable_btrace): Change return type.
* common/linux-btrace.h (linux_read_btrace): Change parameters
and return type to allow error reporting. Update users.
(linux_disable_btrace): Change return type. Update users.
* common/btrace-common.h (btrace_read_type) <BTRACE_READ_DELTA>:
New.
(btrace_error): New.
(btrace_block) <begin>: Comment on BEGIN == 0.
* btrace.c (btrace_compute_ftrace): Start from the end of
the current trace.
(btrace_stitch_trace, btrace_clear_history): New.
(btrace_fetch): Read delta trace, return if replaying.
(btrace_clear): Move clear history code to btrace_clear_history.
(parse_xml_btrace): Throw an error if parsing failed.
* target.h (struct target_ops) <to_read_btrace>: Change parameters
and return type to allow error reporting.
(target_read_btrace): Change parameters and return type to allow
error reporting.
* target.c (target_read_btrace): Update.
* remote.c (remote_read_btrace): Support delta reads. Pass
errors on.
* NEWS: Announce it.
gdbserver/
* target.h (target_ops) <read_btrace>: Change parameters and
return type to allow error reporting.
* server.c (handle_qxfer_btrace): Support delta reads. Pass
trace reading errors on.
* linux-low.c (linux_low_read_btrace): Pass trace reading
errors on.
(linux_low_disable_btrace): New.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0b722aec57e2e54083c1d56657762945ad4604fc
commit 0b722aec57e2e54083c1d56657762945ad4604fc
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Mar 27 09:49:47 2013 +0100
record-btrace: extend unwinder
Extend the always failing unwinder to provide the PC based on the call
structure detected in the branch trace.
The unwinder supports normal frames and tailcall frames.
Inline frames are not supported.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record.h (record_btrace_frame_unwind)
(record_btrace_tailcall_frame_unwind): New declarations.
* dwarf2-frame: Include record.h
(dwarf2_frame_cfa): Throw an error for btrace frames.
* record-btrace.c: Include hashtab.h.
(btrace_get_bfun_name): New.
(btrace_call_history): Call btrace_get_bfun_name.
(struct btrace_frame_cache): New.
(bfcache): New.
(bfcache_hash, bfcache_eq, bfcache_new): New.
(btrace_get_frame_function): New.
(record_btrace_frame_unwind_stop_reason): Allow unwinding.
(record_btrace_frame_this_id): Compute own id.
(record_btrace_frame_prev_register): Provide PC, throw_error
for all other registers.
(record_btrace_frame_sniffer): Detect btrace frames.
(record_btrace_tailcall_frame_sniffer): New.
(record_btrace_frame_dealloc_cache): New.
(record_btrace_frame_unwind): Add new functions.
(record_btrace_tailcall_frame_unwind): New.
(_initialize_record_btrace): Allocate cache.
* btrace.c (btrace_clear): Call reinit_frame_cache.
* NEWS: Announce it.
testsuite/
* gdb.btrace/record_goto.exp: Add backtrace test.
* gdb.btrace/tailcall.exp: Add backtrace test.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=066ce621f46cabb382b31a682501f0de8120c9fc
commit 066ce621f46cabb382b31a682501f0de8120c9fc
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Mar 25 16:01:33 2013 +0100
record-btrace: add record goto target methods
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_set_replay)
(record_btrace_goto_begin, record_btrace_goto_end)
(record_btrace_goto): New.
(init_record_btrace_ops): Initialize them.
* NEWS: Announce it.
testsuite/
* gdb.btrace/Makefile.in (EXECUTABLES): Add record_goto.
* gdb.btrace/record_goto.c: New.
* gdb.btrace/record_goto.exp: New.
* gdb.btrace/x86-record_goto.S: New.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e2887aa34ff4d8d972047e48803ed97b23beb739
commit e2887aa34ff4d8d972047e48803ed97b23beb739
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Fri May 3 10:51:13 2013 +0200
record-btrace: provide target_find_new_threads method
The "info threads" command tries to read memory, which is not possible during
replay. This results in an error message and aborts the command without showing
the existing threads.
Provide a to_find_new_threads target method to skip the search while replaying.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_find_new_threads)
(record_btrace_thread_alive): New.
(init_record_btrace_ops): Initialize to_find_new_threads and
to_thread_alive.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b2f4cfdebc3b7feb9572e83570d212f0ef31a78a
commit b2f4cfdebc3b7feb9572e83570d212f0ef31a78a
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Mar 25 15:44:43 2013 +0100
record-btrace: add to_wait and to_resume target methods.
Add simple to_wait and to_resume target methods that prevent stepping when the
current replay position is not at the end of the execution log.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_resume): New.
(record_btrace_wait): New.
(init_record_btrace_ops): Initialize to_wait and to_resume.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=633785ff2876e5bf03070a235d3e8cfe94cbf6bd
commit 633785ff2876e5bf03070a235d3e8cfe94cbf6bd
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Apr 24 13:24:11 2013 +0200
record-btrace: provide xfer_partial target method
Provide the xfer_partial target method for the btrace record target.
Only allow memory read accesses to readonly memory while we're replaying,
except for inserting and removing breakpoints.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_xfer_partial)
(record_btrace_insert_breakpoint, record_btrace_remove_breakpoint)
(record_btrace_allow_memory_access): New.
(init_record_btrace_ops): Initialize new methods.
* target.c (raw_memory_xfer_partial): Bail out if target reports
that this memory is not available.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3db08215d47b576303a8cbaf6195b5f4a3bb9a13
commit 3db08215d47b576303a8cbaf6195b5f4a3bb9a13
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Tue Dec 17 10:49:03 2013 +0100
target, breakpoint: allow insert/remove breakpoint to be forwarded
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* target.h (target_ops) <to_insert_breakpoint>
<to_remove_breakpoint>: Add target_ops parameter.
(forward_target_insert_breakpoint): New.
(forward_target_remove_breakpoint): New.
(memory_remove_breakpoint, memory_insert_breakpoint):
Add target_ops parameter.
* target.c (target_insert_breakpoint): Split into this and ...
(forward_target_insert_breakpoint): ... this.
(target_remove_breakpoint): Split into this and ...
(forward_target_remove_breakpoint): ... this.
(debug_to_insert_breakpoint): Add target_ops parameter.
Call forward_target_insert_breakpoint.
(debug_to_remove_breakpoint): Add target_ops parameter.
Call forward_target_remove_breakpoint.
(update_current_target): Do not inherit or default to_insert_breakpoint
and to_remove_breakpoint.
* corelow.c (ignore): Add target_ops parameter.
* exec.c (ignore): Add target_ops parameter.
* mem-break.c (memory_insert_breakpoint, memory_remove_breakpoint):
Add target_ops parameter.
* monitor.c (monitor_insert_breakpoint, monitor_remove_breakpoint):
Add target_ops parameter.
* nto-procfs.c (procfs_insert_breakpoint, procfs_remove_breakpoint):
Add target_ops parameter.
* record-full.c (record_full_beneath_to_insert_breakpoint)
(record_full_beneath_to_remove_breakpoint, tmp_to_insert_breakpoint)
(tmp_to_remove_breakpoint, record_full_insert_breakpoint)
(record_full_remove_breakpoint, record_full_core_insert_breakpoint)
(record_full_core_remove_breakpoint): Add target_ops parameter.
Update users.
(record_full_beneath_to_insert_breakpoint_ops)
(record_full_beneath_to_remove_breakpoint_ops)
(tmp_to_insert_breakpoint_ops, tmp_to_remove_breakpoint_ops): New.
(record_full_open): Initialize tmp_to_insert_breakpoint_ops,
tmp_to_remove_breakpoint_ops,
record_full_beneath_to_insert_breakpoint_ops, and
record_full_beneath_to_remove_breakpoint_ops.
* remote-m32r-sdi.c (m32r_insert_breakpoint)
(m32r_remove_breakpoint): Add target_ops parameter.
* remote-mips.c (mips_insert_breakpoint, mips_remove_breakpoint):
Add target_ops parameter.
* remote.c (remote_insert_breakpoint, remote_remove_breakpoint):
Add target_ops parameter.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cecac1aba0917b4f87837e3037a84954ac013b5c
commit cecac1aba0917b4f87837e3037a84954ac013b5c
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Mar 18 16:47:01 2013 +0100
record-btrace, frame: supply target-specific unwinder
Supply a target-specific frame unwinder for the record-btrace target that does
not allow unwinding while replaying.
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Markus Metzger <markus.t.metzger@intel.com>
gdb/
* record-btrace.c: Include frame-unwind.h.
(record_btrace_frame_unwind_stop_reason)
(record_btrace_frame_this_id, record_btrace_frame_prev_register)
(record_btrace_frame_sniffer, record_btrace_frame_unwind):
New.
(init_record_btrace_ops): Install it.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=824344ca4f9765b5598aed2c11b6f3caf5cc77ba
commit 824344ca4f9765b5598aed2c11b6f3caf5cc77ba
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Mar 18 16:43:05 2013 +0100
frame: do not assume unwinding will succeed
In get_frame_unwind_stop_reason, remove the assumption that further frame
unwinding will succeed.
gdb/
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* frame.c (get_frame_unwind_stop_reason): Unconditionally call
get_prev_frame_1.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=32261e523447cdecdfffe93807ac9bd0de3fe88d
commit 32261e523447cdecdfffe93807ac9bd0de3fe88d
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Mar 18 16:43:05 2013 +0100
frame, cfa: check unwind stop reason first
Swap the unwind stop reason check and the unwinder check to allow
non-dwarf2 frame types to fail with a recoverable error.
gdb/
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2-frame.c (dwarf2_frame_cfa): Move UNWIND_UNAVAILABLE check
earlier.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ea001bdce2a4442eb556c64514c8ec2473f4c4d1
commit ea001bdce2a4442eb556c64514c8ec2473f4c4d1
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Mar 18 16:43:05 2013 +0100
frame, backtrace: allow targets to supply a frame unwinder
Allow targets to supply their own target-specific frame unwinders; one for
normal frames and one for tailcall frames. If a target-specific unwinder
is supplied, it will be chosen before any other unwinder.
The original patch has been split into this and the next two patches.
gdb/
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* frame-unwind.c: Include target.h.
(frame_unwind_try_unwinder): New function with code from ...
(frame_unwind_find_by_frame): ... here. New variable
unwinder_from_target, call also target_get_unwinder)
(target_get_tailcall_unwinder, and frame_unwind_try_unwinder for it.
* target.c (target_get_unwinder, target_get_tailcall_unwinder): New.
* target.h (struct target_ops): New fields to_get_unwinder and
to_get_tailcall_unwinder.
(target_get_unwinder, target_get_tailcall_unwinder): New declarations.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1f3ef5810cab04310a11d4d561a4f32329dfb002
commit 1f3ef5810cab04310a11d4d561a4f32329dfb002
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Thu Mar 28 10:38:24 2013 +0100
record-btrace: supply register target methods
Supply target methods to allow reading the PC. Forbid anything else.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_fetch_registers)
(record_btrace_store_registers)
(record_btrace_to_prepare_to_store): New.
(init_record_btrace_ops): Add the above.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f32dbf8c793020592e09d6aafd5c2ed70ea4f2b1
commit f32dbf8c793020592e09d6aafd5c2ed70ea4f2b1
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Jan 13 14:24:50 2014 +0100
Add target_ops argument to to_prepare_to_store
2013-12-17 Tom Tromey <tromey@redhat.com>
* windows-nat.c (windows_prepare_to_store): Add 'self' argument.
* target.h (struct target_ops) <to_prepare_to_store>: Add
argument.
(target_prepare_to_store): Add argument.
* target.c (debug_to_prepare_to_store): Add argument.
(update_current_target): Update.
* remote.c (remote_prepare_to_store): Add 'self' argument.
* remote-sim.c (gdbsim_prepare_to_store): Add 'self' argument.
* remote-mips.c (mips_prepare_to_store): Add 'self' argument.
* remote-m32r-sdi.c (m32r_prepare_to_store): Add 'self' argument.
* record-full.c (record_full_core_prepare_to_store): Add 'self'
argument.
* ravenscar-thread.c (ravenscar_prepare_to_store): Add argument.
* nto-procfs.c (procfs_prepare_to_store): Add 'self' argument.
* monitor.c (monitor_prepare_to_store): Add 'self' argument.
* inf-child.c (inf_child_prepare_to_store): Add 'self' argument.
* go32-nat.c (go32_prepare_to_store): Add 'self' argument.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=07bbe694e779f4953911a50751abdc00117be7d3
commit 07bbe694e779f4953911a50751abdc00117be7d3
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Fri Apr 26 08:37:06 2013 +0200
btrace: add replay position to btrace thread info
Add a branch trace instruction iterator pointing to the current replay position
to the branch trace thread info struct.
Free the iterator when btrace is cleared.
Start at the replay position for the instruction and function-call histories.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* btrace.h (replay) <replay>: New.
(btrace_is_replaying): New.
* btrace.c (btrace_clear): Free replay iterator.
(btrace_is_replaying): New.
* record-btrace.c (record_btrace_is_replaying): New.
(record_btrace_info): Print insn number if replaying.
(record_btrace_insn_history): Start at replay position.
(record_btrace_call_history): Start at replay position.
(init_record_btrace_ops): Init to_record_is_replaying.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0688d04e19c0e6305c1034eb5e97a66458fd805a
commit 0688d04e19c0e6305c1034eb5e97a66458fd805a
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Apr 17 09:39:43 2013 +0200
record-btrace: make ranges include begin and end
The "record function-call-history" and "record instruction-history" commands
accept a range "begin, end". End is not included in both cases. Include it.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (record_btrace_insn_history_range): Include
end.
(record_btrace_insn_history_from): Adjust range.
(record_btrace_call_history_range): Include
end.
(record_btrace_call_history_from): Adjust range.
* NEWS: Announce changes.
testsuite/
* gdb.btrace/function_call_history.exp: Update tests.
* gdb.btrace/instruction_history.exp: Update tests.
doc/
* gdb.texinfo (Process Record and Replay): Update documentation.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8710b7097e6564969c5e417007a438d8f4ab710e
commit 8710b7097e6564969c5e417007a438d8f4ab710e
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Thu Apr 18 10:58:05 2013 +0200
record-btrace: optionally indent function call history
Add a new modifier /c to the "record function-call-history" command to
indent the function name based on its depth in the call stack.
Also reorder the optional fields to have the indentation at the very beginning.
Prefix the insn range (/i modifier) with "inst ".
Prefix the source line (/l modifier) with "at ".
Change the range syntax from "begin-end" to "begin,end" to allow copy&paste to
the "record instruction-history" and "list" commands.
Adjust the respective tests and add new tests for the /c modifier.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record.h (enum record_print_flag)
<record_print_indent_calls>: New.
* record.c (get_call_history_modifiers): Recognize /c modifier.
(_initialize_record): Document /c modifier.
* record-btrace.c (btrace_call_history): Add btinfo parameter.
Reorder fields. Optionally indent the function name. Update
all users.
* NEWS: Announce changes.
testsuite/
* gdb.btrace/function_call_history.exp: Fix expected field
order for "record function-call-history".
Add new tests for "record function-call-history /c".
* gdb.btrace/exception.cc: New.
* gdb.btrace/exception.exp: New.
* gdb.btrace/tailcall.exp: New.
* gdb.btrace/x86-tailcall.S: New.
* gdb.btrace/x86-tailcall.c: New.
* gdb.btrace/unknown_functions.c: New.
* gdb.btrace/unknown_functions.exp: New.
* gdb.btrace/Makefile.in (EXECUTABLES): Add new.
doc/
* gdb.texinfo (Process Record and Replay): Document new /c
modifier accepted by "record function-call-history".
Add /i modifier to "record function-call-history" example.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d0fa75352b7ffd586499d28983bff5d714e5211a
commit d0fa75352b7ffd586499d28983bff5d714e5211a
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Apr 10 13:43:41 2013 +0200
btrace: increase buffer size
Try to allocate as much buffer as we can for each thread with a maximum
of 64KB.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* common/linux-btrace.c (linux_enable_btrace): Enlarge buffer.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5de9129b066591c6ef57829ab9e1c2a030de49af
commit 5de9129b066591c6ef57829ab9e1c2a030de49af
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon May 13 14:57:42 2013 +0200
record-btrace: start counting at one
The record instruction-history and record-function-call-history commands start
counting instructions at zero. This is somewhat unintuitive when we start
navigating in the recorded instruction history. Start at one, instead.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (ftrace_new_function): Start counting at one.
* record-btrace.c (record_btrace_info): Adjust number of calls
and insns.
* NEWS: Announce it.
testsuite/
* gdb.btrace/instruction_history.exp: Update.
* gdb.btrace/function_call_history.exp: Update.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7acbe13307c209309f1733757b6d5d7a2d9bce9b
commit 7acbe13307c209309f1733757b6d5d7a2d9bce9b
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Tue Mar 26 11:32:20 2013 +0100
record-btrace: fix insn range in function call history
With the "/i" modifier, we print the instruction number range in the
"record function-call-history" command as [begin, end).
It would be more intuitive if we printed the range as [begin, end].
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* record-btrace.c (btrace_call_history_insn_range): Print
insn range as [begin, end].
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=23a7fe7580c5625dd19c852faf9a3acb56293207
commit 23a7fe7580c5625dd19c852faf9a3acb56293207
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Fri Mar 22 14:32:47 2013 +0100
btrace: change branch trace data structure
The branch trace is represented as 3 vectors:
- a block vector
- a instruction vector
- a function vector
Each vector (except for the first) is computed from the one above.
Change this into a graph where a node represents a sequence of instructions
belonging to the same function and where we have three types of edges to connect
the function segments:
- control flow
- same function (instance)
- call stack
This allows us to navigate in the branch trace. We will need this for "record
goto" and reverse execution.
This patch introduces the data structure and computes the control flow edges.
It also introduces iterator structs to simplify iterating over the branch trace
in control-flow order.
It also fixes PR gdb/15240 since now recursive calls are handled correctly.
Fix the test that got the number of expected fib instances and also the
function numbers wrong.
The current instruction had been part of the branch trace. This will look odd
once we start support for reverse execution. Remove it. We still keep it in
the trace itself to allow extending the branch trace more easily in the future.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* btrace.h (struct btrace_func_link): New.
(enum btrace_function_flag): New.
(struct btrace_inst): Rename to ...
(struct btrace_insn): ...this. Update all users.
(struct btrace_func) <ibegin, iend>: Remove.
(struct btrace_func_link): New.
(struct btrace_func): Rename to ...
(struct btrace_function): ...this. Update all users.
(struct btrace_function) <segment, flow, up, insn, insn_offset)
(number, level, flags>: New.
(struct btrace_insn_iterator): Rename to ...
(struct btrace_insn_history): ...this.
Update all users.
(struct btrace_insn_iterator, btrace_call_iterator): New.
(struct btrace_target_info) <btrace, itrace, ftrace>: Remove.
(struct btrace_target_info) <begin, end, level>
<insn_history, call_history>: New.
(btrace_insn_get, btrace_insn_number, btrace_insn_begin)
(btrace_insn_end, btrace_insn_prev, btrace_insn_next)
(btrace_insn_cmp, btrace_find_insn_by_number, btrace_call_get)
(btrace_call_number, btrace_call_begin, btrace_call_end)
(btrace_call_prev, btrace_call_next, btrace_call_cmp)
(btrace_find_function_by_number, btrace_set_insn_history)
(btrace_set_call_history): New.
* btrace.c (btrace_init_insn_iterator)
(btrace_init_func_iterator, compute_itrace): Remove.
(ftrace_print_function_name, ftrace_print_filename)
(ftrace_skip_file): Change
parameter to const.
(ftrace_init_func): Remove.
(ftrace_debug): Use new btrace_function fields.
(ftrace_function_switched): Also consider gaining and
losing symbol information).
(ftrace_print_insn_addr, ftrace_new_call, ftrace_new_return)
(ftrace_new_switch, ftrace_find_caller, ftrace_new_function)
(ftrace_update_caller, ftrace_fixup_caller, ftrace_new_tailcall):
New.
(ftrace_new_function): Move. Remove debug print.
(ftrace_update_lines, ftrace_update_insns): New.
(ftrace_update_function): Check for call, ret, and jump.
(compute_ftrace): Renamed to ...
(btrace_compute_ftrace): ...this. Rewritten to compute call
stack.
(btrace_fetch, btrace_clear): Updated.
(btrace_insn_get, btrace_insn_number, btrace_insn_begin)
(btrace_insn_end, btrace_insn_prev, btrace_insn_next)
(btrace_insn_cmp, btrace_find_insn_by_number, btrace_call_get)
(btrace_call_number, btrace_call_begin, btrace_call_end)
(btrace_call_prev, btrace_call_next, btrace_call_cmp)
(btrace_find_function_by_number, btrace_set_insn_history)
(btrace_set_call_history): New.
* record-btrace.c (require_btrace): Use new btrace thread
info fields.
(record_btrace_info, btrace_insn_history)
(record_btrace_insn_history, record_btrace_insn_history_range):
Use new btrace thread info fields and new iterator.
(btrace_func_history_src_line): Rename to ...
(btrace_call_history_src_line): ...this. Use new btrace
thread info fields.
(btrace_func_history): Rename to ...
(btrace_call_history): ...this. Use new btrace thread info
fields and new iterator.
(record_btrace_call_history, record_btrace_call_history_range):
Use new btrace thread info fields and new iterator.
testsuite/
* gdb.btrace/function_call_history.exp: Fix expected function
trace.
* gdb.btrace/instruction_history.exp: Initialize traced.
Remove traced_functions.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8372a7cb96e9d193cb1f85f3fd2c01e38c33a750
commit 8372a7cb96e9d193cb1f85f3fd2c01e38c33a750
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Dec 18 14:13:54 2013 +0100
frame: add frame_id_build_unavailable_stack_special
Add a function to build a frame_id for a frame with unavailable stack
and with a special identifier address.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* frame.h (frame_id_build_unavailable_stack_special): New.
* frame.c (frame_id_build_unavailable_stack_special): New.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c2170eeffa616c51ca4c7ab7142523c04b762603
commit c2170eeffa616c51ca4c7ab7142523c04b762603
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Fri Mar 22 15:56:56 2013 +0100
gdbarch: add instruction predicate methods
Add new methods to gdbarch for analyzing the instruction at a given address.
Implement those methods for i386 and amd64 architectures.
This is needed by "record btrace" to detect function calls in the
execution trace.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* amd64-tdep.c (amd64_classify_insn_at, amd64_insn_is_call)
(amd64_insn_is_ret, amd64_insn_is_jump, amd64_jmp_p): New.
(amd64_init_abi): Add insn_is_call, insn_is_ret, and insn_is_jump
to gdbarch.
* i386-tdep.c (i386_insn_is_call, i386_insn_is_ret)
(i386_insn_is_jump, i386_jmp_p): New.
(i386_gdbarch_init): Add insn_is_call, insn_is_ret, and
insn_is_jump to gdbarch.
* gdbarch.sh (insn_is_call, insn_is_ret, insn_is_jump): New.
* gdbarch.h: Regenerated.
* gdbarch.c: Regenerated.
* arch-utils.h (default_insn_is_call, default_insn_is_ret)
(default_insn_is_jump): New.
* arch-utils.c (default_insn_is_call, default_insn_is_ret)
(default_insn_is_jump): New.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=864089d2f64c6624aac3f52ece2c31dff6a8f59f
commit 864089d2f64c6624aac3f52ece2c31dff6a8f59f
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Sep 30 15:00:16 2013 +0200
btrace: uppercase btrace_read_type
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* common/btrace-common.h (btrace_read_type) <btrace_read_all>:
Change to ...
(btrace_read_type) <BTRACE_READ_ALL>: ... this. Update users.
(btrace_read_type) <btrace_read_new>: Change to ...
(btrace_read_type) <BTRACE_READ_NEW>: ... this. Update users.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ed9edfb5d5edb1dd0b6280ae4acdd9963a12ebe6
commit ed9edfb5d5edb1dd0b6280ae4acdd9963a12ebe6
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Mon Jun 3 14:32:15 2013 +0200
btrace, linux: fix memory leak when reading branch trace
When it takes more than one iteration to read the BTS trace, the trace from the
previous iteration is leaked. Fix it.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* common/linux-btrace.c (linux_read_btrace): Free trace from
previous iteration.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=724c7dd8a4520d4020883b4ae3a3f2fa489acb1a
commit 724c7dd8a4520d4020883b4ae3a3f2fa489acb1a
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Dec 18 14:47:17 2013 +0100
btrace, test: fix multi-line btrace tests
For testing multi-line test output, gdb.btrace tests used the following
pattern:
gdb_test "..." "
...\r
..."
Change this to:
gdb_test "..." [join [list \
"..." \
"..."] "\r\n"]
Also extract repeated tests into a test function and shorten or remove
test messages.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
testsuite/
* gdb.btrace/function_call_history.exp: Update
* gdb.btrace/instruction_history.exp: Update.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6d78d93b8d3854dcab6c90307b19f43e1a93f592
commit 6d78d93b8d3854dcab6c90307b19f43e1a93f592
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Thu Jan 16 09:47:51 2014 +0100
test, btrace: update expected text
The error message for starting recording twice changed.
Update the expected text to fix resulting regressions.
2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
* gdb.btrace/enable.exp: Update expected text.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 388 +++++
gdb/NEWS | 29 +
gdb/aix-thread.c | 2 +-
gdb/amd64-linux-nat.c | 6 +-
gdb/amd64-tdep.c | 67 +
gdb/arch-utils.c | 15 +
gdb/arch-utils.h | 4 +
gdb/btrace.c | 1361 +++++++++++++++---
gdb/btrace.h | 269 +++-
gdb/common/btrace-common.h | 29 +-
gdb/common/linux-btrace.c | 125 ++-
gdb/common/linux-btrace.h | 15 +-
gdb/corelow.c | 3 +-
gdb/darwin-nat.c | 4 +-
gdb/doc/ChangeLog | 15 +
gdb/doc/gdb.texinfo | 32 +-
gdb/dwarf2-frame.c | 14 +-
gdb/exec.c | 3 +-
gdb/frame-unwind.c | 86 +-
gdb/frame.c | 25 +-
gdb/frame.h | 8 +
gdb/gdbarch.c | 72 +
gdb/gdbarch.h | 18 +
gdb/gdbarch.sh | 9 +
gdb/gdbserver/ChangeLog | 10 +
gdb/gdbserver/linux-low.c | 36 +-
gdb/gdbserver/server.c | 15 +-
gdb/gdbserver/target.h | 9 +-
gdb/go32-nat.c | 2 +-
gdb/i386-linux-nat.c | 6 +-
gdb/i386-tdep.c | 59 +
gdb/inf-child.c | 3 +-
gdb/infrun.c | 9 +-
gdb/linux-nat.c | 4 +-
gdb/linux-thread-db.c | 2 +-
gdb/mem-break.c | 4 +-
gdb/monitor.c | 6 +-
gdb/nto-procfs.c | 6 +-
gdb/ravenscar-thread.c | 8 +-
gdb/record-btrace.c | 1574 +++++++++++++++++---
gdb/record-full.c | 57 +-
gdb/record.c | 4 +
gdb/record.h | 7 +
gdb/remote-m32r-sdi.c | 8 +-
gdb/remote-mips.c | 13 +-
gdb/remote-sim.c | 5 +-
gdb/remote.c | 42 +-
gdb/target.c | 131 ++-
gdb/target.h | 74 +-
gdb/testsuite/ChangeLog | 80 +
gdb/testsuite/gdb.btrace/Makefile.in | 4 +-
gdb/testsuite/gdb.btrace/data.c | 36 +
gdb/testsuite/gdb.btrace/data.exp | 45 +
gdb/testsuite/gdb.btrace/delta.exp | 83 +
gdb/testsuite/gdb.btrace/enable.exp | 6 +-
gdb/testsuite/gdb.btrace/exception.cc | 56 +
gdb/testsuite/gdb.btrace/exception.exp | 70 +
gdb/testsuite/gdb.btrace/finish.exp | 59 +
gdb/testsuite/gdb.btrace/function_call_history.exp | 322 +++--
gdb/testsuite/gdb.btrace/instruction_history.exp | 80 +-
gdb/testsuite/gdb.btrace/multi-thread-step.c | 53 +
gdb/testsuite/gdb.btrace/multi-thread-step.exp | 135 ++
gdb/testsuite/gdb.btrace/next.exp | 76 +
gdb/testsuite/gdb.btrace/nexti.exp | 76 +
gdb/testsuite/gdb.btrace/record_goto.c | 51 +
gdb/testsuite/gdb.btrace/record_goto.exp | 183 +++
gdb/testsuite/gdb.btrace/rn-dl-bind.c | 37 +
gdb/testsuite/gdb.btrace/rn-dl-bind.exp | 52 +
gdb/testsuite/gdb.btrace/step.exp | 89 ++
gdb/testsuite/gdb.btrace/stepi.exp | 93 ++
gdb/testsuite/gdb.btrace/tailcall.exp | 92 ++
gdb/testsuite/gdb.btrace/unknown_functions.c | 45 +
gdb/testsuite/gdb.btrace/unknown_functions.exp | 62 +
gdb/testsuite/gdb.btrace/x86-record_goto.S | 355 +++++
gdb/testsuite/gdb.btrace/x86-tailcall.S | 279 ++++
gdb/testsuite/gdb.btrace/x86-tailcall.c | 39 +
gdb/windows-nat.c | 2 +-
77 files changed, 6451 insertions(+), 802 deletions(-)
create mode 100644 gdb/testsuite/gdb.btrace/data.c
create mode 100644 gdb/testsuite/gdb.btrace/data.exp
create mode 100644 gdb/testsuite/gdb.btrace/delta.exp
create mode 100644 gdb/testsuite/gdb.btrace/exception.cc
create mode 100755 gdb/testsuite/gdb.btrace/exception.exp
create mode 100644 gdb/testsuite/gdb.btrace/finish.exp
create mode 100644 gdb/testsuite/gdb.btrace/multi-thread-step.c
create mode 100644 gdb/testsuite/gdb.btrace/multi-thread-step.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/rn-dl-bind.c
create mode 100644 gdb/testsuite/gdb.btrace/rn-dl-bind.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
hooks/post-receive
--
gdb and binutils