Add type.c/.h, value.c/.h, value_dict.c/.h
- none of this is plugged in yet
- expr.c/.h is not in yet, so we still express array length with len_spec
integer. Some function are mocked out so the thing compiles
diff --git a/sysdeps/linux-gnu/alpha/trace.c b/sysdeps/linux-gnu/alpha/trace.c
index 18fe395..3c15664 100644
--- a/sysdeps/linux-gnu/alpha/trace.c
+++ b/sysdeps/linux-gnu/alpha/trace.c
@@ -48,7 +48,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
if (arg_num == -1) { /* return value */
return ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0);
}
diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c
index 768e1a8..8cf5560 100644
--- a/sysdeps/linux-gnu/arm/trace.c
+++ b/sysdeps/linux-gnu/arm/trace.c
@@ -82,7 +82,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
proc_archdep *a = (proc_archdep *) proc->arch_ptr;
if (arg_num == -1) { /* return value */
diff --git a/sysdeps/linux-gnu/cris/trace.c b/sysdeps/linux-gnu/cris/trace.c
index b2b1ba8..2e7c586 100644
--- a/sysdeps/linux-gnu/cris/trace.c
+++ b/sysdeps/linux-gnu/cris/trace.c
@@ -51,7 +51,8 @@
return 0;
}
-long gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info)
+long gimme_arg(enum tof type, Process *proc, int arg_num,
+ struct arg_type_info *info)
{
int pid = proc->pid;
diff --git a/sysdeps/linux-gnu/i386/trace.c b/sysdeps/linux-gnu/i386/trace.c
index f0c1e50..d024bc9 100644
--- a/sysdeps/linux-gnu/i386/trace.c
+++ b/sysdeps/linux-gnu/i386/trace.c
@@ -57,7 +57,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
if (arg_num == -1) { /* return value */
return ptrace(PTRACE_PEEKUSER, proc->pid, 4 * EAX, 0);
}
diff --git a/sysdeps/linux-gnu/ia64/trace.c b/sysdeps/linux-gnu/ia64/trace.c
index 385fac1..0ef1e60 100644
--- a/sysdeps/linux-gnu/ia64/trace.c
+++ b/sysdeps/linux-gnu/ia64/trace.c
@@ -13,6 +13,7 @@
#include "proc.h"
#include "common.h"
+#include "type.h"
/* What we think of as a bundle, ptrace thinks of it as two unsigned
* longs */
@@ -245,7 +246,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
union {
long l;
float f;
diff --git a/sysdeps/linux-gnu/m68k/trace.c b/sysdeps/linux-gnu/m68k/trace.c
index c63702d..b15e47d 100644
--- a/sysdeps/linux-gnu/m68k/trace.c
+++ b/sysdeps/linux-gnu/m68k/trace.c
@@ -47,7 +47,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
if (arg_num == -1) { /* return value */
return ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_D0, 0);
}
diff --git a/sysdeps/linux-gnu/mipsel/trace.c b/sysdeps/linux-gnu/mipsel/trace.c
index 4b999e4..2c509d9 100644
--- a/sysdeps/linux-gnu/mipsel/trace.c
+++ b/sysdeps/linux-gnu/mipsel/trace.c
@@ -9,6 +9,7 @@
#include "proc.h"
#include "common.h"
#include "mipsel.h"
+#include "type.h"
#if (!defined(PTRACE_PEEKUSER) && defined(PTRACE_PEEKUSR))
# define PTRACE_PEEKUSER PTRACE_PEEKUSR
#endif
@@ -118,7 +119,8 @@
*/
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
long ret;
long addr;
debug(2,"type %d arg %d",type,arg_num);
diff --git a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c
index 742785a..18eb92e 100644
--- a/sysdeps/linux-gnu/ppc/trace.c
+++ b/sysdeps/linux-gnu/ppc/trace.c
@@ -13,6 +13,7 @@
#include "common.h"
#include "ptrace.h"
#include "breakpoint.h"
+#include "type.h"
#if (!defined(PTRACE_PEEKUSER) && defined(PTRACE_PEEKUSR))
# define PTRACE_PEEKUSER PTRACE_PEEKUSR
@@ -67,7 +68,8 @@
}
static long
-gimme_arg_regset(enum tof type, Process *proc, int arg_num, arg_type_info *info,
+gimme_arg_regset(enum tof type, Process *proc, int arg_num,
+ struct arg_type_info *info,
gregset_t *regs, fpregset_t *fpregs)
{
union { long val; float fval; double dval; } cvt;
@@ -110,7 +112,7 @@
}
static long
-gimme_retval(Process *proc, int arg_num, arg_type_info *info,
+gimme_retval(Process *proc, int arg_num, struct arg_type_info *info,
gregset_t *regs, fpregset_t *fpregs)
{
union { long val; float fval; double dval; } cvt;
@@ -130,7 +132,7 @@
/* Grab functions arguments based on the PPC64 ABI. */
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info)
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
{
proc_archdep *arch = (proc_archdep *)proc->arch_ptr;
if (arch == NULL || !arch->valid)
@@ -173,7 +175,9 @@
/* Read a single long from the process's memory address 'addr'. */
int
-arch_umovelong (Process *proc, void *addr, long *result, arg_type_info *info) {
+arch_umovelong (Process *proc, void *addr, long *result,
+ struct arg_type_info *info)
+{
long pointed_to;
errno = 0;
diff --git a/sysdeps/linux-gnu/s390/trace.c b/sysdeps/linux-gnu/s390/trace.c
index 8c08f1f..6660b18 100644
--- a/sysdeps/linux-gnu/s390/trace.c
+++ b/sysdeps/linux-gnu/s390/trace.c
@@ -161,7 +161,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
long ret;
switch (arg_num) {
diff --git a/sysdeps/linux-gnu/sparc/trace.c b/sysdeps/linux-gnu/sparc/trace.c
index e05c4d3..04efdf2 100644
--- a/sysdeps/linux-gnu/sparc/trace.c
+++ b/sysdeps/linux-gnu/sparc/trace.c
@@ -45,7 +45,8 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num, struct arg_type_info *info)
+{
proc_archdep *a = (proc_archdep *) proc->arch_ptr;
if (!a->valid) {
fprintf(stderr, "Could not get child registers\n");
diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c
index bd5d826..f573f22 100644
--- a/sysdeps/linux-gnu/trace.c
+++ b/sysdeps/linux-gnu/trace.c
@@ -19,6 +19,7 @@
#include "breakpoint.h"
#include "proc.h"
#include "linux-gnu/trace.h"
+#include "type.h"
/* If the system headers did not provide the constants, hard-code the normal
values. */
@@ -50,13 +51,14 @@
#ifdef ARCH_HAVE_UMOVELONG
extern int arch_umovelong (Process *, void *, long *, arg_type_info *);
int
-umovelong (Process *proc, void *addr, long *result, arg_type_info *info) {
+umovelong(Process *proc, void *addr, long *result, arg_type_info *info) {
return arch_umovelong (proc, addr, result, info);
}
#else
/* Read a single long from the process's memory address 'addr' */
int
-umovelong (Process *proc, void *addr, long *result, arg_type_info *info) {
+umovelong(Process *proc, void *addr, long *result, struct arg_type_info *info)
+{
long pointed_to;
errno = 0;
@@ -66,7 +68,7 @@
*result = pointed_to;
if (info) {
- switch(info->type) {
+ switch (info->type) {
case ARGTYPE_INT:
*result &= 0x00000000ffffffffUL;
default:
diff --git a/sysdeps/linux-gnu/x86_64/trace.c b/sysdeps/linux-gnu/x86_64/trace.c
index 0d3f693..ec53bfc 100644
--- a/sysdeps/linux-gnu/x86_64/trace.c
+++ b/sysdeps/linux-gnu/x86_64/trace.c
@@ -13,6 +13,7 @@
#include "common.h"
#include "ptrace.h"
#include "proc.h"
+#include "type.h"
#if (!defined(PTRACE_PEEKUSER) && defined(PTRACE_PEEKUSR))
# define PTRACE_PEEKUSER PTRACE_PEEKUSR
@@ -112,7 +113,7 @@
}
static long
-gimme_arg_regset(Process *proc, int arg_num, arg_type_info *info,
+gimme_arg_regset(Process *proc, int arg_num, struct arg_type_info *info,
struct user_regs_struct *regs,
struct user_fpregs_struct *fpregs)
{
@@ -148,7 +149,7 @@
}
}
static long
-gimme_retval(Process *proc, int arg_num, arg_type_info *info,
+gimme_retval(Process *proc, int arg_num, struct arg_type_info *info,
struct user_regs_struct *regs, struct user_fpregs_struct *fpregs)
{
if (info->type == ARGTYPE_FLOAT || info->type == ARGTYPE_DOUBLE)
@@ -158,7 +159,9 @@
}
long
-gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
+gimme_arg(enum tof type, Process *proc, int arg_num,
+ struct arg_type_info *info)
+{
if (proc->mask_32bit)
return (unsigned int)gimme_arg32(type, proc, arg_num);