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] Support breakpoint kinds for software breakpoints in GDBServer.


*** TEST RESULTS FOR COMMIT 2716529498941971b698f603e9aa0edc89905cb8 ***

Author: Antoine Tremblay <antoine.tremblay@ericsson.com>
Branch: master
Commit: 2716529498941971b698f603e9aa0edc89905cb8

Support breakpoint kinds for software breakpoints in GDBServer.

There's two ways to set breakpoints in GDBServer.

 - GDBServer setting its own breakpoints, through API set_breakpoint_at.

 - GDBServer setting breakpoints according to the information in Z
   packets, through API set_gdb_breakpoint.

Before this patch the breakpoint kinds were a concept unique to GDB and Z
packets, as GDBServer never had to set different kinds of breakpoint on its
own.

This patch teaches GDBServer to handle breakpoint kinds for its own
breakpoints. It generalizes the breakpoint kind as per Z packets to
represent different kinds of breakpoints directly set by GDBServer also.

GDBServer now querys breakpoint_kind_from_pc to know what breakpoint kind to
set on its own.

As the kind is now a differentiating factor equivalent to size for the
breakpoint struct and that it's size can be queried using
sw_breakpoint_from_kind, the size field has been replaced with the kind field.
All references to size are now replaced by kind or a call to bp_size that wraps
sw_breakpoing_from_kind and returns the size of the breakpoint in memory.

To fetch the software breakpoint data bp_opcode is called and wraps the
sw_breakpoint_from_kind call.

No regressions on Ubuntu 14.04 on ARMv7 and x86.
With gdbserver-{native,extended} / { -marm -mthumb }

gdb/gdbserver/ChangeLog:

	* linux-low.c (initialize_low): Ajdust for breakpoint global variables
	removal.
	* mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
	(struct raw_breakpoint) <size>: Remove.
	(struct raw_breakpoint) <kind>: Add.
	(bp_size): New function.
	(bp_opcode): Likewise.
	(find_raw_breakpoint_at): Adjust for kind.
	(insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
	(remove_memory_breakpoint): Adjust for kind call bp_size.
	(set_raw_breakpoint_at): Adjust for kind.
	(set_breakpoint): Likewise.
	(set_breakpoint_at): Call breakpoint_kind_from_pc.
	(delete_raw_breakpoint): Adjust for kind.
	(delete_breakpoint): Likewise.
	(find_gdb_breakpoint): Likewise.
	(set_gdb_breakpoint_1): Likewise.
	(set_gdb_breakpoint): Likewise.
	(delete_gdb_breakpoint_1): Likewise.
	(delete_gdb_breakpoint): Likewise.
	(uninsert_raw_breakpoint): Likewise.
	(reinsert_raw_breakpoint): Likewise.
	(set_breakpoint_data): Remove.
	(validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
	(check_mem_read): Adjust for kind call bp_size.
	(check_mem_write): Adjust for kind call bp_size,bp_opcode.
	(clone_one_breakpoint): Adjust for kind.
	* mem-break.h (set_gdb_breakpoint): Likewise.
	(delete_gdb_breakpoint): Likewise.
	* server.c (process_serial_event): Likewise.


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