/* Memory breakpoint operations for the remote server for GDB.
- Copyright 2002
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
Contributed by MontaVista Software.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "server.h"
-const char *breakpoint_data;
+const unsigned char *breakpoint_data;
int breakpoint_len;
#define MAX_BREAKPOINT_LEN 8
return NULL;
}
+void
+delete_breakpoint_at (CORE_ADDR addr)
+{
+ struct breakpoint *bp = find_breakpoint_at (addr);
+ if (bp != NULL)
+ delete_breakpoint (bp);
+}
+
static void
reinsert_breakpoint_handler (CORE_ADDR stop_pc)
{
}
void
-set_breakpoint_data (const char *bp_data, int bp_len)
+set_breakpoint_data (const unsigned char *bp_data, int bp_len)
{
breakpoint_data = bp_data;
breakpoint_len = bp_len;
}
void
-check_mem_read (CORE_ADDR mem_addr, char *buf, int mem_len)
+check_mem_read (CORE_ADDR mem_addr, unsigned char *buf, int mem_len)
{
struct breakpoint *bp = breakpoints;
CORE_ADDR mem_end = mem_addr + mem_len;
}
void
-check_mem_write (CORE_ADDR mem_addr, char *buf, int mem_len)
+check_mem_write (CORE_ADDR mem_addr, unsigned char *buf, int mem_len)
{
struct breakpoint *bp = breakpoints;
CORE_ADDR mem_end = mem_addr + mem_len;
memcpy (buf + buf_offset, breakpoint_data + copy_offset, copy_len);
}
}
-
-