2006-07-03 Nathan J. Williams <nathanw@wasabisystems.com>
authorNathan J. Williams <nathanw@wasabisystems.com>
Mon, 3 Jul 2006 17:26:16 +0000 (17:26 +0000)
committerNathan J. Williams <nathanw@wasabisystems.com>
Mon, 3 Jul 2006 17:26:16 +0000 (17:26 +0000)
        * bsd-kvm.c (bsd_kvm_open): Open the KVM interface read-write if
        write_files is set.

gdb/ChangeLog
gdb/bsd-kvm.c

index ce9acb8eef80147c968e9ac42f3d31f3c94e1df6..1a4e88a89f521c31d9db1fa81dbf289972da5b41 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-03  Nathan J. Williams  <nathanw@wasabisystems.com>
+
+       * bsd-kvm.c (bsd_kvm_open): Open the KVM interface read-write if
+       write_files is set.
+
 2006-06-24  Eli Zaretskii  <eliz@gnu.org>
 
        * defs.h (DIRNAME_SEPARATOR) [!__CYGWIN__ && _WIN32]: Define to `;'.
index 3d715a5762c153765fb361426ab5b91d673e602b..1f0db5a6dfcdd66152411fb8a05e384391ff2e49 100644 (file)
@@ -81,7 +81,8 @@ bsd_kvm_open (char *filename, int from_tty)
     }
 
   execfile = get_exec_file (0);
-  temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf);
+  temp_kd = kvm_openfiles (execfile, filename, NULL,
+                          write_files ? O_RDWR : O_RDONLY, errbuf);
   if (temp_kd == NULL)
     error (("%s"), errbuf);