[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] [PATCH 03/17] ppc32: add UNUSED attribute to dmy_c
From: |
Tommi Rantala |
Subject: |
Re: [Libunwind-devel] [PATCH 03/17] ppc32: add UNUSED attribute to dmy_ctxt |
Date: |
Sun, 16 Sep 2012 22:19:46 +0300 |
2012/9/15 Cody P Schafer <address@hidden>:
> ---
> src/ppc32/ucontext_i.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
> index ab21713..0fd60d9 100644
> --- a/src/ppc32/ucontext_i.h
> +++ b/src/ppc32/ucontext_i.h
> @@ -43,7 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE. */
>
> /* These are dummy structures used only for obtaining the offsets of the
> various structure members. */
> -static ucontext_t dmy_ctxt;
> +static ucontext_t dmy_ctxt UNUSED;
Cross-ppc32 build is complaining:
In file included from ../../libunwind/src/ppc32/Ginit.c:31,
from ../../libunwind/src/ppc32/Linit.c:4:
../../libunwind/src/ppc32/ucontext_i.h:46: error: expected '=', ',',
';', 'asm' or '__attribute__' before 'UNUSED'
../../libunwind/src/ptrace/_UPT_reg_offset.c:479: error:
'UNW_PPCb_FPSCR' undeclared here (not in a function)
../../libunwind/src/ptrace/_UPT_reg_offset.c:479: error: array index
in initializer not of integer type
../../libunwind/src/ptrace/_UPT_reg_offset.c:479: error: (near
initialization for '_UPT_reg_offset')
Does something like this look sane to you?
diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
index 0fd60d9..5a7c01d 100644
--- a/src/ppc32/ucontext_i.h
+++ b/src/ppc32/ucontext_i.h
@@ -26,6 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. */
#ifndef ucontext_i_h
#define ucontext_i_h
+#include "libunwind_i.h"
#include <ucontext.h>
/* These values were derived by reading
diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
index 82a0900..cb590bd 100644
--- a/src/ptrace/_UPT_reg_offset.c
+++ b/src/ptrace/_UPT_reg_offset.c
@@ -419,8 +419,8 @@ int _UPT_reg_offset[UNW_REG_LAST + 1] =
UNW_FP_OFF(b, 31)
#define UNW_PPC32_REGS \
- [UNW_PPC##b##_FPSCR] = UNW_PPC_PT(FPSCR), \
- [UNW_PPC##b##_CCR] = UNW_PPC_PT(CCR)
+ [UNW_PPC32_FPSCR] = UNW_PPC_PT(FPSCR), \
+ [UNW_PPC32_CCR] = UNW_PPC_PT(CCR)
#define UNW_VR_OFF(i) \
[UNW_PPC64_V##i] = UNW_PPC_R(PT_VR0 + i * 2)
- Re: [Libunwind-devel] [PATCH 14/17] configure: rename configure.in to configure.ac, (continued)
- [Libunwind-devel] [PATCH 11/17] UPT: Add reg offsets for ppc32/64, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 12/17] ppc64: be explicit in access_reg range check, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 17/17] ptrace: add more Debug to access_reg, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 13/17] ppc64: add FRAME_POINTER & NIP to regname., Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 15/17] ptrace/access_reg: print out register name on "bad register", Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 10/17] configure: use AC_ARG_ENABLE(arg, text, , custom-act), Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 03/17] ppc32: add UNUSED attribute to dmy_ctxt, Cody P Schafer, 2012/09/14
- Re: [Libunwind-devel] [PATCH 03/17] ppc32: add UNUSED attribute to dmy_ctxt,
Tommi Rantala <=
- [Libunwind-devel] [PATCH 09/17] configure: use AC_ARG_ENABLE's defaults when possible, Cody P Schafer, 2012/09/14