diff options
author | Pedro Alves <palves@redhat.com> | 2013-03-22 14:43:28 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-03-22 14:43:28 +0000 |
commit | a2213dca1813bee3244f7f948b26d0ef717ddb04 (patch) | |
tree | 3d4784f09c14580d0c13da7301014c5da732cbb4 /gdb/ChangeLog | |
parent | 84a2b3d8be541ad9a43411a9a9682698aed4a9d5 (diff) | |
download | gdb-a2213dca1813bee3244f7f948b26d0ef717ddb04.zip gdb-a2213dca1813bee3244f7f948b26d0ef717ddb04.tar.gz gdb-a2213dca1813bee3244f7f948b26d0ef717ddb04.tar.bz2 |
hppa-hpux-tdep.c: Fix host dependency.
$ make WERROR_CFLAGS="-Wpointer-sign -Werror" hppa-hpux-tdep.o -k 2>&1 1>/dev/null
../../src/gdb/hppa-hpux-tdep.c: In function ‘hppa_hpux_push_dummy_code’:
../../src/gdb/hppa-hpux-tdep.c:1225:7: error: pointer targets in passing argument 2 of ‘write_memory’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/hppa-hpux-tdep.c:22:0:
../../src/gdb/gdbcore.h:85:13: note: expected ‘const gdb_byte *’ but argument is of type ‘char *’
../../src/gdb/hppa-hpux-tdep.c:1251:7: error: pointer targets in passing argument 2 of ‘write_memory’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/hppa-hpux-tdep.c:22:0:
../../src/gdb/gdbcore.h:85:13: note: expected ‘const gdb_byte *’ but argument is of type ‘char *’
../../src/gdb/hppa-hpux-tdep.c: In function ‘hppa_hpux_supply_save_state’:
../../src/gdb/hppa-hpux-tdep.c:1354:9: error: pointer targets in passing argument 1 of ‘extract_unsigned_integer’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/hppa-hpux-tdep.c:20:0:
../../src/gdb/defs.h:675:22: note: expected ‘const gdb_byte *’ but argument is of type ‘const char *’
Casting to gdb_byte would fix it, however, writing an
unsigned int array like this
static unsigned int hppa64_tramp[] = {
0xeac0f000, /* bve,l (r22),%r2 */
0x0fdf12d1, /* std r31,-8(,sp) */
0x0fd110c2, /* ldd -8(,sp),rp */
0xe840d002, /* bve,n (rp) */
0x08000240 /* nop */
...
directly to target memory assumes the host endianness is the same as
the target's. hppa is big endian, so I believe this patch should be
correct -- it defines the array as a gdb_byte array. It uses a macro
to make the insn bytes a little more readable. I thought of using
write_memory_unsigned_integer once for each element of the unsigned
int array, but this way keeps issuing a single target memory write /
roundtrip for the whole trampoline.
gdb/
2013-03-22 Pedro Alves <palves@redhat.com>
* hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Define INSN macro,
use it to rewrite the trampoline buffers with type gdb_byte[], and
undefine the macro. Remove char* cast.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 779e306..7b5bb6c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-03-22 Pedro Alves <palves@redhat.com> + + * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Define INSN macro, + use it to rewrite the trampoline buffers with type gdb_byte[], and + undefine the macro. Remove char* cast. + 2013-03-21 Doug Evans <dje@google.com> New commands "mt set per-command {space,time,symtab} {on,off}". |