Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jie Zhang <jie.zhang@analog.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Call get_remote_state after gdbarch_breakpoint_from_pc 	is  called
Date: Wed, 07 May 2008 12:56:00 -0000	[thread overview]
Message-ID: <20080507113623.GA31787@caradoc.them.org> (raw)
In-Reply-To: <4821809E.2010904@analog.com>

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.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-05-07 11:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 12:43 Jie Zhang
2008-05-07 12:56 ` Daniel Jacobowitz [this message]
2008-05-07 20:56   ` Jie Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080507113623.GA31787@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jie.zhang@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox