Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2017 06:36:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-toolchain@FreeBSD.org
Subject:   [Bug 219153] head, stable/11, release/11.0.1: libkvm (& more?) not updated to handle powerpc/powerpc64 ET_DYN based vmcore.* 's and such
Message-ID:  <bug-219153-29464-TCHyiUyEyJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-219153-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-219153-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219153

--- Comment #13 from Mark Millard <markmi@dsl-only.net> ---
(In reply to Mark Millard from comment #12)

I found the "Raw core file not supported"
logic in /usr/src/lib/libkvm/kvm_powerpc.c :

        static int
        _powerpc_kvatop(kvm_t *kd, kvaddr_t va, off_t *ofs)
        {
                struct vmstate *vm;

                vm =3D kd->vmst;
                if (be32toh(vm->ph->p_paddr) =3D=3D 0xffffffff)
                        return ((int)powerpc_va2off(kd, va, ofs));

                _kvm_err(kd, kd->program, "Raw corefile not supported");
                return (0);
        }

where the usage was:

(gdb) step
_powerpc_kvatop (kd=3D0x41e14000, ofs=3D0xffffcaa0) at
/usr/src/lib/libkvm/kvm_powerpc.c:208

(gdb) print *kd
$11 =3D {arch =3D 0x41898118, program =3D 0x0, errp =3D 0x0, errbuf =3D 0x4=
1e1400c "",
pmfd =3D 6, vmfd =3D -1, nlfd =3D 7, nlehdr =3D {e_ident =3D 0x41e14818
"\177ELF\001\002\001\t", e_type =3D 3, e_machine =3D 20,=20
    e_version =3D 1, e_entry =3D 1048800, e_phoff =3D 0, e_shoff =3D 364445=
32, e_flags
=3D 32768, e_ehsize =3D 52, e_phentsize =3D 0, e_phnum =3D 0, e_shentsize =
=3D 40, e_shnum
=3D 69, e_shstrndx =3D 65},=20
  resolve_symbol =3D 0, procbase =3D 0x0, argspc =3D 0x0, arglen =3D 0, arg=
v =3D 0x0,
argc =3D 0, argbuf =3D 0x0, vmst =3D 0x41e22000, rawdump =3D 0, writable =
=3D 0,
vnet_initialized =3D 0, vnet_start =3D 0, vnet_stop =3D 0,=20
  vnet_current =3D 0, vnet_base =3D 0, dpcpu_initialized =3D 0, dpcpu_start=
 =3D 0,
dpcpu_stop =3D 0, dpcpu_maxcpus =3D 0, dpcpu_off =3D 0x0, dpcpu_curcpu =3D =
0,
dpcpu_curoff =3D 0, pt_map =3D 0x0, pt_map_size =3D 0,=20
  pt_sparse_off =3D 0, pt_sparse_size =3D 0, pt_popcounts =3D 0x0, pt_page_=
size =3D 0,
pt_word_size =3D 0}

(gdb) print *kd->vmst
$12 =3D {map =3D 0x41841000, mapsz =3D 84, dmphdrsz =3D 0, eh =3D 0x4184100=
0, ph =3D
0x41841034}

(gdb) print *kd->vmst->ph
$13 =3D {p_type =3D 1, p_offset =3D 4096, p_vaddr =3D 4294967295, p_paddr =
=3D 0, p_filesz
=3D 2147483648, p_memsz =3D 2147483648, p_flags =3D 4, p_align =3D 4096}

(gdb) print *kd->vmst->eh
$14 =3D {e_ident =3D 0x41841000 "\177ELF\001\002\001?", e_type =3D 4, e_mac=
hine =3D 20,
e_version =3D 0, e_entry =3D 0, e_phoff =3D 52, e_shoff =3D 0, e_flags =3D =
0, e_ehsize =3D
52, e_phentsize =3D 32, e_phnum =3D 1,=20
  e_shentsize =3D 40, e_shnum =3D 0, e_shstrndx =3D 0}

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219153-29464-TCHyiUyEyJ>