Skip to content

Commit 4924389

Browse files
authored
Merge pull request #248 from okeuday/powerpc-nip-register-fix
Fix Linux powerpc use of struct pt_regs
2 parents 8723507 + 4bec538 commit 4924389

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)