# HG changeset patch # User andrew # Date 1316647926 -3600 # Node ID 0d7ef4460bc2f30ca4782d974a4fc4d7caec8a3e # Parent 1dd9b3d73b2230e28c3b7926bb18a1f73d79ce33 Include definitions of pt_regs for SPARC 32/64-bit directly due to varying header locations. diff -r 1dd9b3d73b22 -r 0d7ef4460bc2 agent/src/os/linux/libproc.h --- a/agent/src/os/linux/libproc.h Wed Aug 03 10:25:33 2011 +0200 +++ b/agent/src/os/linux/libproc.h Thu Sep 22 00:32:06 2011 +0100 @@ -36,9 +36,34 @@ These two files define pt_regs structure differently */ #ifdef _LP64 -#include "asm-sparc64/ptrace.h" +struct pt_regs { + unsigned long u_regs[16]; /* globals and ins */ + unsigned long tstate; + unsigned long tpc; + unsigned long tnpc; + unsigned int y; + + /* We encode a magic number, PT_REGS_MAGIC, along + * with the %tt (trap type) register value at trap + * entry time. The magic number allows us to identify + * accurately a trap stack frame in the stack + * unwinder, and the %tt value allows us to test + * things like "in a system call" etc. for an arbitray + * process. + * + * The PT_REGS_MAGIC is chosen such that it can be + * loaded completely using just a sethi instruction. + */ + unsigned int magic; +}; #else -#include "asm-sparc/ptrace.h" +struct pt_regs { + unsigned long psr; + unsigned long pc; + unsigned long npc; + unsigned long y; + unsigned long u_regs[16]; /* globals and ins */ +}; #endif #endif //sparc or sparcv9