From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11524 invoked by alias); 9 Jul 2008 10:31:49 -0000 Received: (qmail 11516 invoked by uid 22791); 9 Jul 2008 10:31: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; Wed, 09 Jul 2008 10:31:22 +0000 Received: (qmail 24903 invoked from network); 9 Jul 2008 10:31:20 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Jul 2008 10:31:20 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Don't try to report =?utf-8?q?=09resumed_thread_it_the_thread_list_is?= empty. Date: Wed, 09 Jul 2008 10:31:00 -0000 User-Agent: KMail/1.9.9 Cc: Vladimir Prus References: <200807052158.30295.vladimir@codesourcery.com> In-Reply-To: <200807052158.30295.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807091131.22424.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00128.txt.bz2 A Saturday 05 July 2008 18:58:29, Vladimir Prus wrote: > I've checked in the below to make GDB not assert in MI mode on > targets where single-threaded programs have zero threads in the > GDB thread table. > FYI, running the MI testsuite on a target that doesn't register the main thread in ST programs, has failures that look like: -exec-continue ^running *running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",thread-id="0",frame={addr="0x000087e0",func="do_special_tests",args=[],file="../../../src/gdb/testsuite/gdb.mi/var-cmd.c",fullname="/home/pedro/gdb/monitor_always_a_thread/src/gdb/testsuite/gdb.mi/var-cmd.c",line="319"} (gdb) FAIL: gdb.mi/mi2-var-display.exp: continue to do_special_tests (failed to resume) I believe the issue is that in lib/mi-support.exp, *running matching assumes there is -thread-id field -re "220\\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n$mi_gdb_prompt$" {} I notice that there are other places that are outputing -thread-id="0", e.g.: *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",thread-id="0",frame={addr="0x000087e0",func="do_special_tests",args=[],file="../../../src/gdb/testsuite/gdb.mi/var-cmd.c",fullname="/home/pedro/gdb/monitor_always_a_thread/src/gdb/testsuite/gdb.mi/var-cmd.c",line="319"} (gdb) So maybe we should make this consistent, and output -thread-id="0" in *running as well? -- Pedro Alves