2005-04-17 06:20:36 +08:00
|
|
|
/* Copyright (C) 2003 - 2004 PathScale, Inc
|
|
|
|
* Released under the GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2005-05-06 07:15:25 +08:00
|
|
|
#include <user-offsets.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-05-06 07:15:25 +08:00
|
|
|
#define SC_OFFSET(name) \
|
|
|
|
printf("#define " #name \
|
|
|
|
"(sc) *((unsigned long *) &(((char *) (sc))[%d]))\n",\
|
|
|
|
name)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2005-05-06 07:15:25 +08:00
|
|
|
SC_OFFSET(SC_RBX);
|
|
|
|
SC_OFFSET(SC_RCX);
|
|
|
|
SC_OFFSET(SC_RDX);
|
|
|
|
SC_OFFSET(SC_RSI);
|
|
|
|
SC_OFFSET(SC_RDI);
|
|
|
|
SC_OFFSET(SC_RBP);
|
|
|
|
SC_OFFSET(SC_RAX);
|
|
|
|
SC_OFFSET(SC_R8);
|
|
|
|
SC_OFFSET(SC_R9);
|
|
|
|
SC_OFFSET(SC_R10);
|
|
|
|
SC_OFFSET(SC_R11);
|
|
|
|
SC_OFFSET(SC_R12);
|
|
|
|
SC_OFFSET(SC_R13);
|
|
|
|
SC_OFFSET(SC_R14);
|
|
|
|
SC_OFFSET(SC_R15);
|
|
|
|
SC_OFFSET(SC_IP);
|
|
|
|
SC_OFFSET(SC_SP);
|
|
|
|
SC_OFFSET(SC_CR2);
|
|
|
|
SC_OFFSET(SC_ERR);
|
|
|
|
SC_OFFSET(SC_TRAPNO);
|
|
|
|
SC_OFFSET(SC_CS);
|
|
|
|
SC_OFFSET(SC_FS);
|
|
|
|
SC_OFFSET(SC_GS);
|
|
|
|
SC_OFFSET(SC_EFLAGS);
|
|
|
|
SC_OFFSET(SC_SIGMASK);
|
2005-04-17 06:20:36 +08:00
|
|
|
#if 0
|
2005-05-06 07:15:25 +08:00
|
|
|
SC_OFFSET(SC_ORIG_RAX);
|
|
|
|
SC_OFFSET(SC_DS);
|
|
|
|
SC_OFFSET(SC_ES);
|
|
|
|
SC_OFFSET(SC_SS);
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|
|
|
|
return(0);
|
|
|
|
}
|