Skip to content

Commit

Permalink
Fix Linux powerpc use of struct pt_regs
Browse files Browse the repository at this point in the history
Requires using the Linux kernel header file ptrace.h.
Allows struct pt_regs to be used for accessing the
nip (Next Instruction Pointer) register value.
  • Loading branch information
okeuday committed Dec 8, 2021
1 parent 8723507 commit 4bec538
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backward.hpp
Expand Up @@ -211,6 +211,12 @@
#else
#include <link.h>
#endif
#if defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || \
defined(__POWERPC__)
// Linux kernel header required for the struct pt_regs definition
// to access the NIP (Next Instruction Pointer) register value
#include <asm/ptrace.h>
#endif
#include <signal.h>
#include <sys/stat.h>
#include <syscall.h>
Expand Down

0 comments on commit 4bec538

Please sign in to comment.