This is the mail archive of the gdb-patches@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]

Re: [PATCH] Call get_remote_state after gdbarch_breakpoint_from_pc is called


Daniel Jacobowitz wrote:
On Wed, May 07, 2008 at 06:12:46PM +0800, Jie Zhang wrote:
Hi,

I'm working on Blackfin port of GDB. Since Blackfin requires that 16-bit breakpoint for 16-bit instruction and 32-bit breakpoint for 32-bit instruction, Blackfin port GDB tries to read memory, decode instruction, and find the instruction length in gdbarch_breakpoint_from_pc. Reading memory calls putpkt and getpkt when debugging remotely, which might change rs->buf. So we have to call get_remote_state after gdbarch_breakpoint_from_pc in remote_insert_breakpoint. Same for remote_insert_hw_breakpoint.

You don't need to move the call to get_remote_state, just the read from rs->buf (or replace p with rs->buf). But this is fine too.

	* remote.c (remote_insert_breakpoint): Call get_remote_state
	after gdbarch_breakpoint_from_pc is called.
	(remote_insert_hw_breakpoint): Likewise.

OK.


Committed. Thanks.


Jie



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