Use memmove to copy overlap memory.
[deliverable/binutils-gdb.git] / gdb / i386-nat.c
index edb78bfadeb884077e945f6e6a5b24b24cacf6b2..82c51d70c20d2d3e41f55aa71a50f3517431967d 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for the i386.
 
-   Copyright (C) 2001, 2004, 2005, 2007, 2008, 2009
+   Copyright (C) 2001, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -268,7 +268,8 @@ i386_length_and_rw_bits (int len, enum target_hw_bp_type type)
        rw = DR_RW_WRITE;
        break;
       case hw_read:
-       /* The i386 doesn't support data-read watchpoints.  */
+       internal_error (__FILE__, __LINE__,
+                       _("The i386 doesn't support data-read watchpoints.\n"));
       case hw_access:
        rw = DR_RW_READ;
        break;
@@ -487,6 +488,9 @@ i386_insert_watchpoint (CORE_ADDR addr, int len, int type)
 {
   int retval;
 
+  if (type == hw_read)
+    return 1; /* unsupported */
+
   if (((len != 1 && len !=2 && len !=4) && !(TARGET_HAS_DR_LEN_8 && len == 8))
       || addr % len != 0)
     retval = i386_handle_nonaligned_watchpoint (WP_INSERT, addr, len, type);
This page took 0.023976 seconds and 4 git commands to generate.