From 19afdd0748702bde6de6951bb1d639701b622f89 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 19 Apr 2013 15:23:52 +0000 Subject: -Wpointer-sign: xtensa-tdep.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../../src/gdb/xtensa-tdep.c:2914:4: error: pointer targets in passing argument 7 of ‘xtensa_operand_get_field’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/xtensa-tdep.c:53:0: ../../src/gdb/../include/xtensa-isa.h:487:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/xtensa-tdep.c:2916:4: error: pointer targets in passing argument 4 of ‘xtensa_operand_decode’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/xtensa-tdep.c:53:0: ../../src/gdb/../include/xtensa-isa.h:507:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/xtensa-tdep.c:2918:4: error: pointer targets in passing argument 7 of ‘xtensa_operand_get_field’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/xtensa-tdep.c:53:0: ../../src/gdb/../include/xtensa-isa.h:487:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/xtensa-tdep.c:2920:4: error: pointer targets in passing argument 4 of ‘xtensa_operand_decode’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/xtensa-tdep.c:53:0: ../../src/gdb/../include/xtensa-isa.h:507:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/xtensa-tdep.c:2922:4: error: pointer targets in passing argument 7 of ‘xtensa_operand_get_field’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/xtensa-tdep.c:53:0: ../../src/gdb/../include/xtensa-isa.h:487:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/xtensa-tdep.c:2924:4: error: pointer targets in passing argument 4 of ‘xtensa_operand_decode’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/xtensa-tdep.c:53:0: ../../src/gdb/../include/xtensa-isa.h:507:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ Those bfd functions that decode instructions output uint32_t values. Hence this fix: 2013-04-19 Pedro Alves * xtensa-tdep.c (execute_l32e, execute_s32e): Change type of parameters 'at', 'as' and 'offset' to uint32_t. --- gdb/ChangeLog | 5 +++++ gdb/xtensa-tdep.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 39650bc..3cb8438 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-04-19 Pedro Alves + * xtensa-tdep.c (execute_l32e, execute_s32e): Change type of + parameters 'at', 'as' and 'offset' to uint32_t. + +2013-04-19 Pedro Alves + * aarch64-tdep.c (aarch64_analyze_prologue): Change type of local 'is64' to signed 'int'. diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 1eedee7..d9b1a45 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -2814,7 +2814,7 @@ execute_code (struct gdbarch *gdbarch, CORE_ADDR current_pc, CORE_ADDR wb) int fail = 0; void (*func) (struct gdbarch *, int, int, int, CORE_ADDR); - int at, as, offset; + uint32_t at, as, offset; /* WindowUnderflow12 = true, when inside _WindowUnderflow12. */ int WindowUnderflow12 = (current_pc & 0x1ff) >= 0x140; -- cgit v1.1