From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24498 invoked by alias); 24 Jun 2008 12:58:50 -0000 Received: (qmail 24472 invoked by uid 22791); 24 Jun 2008 12:58:49 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jun 2008 12:58:24 +0000 Received: (qmail 30405 invoked from network); 24 Jun 2008 12:58:22 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Jun 2008 12:58:22 -0000 From: Pedro Alves To: gdb@sourceware.org, Dmitry Smirnov Subject: Re: How to catch GDB crash Date: Tue, 24 Jun 2008 12:58:00 -0000 User-Agent: KMail/1.9.9 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200806241358.20877.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: 2008-06/txt/msg00239.txt.bz2 A Tuesday 24 June 2008 13:38:48, Dmitry Smirnov wrote: > #3 =9A0x0040b6f6 in internal_error (file=3D0x62380b ".././gdb/mi/mi-inter= p.c", > =9A =9A line=3D340, string=3D0x6237ed "%s: Assertion `%s' failed.") at ut= ils.c:818 > #4 =9A0x0048cfec in mi_on_resume (ptid=3D{pid =3D 42000, lwp =3D 0, tid = =3D 0}) > =9A =9A at .././gdb/mi/mi-interp.c:340 42000 looks a lot like remote.c:MAGIC_NULL_PID, and it wasn't on the thread list at this point: static void mi_on_resume (ptid_t ptid) { if (PIDGET (ptid) =3D=3D -1) fprintf_unfiltered (raw_stdout, "*running,thread-id=3D\"all\"\n"); else { struct thread_info *ti =3D find_thread_pid (ptid); gdb_assert (ti); <<<<<<<<<<<< assert here fprintf_unfiltered (raw_stdout, "*running,thread-id=3D\"%d\"\n", ti->= num); } } And, it looks like your stub does not implement any thread support? It seems we either need to make sure remote.c always registers a thread, or remove that assert. I would prefer the former, as it's a requirement to getting rid of context switching on the core side. --=20 Pedro Alves