From 6975d36437c8201fec308f32ce1900d8649d4dcd Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 1 Jul 2006 14:54:02 +0000 Subject: [PATCH] Fix write kcore support. --- gnu/dist/gdb6/gdb/bsd-kvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/dist/gdb6/gdb/bsd-kvm.c b/gnu/dist/gdb6/gdb/bsd-kvm.c index 1a3860b908ca..169b27fd7b91 100644 --- a/gnu/dist/gdb6/gdb/bsd-kvm.c +++ b/gnu/dist/gdb6/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);