This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]