Blame src/arch/nt64/debug.c

716654
/**************************************************************************/
716654
/*  mmglue: midipix architecture- and target-specific bits for musl libc  */
716654
/*  Copyright (C) 2013--2023  SysDeer Technologies, LLC                   */
716654
/*  Released under the Standard MIT License; see COPYING.MMGLUE.          */
716654
/**************************************************************************/
716654
65a872
#include <stdint.h>
65a872
#include <stddef.h>
65a872
#include <signal.h>
65a872
#include <unistd.h>
65a872
#include <sys/debug.h>
be0101
#include "syscall.h"
65a872
65a872
int __dbg_attach(pid_t pid)
65a872
{
be0101
	return syscall(SYS_dbg_attach,pid);
65a872
}
65a872
65a872
int __dbg_detach(int pfd)
65a872
{
be0101
	return syscall(SYS_dbg_detach,pfd);
65a872
}
65a872
bb1628
int __dbg_spawn(const char * path,
bb1628
		char ** argv, char ** envp,
bb1628
		const struct __strace * strace)
65a872
{
bb1628
	return syscall(SYS_dbg_spawn,path,argv,envp,strace);
65a872
}
65a872
65a872
int __dbg_fork()
65a872
{
be0101
	return syscall(SYS_dbg_fork);
65a872
}
65a872
65a872
int __dbg_kill(int pfd)
65a872
{
be0101
	return syscall(SYS_dbg_kill,pfd);
65a872
}
65a872
4085aa
int __dbg_rbreak(int pfd)
4085aa
{
be0101
	return syscall(SYS_dbg_rbreak,pfd);
4085aa
}
4085aa
4085aa
int __dbg_tbreak(int pfd)
4085aa
{
be0101
	return syscall(SYS_dbg_tbreak,pfd);
4085aa
}
4085aa
4085aa
int __dbg_lbreak(int pfd)
4085aa
{
be0101
	return syscall(SYS_dbg_lbreak,pfd);
4085aa
}
4085aa
cd305f
ssize_t __dbg_vm_read(int pfd, void * buf, size_t len, uintptr_t addr)
cd305f
{
cd305f
	return syscall(SYS_dbg_vm_read,pfd,buf,len,addr);
cd305f
}
cd305f
cd305f
ssize_t __dbg_vm_write(int pfd, const void * buf, size_t len, uintptr_t addr)
cd305f
{
cd305f
	return syscall(SYS_dbg_vm_write,pfd,buf,len,addr);
cd305f
}
cd305f
5221bc
int __dbg_regs_fetch(int pfd, pid_t tid, mcontext_t * regctx)
5221bc
{
5221bc
	return syscall(SYS_dbg_regs_fetch,pfd,tid,regctx);
5221bc
}
5221bc
5221bc
int __dbg_regs_store(int pfd, pid_t tid, const mcontext_t * regctx)
5221bc
{
5221bc
	return syscall(SYS_dbg_regs_store,pfd,tid,regctx);
5221bc
}
5221bc
45970c
ssize_t __dbg_info_get(int pfd, pid_t tid, int type, void * buf, size_t len)
45970c
{
45970c
	return syscall(SYS_dbg_info_get,pfd,tid,type,buf,len);
45970c
}
45970c
45970c
ssize_t __dbg_info_set(int pfd, pid_t tid, int type, const void * buf, size_t len)
45970c
{
45970c
	return syscall(SYS_dbg_info_set,pfd,tid,type,buf,len);
45970c
}
45970c
24e534
int __dbg_suspend_thread(int pfd, pid_t tid)
24e534
{
24e534
	return syscall(SYS_dbg_suspend_thread,pfd,tid);
24e534
}
24e534
24e534
int __dbg_resume_thread(int pfd, pid_t tid)
24e534
{
24e534
	return syscall(SYS_dbg_resume_thread,pfd,tid);
24e534
}
24e534
65a872
int __dbg_event_query_one(int pfd, struct __dbg_event * evt)
65a872
{
be0101
	return syscall(SYS_dbg_event_query_one,pfd,evt);
65a872
}
65a872
65a872
int __dbg_event_query_all(int pfd, struct __dbg_event evt[], int nelem)
65a872
{
be0101
	return syscall(SYS_dbg_event_query_all,pfd,evt,nelem);
65a872
}
65a872
65a872
int __dbg_event_acquire(int pfd, struct __dbg_event * evt)
65a872
{
be0101
	return syscall(SYS_dbg_event_acquire,pfd,evt);
65a872
}
65a872
65a872
int __dbg_event_respond(int pfd, struct __dbg_event * evt)
65a872
{
be0101
	return syscall(SYS_dbg_event_respond,pfd,evt);
65a872
}
65a872
65a872
int __dbg_query_cpid(int pfd)
65a872
{
be0101
	return syscall(SYS_dbg_query_cpid,pfd);
65a872
}
65a872
65a872
int __dbg_query_syspid(int pfd)
65a872
{
be0101
	return syscall(SYS_dbg_query_syspid,pfd);
65a872
}
65a872
65a872
int __dbg_common_error(void)
65a872
{
be0101
	return syscall(SYS_dbg_common_error);
65a872
}
65a872
65a872
int __dbg_native_error(void)
65a872
{
be0101
	return syscall(SYS_dbg_native_error);
65a872
}