This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Multi-architecture debugging regression (Re: performance of multithreading gets gradually worse under gdb)
- From: Pedro Alves <pedro at codesourcery dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 26 Oct 2011 18:20:12 +0100
- Subject: Re: [patch] Multi-architecture debugging regression (Re: performance of multithreading gets gradually worse under gdb)
- References: <201110261714.p9QHEBT8020920@d06av02.portsmouth.uk.ibm.com>
On Wednesday 26 October 2011 18:14:11, Ulrich Weigand wrote:
> Pedro Alves wrote:
> > 2011-02-04 Pedro Alves <firstname.lastname@example.org>
> > gdb/
> > * regcache.c (registers_changed_ptid): Don't explictly always
> > clear `current_regcache'. Only clear current_thread_ptid and
> > current_thread_arch when PTID matches. Only reinit the frame
> > cache if PTID matches the current inferior_ptid. Move alloca(0)
> > call to ...
> > (registers_changed): ... here.
> It seems this patch broke multi-architecture debugging on Cell/B.E. since
> the cached thread architecture is sometimes not invalidated when it should
> be. This happens when resume is called with a PTID that refers to all
> threads of a process.
> The problem is that your patch specifically handles PTIDs that refer to
> one particular thread, and also handles a wildcard PTID that refers to
> all threads of all processes. But it does not handle PTIDs that refer
> to all threads of one single process.
> I think the code should simply use ptid_match here (as is already done
> elsewhere, even in this same function). This fixes the problem on
> Cell/B.E. for me ...
> Tested on powerpc-linux (Cell/B.E.).
> Does this look OK to you?