Incorrect handling of OpenBSD specific code
cjeker opened this issue · 3 comments
The OpenBSD handling in bsd_debug.c is incorrect. The inspected flags have nothing to do with the execution state of the process. In OpenBSD -current the PS_STOPPED field was removed and so this code no longer compiles.
rizin/librz/debug/p/native/bsd/bsd_debug.c
Lines 223 to 231 in 2b4aa53
That code should do the same as the FreeBSD and NetBSD code and inspect p_stat. This will return the scheduler state (SSLEEP, SSTOP, SRUN, SONPROC and SDEAD) of the main thread.
I do not use rizin but was notified about the build failure on OpenBSD-current. This is why I open this issue.
See also radareorg/radare2#23158 for the same issue in radare2.
@thestr4ng3r Do you have a working OpenBSD machine? I tried to set up a VM quickly, but it takes forever to get it to a state to compile Rizin.
I created a PR #4579 with the change that was committed to the OpenBSD ports repository to fix this issue.
I guess this can be closed now. Right?