This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] bsd-kvm.c: get exec file name
Mark Kettenis <kettenis@chello.nl> writes:
> OK, although I'd prefer to keep using the variable execfile instead of
> wrapping the kvm_openfiles call:
>
> execfile = get_exec_file (0);
> temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf);
Sure. Committed as follows:
2004-08-07 Nathan J. Williams <nathanw@wasabisystems.com>
* bsd-kvm.c: Include "gdbcore.h"
(bsd_kvm_open): Use get_exec_file() to set 'execfile'.
Index: bsd-kvm.c
===================================================================
RCS file: /cvs/src/src/gdb/bsd-kvm.c,v
retrieving revision 1.4
diff -u -r1.4 bsd-kvm.c
--- bsd-kvm.c 3 Jul 2004 13:17:33 -0000 1.4
+++ bsd-kvm.c 7 Aug 2004 21:21:49 -0000
@@ -26,6 +26,7 @@
#include "regcache.h"
#include "target.h"
#include "value.h"
+#include "gdbcore.h" /* for get_exec_file */
#include "gdb_assert.h"
#include <fcntl.h>
@@ -73,6 +74,7 @@
}
}
+ execfile = get_exec_file (0);
temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf);
if (temp_kd == NULL)
error ("%s", errbuf);