This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] bsd-kvm.c: open read-write when write_files is set.
- From: "Nathan J. Williams" <nathanw at wasabisystems dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 01 Jul 2006 12:37:45 -0400
- Subject: [RFA] bsd-kvm.c: open read-write when write_files is set.
This should be a pretty minor approval; it struck me as a bit shy of
"obvious", though.
- Nathan
2006-07-01 Nathan J. Williams <nathanw@wasabisystems.com>
* bsd-kvm.c (bsd_kvm_open): Open the KVM interface read-write if
write_files is set.
Index: bsd-kvm.c
===================================================================
RCS file: /cvs/src/src/gdb/bsd-kvm.c,v
retrieving revision 1.16
diff -u -r1.16 bsd-kvm.c
--- bsd-kvm.c 17 Dec 2005 22:33:59 -0000 1.16
+++ bsd-kvm.c 1 Jul 2006 16:37:24 -0000
@@ -81,7 +81,8 @@
}
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);