This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/gdbserver] Fix ppc64 bi-arch TLS bug


Daniel Jacbowitz wrote:
> On Wed, May 28, 2008 at 08:29:51PM +0200, Ulrich Weigand wrote:
> > Hello,
> > 
> > this fixes another bug in ppc64 bi-arch gdbserver support: the
> > ppc_collect_ptrace_register did not zero out the register buffer
> > (in the case of a 4-byte inferior register on a 64-bit host).
> > 
> > This doesn't matter for the main user of this function
> > (usr_store_inferior_registers in linux-low.c) which always
> > zeros the buffer itself before passing it in.
> > 
> > However, there is a second caller, ps_lgetregs in proc-service.c
> > (via the ppc_fill_gregset function) which does *not* zero the
> > buffer.  This could cause TLS access to fail in some instances
> > of 64->32 bit bi-arch debugging.
> > 
> > Fixed by simply always clearing the register buffer.
> > 
> > Tested on powerpc64-linux (-m64/-m32) and powerpc-linux using
> > local gdbserver.
> > 
> > OK for mainline?
> 
> OK.

Committed, thanks.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]