qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition


From: Daniel Henrique Barboza
Subject: Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition
Date: Mon, 14 Mar 2022 14:58:52 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2



On 3/14/22 14:25, Khem Raj wrote:
Fixes
../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: 
incomplete definition of type 'struct pt_regs'
     return uc->uc_mcontext.regs->nip;
            ~~~~~~~~~~~~~~~~~~~~^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
---
v2: Drop ifdef __powerpc__

  linux-user/include/host/ppc/host-signal.h | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/linux-user/include/host/ppc/host-signal.h 
b/linux-user/include/host/ppc/host-signal.h
index b80384d135..ec6166ed66 100644
--- a/linux-user/include/host/ppc/host-signal.h
+++ b/linux-user/include/host/ppc/host-signal.h
@@ -11,6 +11,9 @@
  #ifndef PPC_HOST_SIGNAL_H
  #define PPC_HOST_SIGNAL_H
+/* needed for pt_regs */
+#include <asm/ptrace.h>
+

I am intrigued about why we didn't hit this before, especially considering that 
ppc64 header is just a
pointer to this file.

I looked it up and didn't find why. This change seems harmless to me though.


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>




  /* The third argument to a SA_SIGINFO handler is ucontext_t. */
  typedef ucontext_t host_sigcontext;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]