mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
gdb.trace: Fix write_inferior_data_ptr on 32-bit big-endian machines.
Noticed and tested on 31-bit s390. This bug caused completely broken fast tracepoints. gdb/gdbserver/ChangeLog: * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that it works properly on big-endian machines where sizeof (CORE_ADDR) != sizeof (void *).
This commit is contained in:
parent
1ac78c0444
commit
99e8eb11cf
@ -1,3 +1,9 @@
|
||||
2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
|
||||
|
||||
* tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
|
||||
it works properly on big-endian machines where sizeof (CORE_ADDR)
|
||||
!= sizeof (void *).
|
||||
|
||||
2016-01-21 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
|
||||
|
@ -5931,14 +5931,15 @@ compile_tracepoint_condition (struct tracepoint *tpoint,
|
||||
*jump_entry += 16;
|
||||
}
|
||||
|
||||
/* We'll need to adjust these when we consider bi-arch setups, and big
|
||||
endian machines. */
|
||||
/* We'll need to adjust these when we consider bi-arch setups. */
|
||||
|
||||
static int
|
||||
write_inferior_data_ptr (CORE_ADDR where, CORE_ADDR ptr)
|
||||
{
|
||||
uintptr_t pptr = ptr;
|
||||
|
||||
return write_inferior_memory (where,
|
||||
(unsigned char *) &ptr, sizeof (void *));
|
||||
(unsigned char *) &pptr, sizeof pptr);
|
||||
}
|
||||
|
||||
/* The base pointer of the IPA's heap. This is the only memory the
|
||||
|
Loading…
Reference in New Issue
Block a user