+
+
+Here is the typical var arg probe that has been used in those tests. It saves
+the values expectes as parameters in global variables. The DO_MARK1_FORMAT
+define is used for probe registration to make sure that it will be connected
+with a marker that has a matching format string. Note that this checking is
+optional : the probe can register with a NULL format and afterward check itself
+the format string received in parameter dynamically.
+
+int value;
+void *ptr;
+
+#define DO_MARK1_FORMAT "%d %p"
+void do_mark1(const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ value = va_arg(ap, int);
+ ptr = va_arg(ap, void*);
+
+ va_end(ap);
+}
+
+
+Here is the disassembly of the probe :
+
+#define DO_MARK1_FORMAT "%d %p"
+void do_mark1(const char *format, ...)
+{
+ 0: 55 push %ebp
+ 1: 89 e5 mov %esp,%ebp
+ 3: 83 ec 04 sub $0x4,%esp
+ va_list ap;
+
+ va_start(ap, format);
+ value = va_arg(ap, int);
+ 6: 8b 45 0c mov 0xc(%ebp),%eax
+ 9: a3 00 00 00 00 mov %eax,0x0
+ ptr = va_arg(ap, void*);
+ e: 8b 45 10 mov 0x10(%ebp),%eax
+ 11: a3 00 00 00 00 mov %eax,0x0
+
+ va_end(ap);
+}
+ 16: c9 leave
+ 17: c3 ret
+
+