summaryrefslogtreecommitdiffhomepage
path: root/arch
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-06-06 06:14:39 +0000
committermidipix <writeonce@midipix.org>2019-06-06 06:17:00 +0000
commit65a87239eea1cd2d3e5c5ffad60b6060a4a25996 (patch)
treebaf230c5a5b421c8fbe80550ec9b51d88ab2c065 /arch
parent7f1932233ffb6802f419742920166d19c230c936 (diff)
downloadmmglue-65a87239eea1cd2d3e5c5ffad60b6060a4a25996.tar.bz2
mmglue-65a87239eea1cd2d3e5c5ffad60b6060a4a25996.tar.xz
debug interfaces: provide dbg_* interfaces as wrappers around struct __db_vtbl.
Diffstat (limited to 'arch')
-rw-r--r--arch/nt32/psxdbg.h28
-rw-r--r--arch/nt32/psxglue.h3
-rw-r--r--arch/nt64/psxdbg.h28
-rw-r--r--arch/nt64/psxglue.h3
4 files changed, 60 insertions, 2 deletions
diff --git a/arch/nt32/psxdbg.h b/arch/nt32/psxdbg.h
new file mode 100644
index 0000000..38c9fcd
--- /dev/null
+++ b/arch/nt32/psxdbg.h
@@ -0,0 +1,28 @@
+#ifndef _PSXDBG_H_
+#define _PSXDBG_H_
+
+struct __dbg_event;
+
+struct __dbg_vtbl {
+ int (*dbg_attach)(pid_t);
+ int (*dbg_detach)(int);
+
+ int (*dbg_spawn)(const char *, char **, char **);
+ int (*dbg_fork)(void);
+ int (*dbg_suspend)(int);
+ int (*dbg_kill)(int);
+
+ int (*dbg_event_query_one)(int, struct __dbg_event *);
+ int (*dbg_event_query_all)(int, struct __dbg_event[], int);
+
+ int (*dbg_event_acquire)(int, struct __dbg_event *);
+ int (*dbg_event_respond)(int, struct __dbg_event *);
+
+ int (*dbg_query_cpid)(int);
+ int (*dbg_query_syspid)(int);
+
+ int (*dbg_common_error)(void);
+ int (*dbg_native_error)(void);
+};
+
+#endif
diff --git a/arch/nt32/psxglue.h b/arch/nt32/psxglue.h
index 37a2109..d8e653a 100644
--- a/arch/nt32/psxglue.h
+++ b/arch/nt32/psxglue.h
@@ -46,9 +46,10 @@ struct __psx_context {
void * ldsoaddr;
const unsigned short * ctty;
void ** sys_vtbl;
+ const struct __psx_vtbl * psx_vtbl;
const struct __seh_vtbl * seh_vtbl;
+ const struct __dbg_vtbl * dbg_vtbl;
const struct __ldso_vtbl * ldso_vtbl;
- const struct __psx_vtbl * psx_vtbl;
unsigned int teb_sys_idx;
unsigned int teb_libc_idx;
void * pthread_surrogate_fn;
diff --git a/arch/nt64/psxdbg.h b/arch/nt64/psxdbg.h
new file mode 100644
index 0000000..38c9fcd
--- /dev/null
+++ b/arch/nt64/psxdbg.h
@@ -0,0 +1,28 @@
+#ifndef _PSXDBG_H_
+#define _PSXDBG_H_
+
+struct __dbg_event;
+
+struct __dbg_vtbl {
+ int (*dbg_attach)(pid_t);
+ int (*dbg_detach)(int);
+
+ int (*dbg_spawn)(const char *, char **, char **);
+ int (*dbg_fork)(void);
+ int (*dbg_suspend)(int);
+ int (*dbg_kill)(int);
+
+ int (*dbg_event_query_one)(int, struct __dbg_event *);
+ int (*dbg_event_query_all)(int, struct __dbg_event[], int);
+
+ int (*dbg_event_acquire)(int, struct __dbg_event *);
+ int (*dbg_event_respond)(int, struct __dbg_event *);
+
+ int (*dbg_query_cpid)(int);
+ int (*dbg_query_syspid)(int);
+
+ int (*dbg_common_error)(void);
+ int (*dbg_native_error)(void);
+};
+
+#endif
diff --git a/arch/nt64/psxglue.h b/arch/nt64/psxglue.h
index 37a2109..d8e653a 100644
--- a/arch/nt64/psxglue.h
+++ b/arch/nt64/psxglue.h
@@ -46,9 +46,10 @@ struct __psx_context {
void * ldsoaddr;
const unsigned short * ctty;
void ** sys_vtbl;
+ const struct __psx_vtbl * psx_vtbl;
const struct __seh_vtbl * seh_vtbl;
+ const struct __dbg_vtbl * dbg_vtbl;
const struct __ldso_vtbl * ldso_vtbl;
- const struct __psx_vtbl * psx_vtbl;
unsigned int teb_sys_idx;
unsigned int teb_libc_idx;
void * pthread_surrogate_fn;