bin/95405: libkvm does not support /dev/fwmem0.0 in FreeBSD 6 and later.

Jonas Bülow jonas.bulow at
Thu Apr 6 11:50:26 UTC 2006

>Number:         95405
>Category:       bin
>Synopsis:       libkvm does not support /dev/fwmem0.0 in FreeBSD 6 and later.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 06 11:50:16 GMT 2006
>Originator:     Jonas Bülow
>Release:        FreeBSD 6.0-p6
uname -a
FreeBSD 6.0-RELEASE-p6 FreeBSD 6.0-RELEASE-p6 #3: Thu Apr  6 08:14:28 CEST 2006     root at  i386

Programs using libkvm fails with:
<progname>: cannot mmap corefile

Since rev 1.16 of kvm_i386.c libkvm no longer supports /dev/fwmem0.0. The reason seems to be the change to use mmap for i386. 

The failing call in libkvm is:

kvm_i386.c:105             vm->mmapbase = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0); 

A comment at line 1113 in vm_mmap.c says:

   * cdevs does not provide private mappings of any kind.

dmesg -M /dev/fwmem0.0 -N kernel
dmesg: cannot mmap corefile

# kgdb kernel.debug /dev/fwmem0.0
kgdb: cannot mmap corefile



More information about the freebsd-bugs mailing list