#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.152 2018/09/09 20:33:28 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.153 2018/09/11 00:37:33 christos Exp $")
#endif
#ifdef BUILTIN_ELF
}
break;
+ case OS_STYLE_FREEBSD:
+ if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
+ size_t argoff, pidoff;
+
+ if (clazz == ELFCLASS32)
+ argoff = 4 + 4 + 17;
+ else
+ argoff = 4 + 4 + 8 + 17;
+ if (file_printf(ms, ", from '%.80s'", nbuf + doff +
+ argoff) == -1)
+ return 1;
+ pidoff = argoff + 81 + 2;
+ if (doff + pidoff + 4 <= size) {
+ if (file_printf(ms, ", pid=%u",
+ elf_getu32(swap, *(uint32_t *)(nbuf +
+ doff + pidoff))) == -1)
+ return 1;
+ }
+ *flags |= FLAGS_DID_CORE;
+ }
+ break;
+
default:
if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
size_t i, j;