Guard call to gencore and freecore

The gencore() and freecore() code in gencore.c is guarded by
POSTK_DEBUG_ARCH_DEP_18, so the call to these functions should
also be guarded, otherwise linking fails.
This commit is contained in:
Hannes Weisbach
2017-10-12 17:14:24 +09:00
parent d7523cdd84
commit 3573b8649e

View File

@@ -944,6 +944,7 @@ void coredump(struct thread *thread, void *regs)
}
#endif /* POSTK_DEBUG_ARCH_DEP_67 */
#ifndef POSTK_DEBUG_ARCH_DEP_18
ret = gencore(thread, regs, &coretable, &chunks);
if (ret != 0) {
dkprintf("could not generate a core file image\n");
@@ -960,6 +961,7 @@ void coredump(struct thread *thread, void *regs)
kprintf("core dump failed.\n");
}
freecore(&coretable);
#endif /* POSTK_DEBUG_ARCH_DEP_18 */
}
#ifndef POSTK_DEBUG_ARCH_DEP_8