PERFORCE change 54678 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sat Jun 12 03:07:19 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=54678
Change 54678 by marcel at marcel_nfs on 2004/06/12 03:06:44
o Actually call kvm_openfiles().
o Call kgdb_thr_init() after opening the core file, but
before we spawn the gdb(1).
Affected files ...
.. //depot/projects/gdb/usr.bin/kgdb/main.c#8 edit
Differences ...
==== //depot/projects/gdb/usr.bin/kgdb/main.c#8 (text+ko) ====
@@ -40,6 +40,7 @@
#include <fcntl.h>
#include <inttypes.h>
#include <kvm.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -252,6 +253,14 @@
warnx("core file: %s", vmcore);
}
+ s = malloc(_POSIX2_LINE_MAX);
+ kvm = kvm_openfiles(kernel, vmcore, NULL, O_RDONLY, s);
+ if (kvm == NULL)
+ errx(1, s);
+ free(s);
+
+ kgdb_thr_init();
+
cmdfile_name = strdup("/tmp/kgdb.XXXXXXXX");
if (cmdfile_name == NULL)
err(1, "strdup(3)");
More information about the p4-projects
mailing list