aboutsummaryrefslogtreecommitdiff
path: root/fetch.h
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-09-13 17:12:41 +0200
committerPetr Machata <pmachata@redhat.com>2012-09-22 15:26:38 +0200
commite36298a706b96bfdf9335fbe8288827761d77957 (patch)
tree7d1f5bb3b93dcf18f6d32b3ad8d079f5121ba186 /fetch.h
parenta2e16c5cc8cc2343d40a44ac8b4d2230de9fc985 (diff)
downloadltrace-e36298a706b96bfdf9335fbe8288827761d77957.tar.gz
Introduce parameter pack flavors and parameter pack backend callbacks
The issue this is trying to solve is that some backends (Itanium in particular) change the parameter passing convention depending on whether given parameter is part of varargs parameter or not. Therefore the backend needs to know a) that any give argument is part of parameter pack, and b) if it is, whether it's a varargs-type pack, or something else. Backends that wish to use this should add #define ARCH_HAVE_FETCH_PACK and define functions arch_fetch_param_pack_{start,end} (with the same interface as fetch_param_pack_{start,end} from fetch.h).
Diffstat (limited to 'fetch.h')
-rw-r--r--fetch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fetch.h b/fetch.h
index 6a5385c..eeeef92 100644
--- a/fetch.h
+++ b/fetch.h
@@ -22,6 +22,7 @@
#define FETCH_H
#include "forward.h"
+#include "param.h"
/* XXX isn't SYSCALL TOF just a different ABI? Maybe we needed to
* support variant ABIs all along. */
@@ -61,4 +62,12 @@ int fetch_retval(struct fetch_context *context, enum tof type,
* that was passed to fetch_arg_next. */
void fetch_arg_done(struct fetch_context *context);
+/* Called before fetching arguments that come from parameter packs.
+ * Returns 0 on success or a negative value on failure. */
+int fetch_param_pack_start(struct fetch_context *context,
+ enum param_pack_flavor ppflavor);
+
+/* Called after a parameter pack has been fetched. */
+void fetch_param_pack_end(struct fetch_context *context);
+
#endif /* FETCH_H */