Skip to content

Commit 4bec538

Browse files
committed
Fix Linux powerpc use of struct pt_regs
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.
1 parent 8723507 commit 4bec538

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

backward.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@
211211
#else
212212
#include <link.h>
213213
#endif
214+
#if defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || \
215+
defined(__POWERPC__)
216+
// Linux kernel header required for the struct pt_regs definition
217+
// to access the NIP (Next Instruction Pointer) register value
218+
#include <asm/ptrace.h>
219+
#endif
214220
#include <signal.h>
215221
#include <sys/stat.h>
216222
#include <syscall.h>

0 commit comments

Comments
 (0)