bsd_generate_corefile for FreeBSD adjust version since the feature is available in the 13.2 serie (#3820)

This commit is contained in:
David CARLIER 2023-09-03 12:38:40 +01:00 committed by GitHub
parent 71e6f5d450
commit 285ea07ab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,7 +139,7 @@ int bsd_reg_write(RzDebug *dbg, int type, const ut8 *buf, int size) {
bool bsd_generate_corefile(RzDebug *dbg, char *path, RzBuffer *dest) {
#if defined(__NetBSD__)
return ptrace(PT_DUMPCORE, dbg->pid, path, strlen(path)) != -1;
#elif defined(__FreeBSD__) && __FreeBSD_version >= 1400030
#elif defined(__FreeBSD__) && __FreeBSD_version >= 1302000
struct ptrace_coredump pc = { .pc_fd = dest->fd, .pc_flags = PC_ALL, .pc_limit = 0 };
return ptrace(PT_COREDUMP, dbg->pid, (void *)&pc, sizeof(pc)) != -1;
#else