#include "libebl_PERF_FLAGS.h"
#if (defined __i386__ || defined __x86_64__) && defined(__linux__)
# include "x86_initreg_sample.c"
+# define HAVE_X86_INITREG_SAMPLE
#endif
bool
const int *regs_mapping, uint32_t n_regs_mapping,
Dwarf_Word *sp, Dwarf_Word *pc)
{
+#ifdef HAVE_X86_INITREG_SAMPLE
/* XXX for dwarf_regs indices, compare i386_initreg.c */
return x86_sample_sp_pc (regs, n_regs, regs_mapping, n_regs_mapping,
sp, 4 /* index of sp in dwarf_regs */,
pc, 8 /* index of pc in dwarf_regs */);
+#else
+ return false;
+#endif
}
bool
const int **regs_mapping,
size_t *n_regs_mapping)
{
+#ifdef HAVE_X86_INITREG_SAMPLE
return x86_sample_perf_regs_mapping (ebl, perf_regs_mask, abi,
regs_mapping, n_regs_mapping);
+#else
+ return false;
+#endif
}
#include "libebl_PERF_FLAGS.h"
#if defined(__x86_64__) && defined(__linux__)
# include "x86_initreg_sample.c"
+# define HAVE_X86_INITREG_SAMPLE
#endif
bool
const int *regs_mapping, uint32_t n_regs_mapping,
Dwarf_Word *sp, Dwarf_Word *pc)
{
+#ifdef HAVE_X86_INITREG_SAMPLE
/* XXX for dwarf_regs indices, compare x86_64_initreg.c */
return x86_sample_sp_pc (regs, n_regs, regs_mapping, n_regs_mapping,
sp, 7 /* index of sp in dwarf_regs */,
pc, 16 /* index of pc in dwarf_regs */);
+#else
+ return false;
+#endif
}
bool
const int **regs_mapping,
size_t *n_regs_mapping)
{
+#ifdef HAVE_X86_INITREG_SAMPLE
return x86_sample_perf_regs_mapping (ebl, perf_regs_mask, abi,
regs_mapping, n_regs_mapping);
+#else
+ return false;
+#endif
}