1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-05-19 03:25:18 +02:00
libunwind-eh_elf/src/tilegx/gen-offsets.c
Zhi-Gang Liu 790be1e40d Add TileGx platform support to libunwind.
"make check" passed.
======================================================
All 34 tests behaved as expected (2 expected failures)
======================================================
Zhi-Gang Liu @ Tilera
2014-09-08 16:21:53 -04:00

31 lines
658 B
C

#include <stdio.h>
#include <stddef.h>
#include <ucontext.h>
#define UC(N,X) \
printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
#define SC(N,X) \
printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
int
main (void)
{
printf (
"/* Linux-specific definitions: */\n\n"
"/* Define various structure offsets to simplify cross-compilation. */\n\n"
"/* Offsets for TILEGX Linux \"ucontext_t\": */\n\n");
UC ("FLAGS", uc_flags);
UC ("LINK", uc_link);
UC ("STACK", uc_stack);
UC ("MCONTEXT", uc_mcontext);
UC ("SIGMASK", uc_sigmask);
UC ("MCONTEXT_GREGS", uc_mcontext.gregs);
return 0;
}