This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] record-full/record-btrace: software/hardware breakpoint trap


*** TEST RESULTS FOR COMMIT 9e8915c6cee5c37637521b424d723e990e06d597 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 9e8915c6cee5c37637521b424d723e990e06d597

record-full/record-btrace: software/hardware breakpoint trap
This adjusts the record targets to tell the core whether a trap was
caused by a breakpoint.  Targets that can do this should report
breakpoint traps with the PC already adjusted, so this removes the
re-incrementing record-full was doing.

These targets need to be adjusted before process_stratum targets
beneath are, otherwise target_supports_stopped_by_sw_breakpoint,
etc. would fall through to the target beneath while
recording/replaying, and the core would get confused.

Tested on x86-64 Fedora 20, native and gdbserver.

gdb/ChangeLog:
2015-03-04  Pedro Alves  <palves@redhat.com>

	* btrace.h: Include target/waitstatus.h.
	(struct btrace_thread_info) <stop_reason>: New field.
	* record-btrace.c (record_btrace_step_thread): Use
	record_check_stopped_by_breakpoint instead of breakpoint_here_p.
	(record_btrace_decr_pc_after_break): Delete.
	(record_btrace_stopped_by_sw_breakpoint)
	(record_btrace_supports_stopped_by_sw_breakpoint)
	(record_btrace_stopped_by_hw_breakpoint)
	(record_btrace_supports_stopped_by_hw_breakpoint): New functions.
	(init_record_btrace_ops): Install them.
	* record-full.c (record_full_hw_watchpoint): Delete and replace
	with ...
	(record_full_stop_reason): ... this throughout.
	(record_full_exec_insn): Adjust.
	(record_full_wait_1): Adjust.  No longer re-increment the PC.
	(record_full_wait_1): Adjust.  Use
	record_check_stopped_by_breakpoint instead of breakpoint_here_p.
	(record_full_stopped_by_watchpoint): Adjust.
	(record_full_stopped_by_sw_breakpoint)
	(record_full_supports_stopped_by_sw_breakpoint)
	(record_full_supports_stopped_by_sw_breakpoint)
	(record_full_stopped_by_hw_breakpoint)
	(record_full_supports_stopped_by_hw_breakpoint): New functions.
	(init_record_full_ops, init_record_full_core_ops): Install them.
	* record.c (record_check_stopped_by_breakpoint): New function.
	* record.h: Include target/waitstatus.h.
	(record_check_stopped_by_breakpoint): New declaration.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]