aboutsummaryrefslogtreecommitdiff
path: root/gdb/bsd-kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/bsd-kvm.c')
-rw-r--r--gdb/bsd-kvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
index 3d715a5..1f0db5a 100644
--- a/gdb/bsd-kvm.c
+++ b/gdb/bsd-kvm.c
@@ -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);