Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2004 03:07:00 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 54678 for review
Message-ID:  <200406120307.i5C370VK034461@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54678

Change 54678 by marcel@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)");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406120307.i5C370VK034461>