From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4885 invoked by alias); 20 Oct 2009 10:02:33 -0000 Received: (qmail 4719 invoked by uid 22791); 20 Oct 2009 10:02:32 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Oct 2009 10:02:26 +0000 Received: (qmail 27688 invoked from network); 20 Oct 2009 10:02:24 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Oct 2009 10:02:24 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: [BUG/discussion] set scheduler-locking on get internal-error(maybe about multi-inferior) Date: Tue, 20 Oct 2009 15:31:00 -0000 User-Agent: KMail/1.9.10 Cc: Hui Zhu References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910201102.18781.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00317.txt.bz2 On Tuesday 20 October 2009 08:56:08, Hui Zhu wrote: > Hi guys, > > I got some error with multi-thread and low arch-linux-nat. I > reproduced it in i386-linux, I am not sure it affect other arch or > not. Thanks. > (gdb) set scheduler-locking on > (gdb) si > ../../src/gdb/target.c:2567: internal-error: Can't determine the > current address space of thread process 16277 > The bug issue is: > In linux-nat.c:linux_nat_resume > /* Convert to something the lower layer understands. */ > ptid = pid_to_ptid (GET_LWP (lp->ptid)); > > > In i386-linux-nat.c:i386_linux_resume > int pid = PIDGET (ptid); > struct regcache *regcache = get_thread_regcache (pid_to_ptid (pid)); > > The pid in i386_linux_resume is lwp, get_thread_regcache will not get > the right ptid. Right. > > I don't have any good idea with this bug. There is too much "int pid > = PIDGET (ptid);" In arch-linux-nat function. I am not sure it can > really work well with multi-inferior. This level code looks don't > have good way if the ptid is get from " ptid = pid_to_ptid (GET_LWP > (lp->ptid));". I'm testing a patch. -- Pedro Alves