From: "Nathan J. Williams" <nathanw@wasabisystems.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] bsd-kvm.c: get exec file name
Date: Fri, 06 Aug 2004 18:13:00 -0000 [thread overview]
Message-ID: <mtuvffwb0sr.fsf@contents-vnder-pressvre.mit.edu> (raw)
This changes bsd_kvm_open() to pass the exec file in use to
kvm_openfiles() rather than NULL, which improves results when you run
"gdb /some/other/kernel" "target kvm kernel.core".
OK to commit?
- Nathan
2004-08-06 Nathan J. Williams <nathanw@wasabisystems.com>
* bsd-kvm.c: Include "gdbcore.h"
(bsd_kvm_open): Delete variable 'execfile'. Pass return value of
get_exec_file() to kvm_openfiles().
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 6 Aug 2004 17:55:46 -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>
@@ -55,7 +56,6 @@
bsd_kvm_open (char *filename, int from_tty)
{
char errbuf[_POSIX2_LINE_MAX];
- char *execfile = NULL;
kvm_t *temp_kd;
target_preopen (from_tty);
@@ -73,7 +73,8 @@
}
}
- temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf);
+ temp_kd = kvm_openfiles (get_exec_file (0), filename, NULL, O_RDONLY,
+ errbuf);
if (temp_kd == NULL)
error ("%s", errbuf);
next reply other threads:[~2004-08-06 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-06 18:13 Nathan J. Williams [this message]
2004-08-06 21:13 ` Mark Kettenis
2004-08-07 21:25 ` Nathan J. Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mtuvffwb0sr.fsf@contents-vnder-pressvre.mit.edu \
--to=nathanw@wasabisystems.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox