Skip to content

Commit

Permalink
debugger: provide correct addr for PT_CONTINUE on BSDs
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Sep 30, 2024
1 parent 1463116 commit 6d5402d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/adbg/debugger.d
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,10 @@ version (Windows) {
version(Trace) trace("pid=%d state=%d", proc.pid, proc.status);
switch (proc.status) with (AdbgProcStatus) {
case loaded, stopped:
if (ptrace(PT_CONTINUE, proc.pid, null, 0) < 0) {
// NOTE: FreeBSD/NetBSD/OpenBSD PT_CONTINUE
// addr can be an address to resume at, or 1
// data can be a signal number, or 0
if (ptrace(PT_CONTINUE, proc.pid, cast(caddr_t)1, 0) < 0) {
proc.status = AdbgProcStatus.unknown;
return adbg_oops(AdbgError.os);
}
Expand Down

0 comments on commit 6d5402d

Please sign in to comment.