aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-28 22:35:18 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-28 22:35:18 +0000
commitf9dd88b41eb9e9315131ec5669b7eae3e1c9a015 (patch)
treef5b1ed6d999fb1396724b74050c44693e7378661 /gdb/config
parentc702007b17942a27590d2378470e937fe89373db (diff)
downloadgdb-f9dd88b41eb9e9315131ec5669b7eae3e1c9a015.zip
gdb-f9dd88b41eb9e9315131ec5669b7eae3e1c9a015.tar.gz
gdb-f9dd88b41eb9e9315131ec5669b7eae3e1c9a015.tar.bz2
* config/pa/xm-pa.h: New file.
* config/pa/xm-hppa{b,h}.h: Include it.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/pa/.Sanitize1
-rw-r--r--gdb/config/pa/xm-hppab.h2
-rw-r--r--gdb/config/pa/xm-hppah.h2
-rw-r--r--gdb/config/pa/xm-pa.h19
4 files changed, 24 insertions, 0 deletions
diff --git a/gdb/config/pa/.Sanitize b/gdb/config/pa/.Sanitize
index 77c2743..90fbe2d 100644
--- a/gdb/config/pa/.Sanitize
+++ b/gdb/config/pa/.Sanitize
@@ -32,6 +32,7 @@ tm-hppab.h
tm-hppah.h
xm-hppab.h
xm-hppah.h
+xm-pa.h
Things-to-lose:
diff --git a/gdb/config/pa/xm-hppab.h b/gdb/config/pa/xm-hppab.h
index a98f48d..b215d790 100644
--- a/gdb/config/pa/xm-hppab.h
+++ b/gdb/config/pa/xm-hppab.h
@@ -24,6 +24,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define HOST_BYTE_ORDER BIG_ENDIAN
+#include "pa/xm-pa.h"
+
/* Avoid "INT_MIN redefined" warnings -- by defining it here, exactly
the same as in the system <machine/machtypes.h> file. */
#undef INT_MIN
diff --git a/gdb/config/pa/xm-hppah.h b/gdb/config/pa/xm-hppah.h
index 9b64724..92092df 100644
--- a/gdb/config/pa/xm-hppah.h
+++ b/gdb/config/pa/xm-hppah.h
@@ -23,6 +23,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Host is big-endian. */
#define HOST_BYTE_ORDER BIG_ENDIAN
+#include "pa/xm-pa.h"
+
/* Avoid "INT_MIN redefined" warnings -- by defining it here, exactly
the same as in the system <machine/machtypes.h> file. */
#undef INT_MIN
diff --git a/gdb/config/pa/xm-pa.h b/gdb/config/pa/xm-pa.h
new file mode 100644
index 0000000..2a50725
--- /dev/null
+++ b/gdb/config/pa/xm-pa.h
@@ -0,0 +1,19 @@
+/* Definitions for all PA machines. */
+
+#define MAKEVA_START(list) \
+ list->argindex = list->nargs * list->max_arg_size;
+
+/* In addition to having the arguments passed with the first ones at the
+ highest memory addresses, the pa also apparently aligns each argument
+ to the size of that argument. This only works because the caller only
+ deals in 4 and 8 byte arguments. If we wanted to handle args > 8 bytes,
+ we would have to pass the address by reference. */
+#define MAKEVA_ARG(list, argaddr, argsize) \
+ list->argindex = (list->argindex - argsize) & ~ (argsize - 1); \
+ memcpy (&list->arg_bytes[list->argindex], argaddr, argsize);
+
+/* Apparently the address of the arglist is the address right after the args
+ (which is what you'd expect). */
+#define MAKEVA_END(list) \
+ return (va_list) (list->arg_bytes \
+ + list->nargs * list->max_arg_size)