This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Multi-threaded watchpoints, GNU/Linux native bits
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 2 Oct 2007 18:42:40 +0200 (CEST)
- Subject: Re: [rfc] Multi-threaded watchpoints, GNU/Linux native bits
Daniel Jacobowitz wrote:
> - last_stopped_data_address = (uintptr_t) siginfo.si_addr;
> + *addr_p = (CORE_ADDR) siginfo_p->si_addr;
This causes a warning (and build break) when pointers are 32-bit
but CORE_ADDR is 64-bit. Fixed by adding back a cast to uintptr_t.
Committed to mainline.
Bye,
Ulrich
ChangeLog:
* ppc-linux-nat.c (ppc_linux_stopped_data_address): Cast
pointer to uintptr_t before casting to CORE_ADDR.
Index: gdb/ppc-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
retrieving revision 1.71
diff -c -p -r1.71 ppc-linux-nat.c
*** gdb/ppc-linux-nat.c 1 Oct 2007 00:22:50 -0000 1.71
--- gdb/ppc-linux-nat.c 2 Oct 2007 16:37:19 -0000
*************** ppc_linux_stopped_data_address (struct t
*** 869,875 ****
|| (siginfo_p->si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
return 0;
! *addr_p = (CORE_ADDR) siginfo_p->si_addr;
return 1;
}
--- 869,875 ----
|| (siginfo_p->si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
return 0;
! *addr_p = (CORE_ADDR) (uintptr_t) siginfo_p->si_addr;
return 1;
}
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com