[PATCH] Call get_remote_state after gdbarch_breakpoint_from_pc is called
Jie Zhang
jie.zhang@analog.com
Wed May 7 20:56:00 GMT 2008
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
More information about the Gdb-patches
mailing list