From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74717 invoked by alias); 1 Apr 2019 16:32:52 -0000 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 Received: (qmail 74633 invoked by uid 89); 1 Apr 2019 16:32:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=sk:handle_, traces, UD:gnu-nat.c, UD:infrun.c X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Apr 2019 16:32:50 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E95F0300318A; Mon, 1 Apr 2019 16:32:48 +0000 (UTC) Received: from f29-4.lan (ovpn-116-219.phx2.redhat.com [10.3.116.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B93C8601A5; Mon, 1 Apr 2019 16:32:48 +0000 (UTC) Date: Mon, 01 Apr 2019 16:32:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: Re: [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace Message-ID: <20190401093248.615b2c5c@f29-4.lan> In-Reply-To: <20190330095831.5616-1-philippe.waroquiers@skynet.be> References: <20190330095831.5616-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00005.txt.bz2 On Sat, 30 Mar 2019 10:58:31 +0100 Philippe Waroquiers wrote: > The test gdb.threads/watchthreads-reorder.exp verifies that the > 'set debug infrun 1' debug output does not crash GDB. > > Under high load, the test can still cause a GDB internal error (see details > below). > > This patch fixes this crash, and improves/factorises some wait kind traces. > > Tested on debian/amd64 + run one test with 'set debug infrun 1'. > > Changes compared to the first version: > * Handles the suggestions of Kevin to trace the relevant elements > of the wait status (this is done by calling target_waitstatus_to_string). > * Some other changes to factorise wait status tracing. > > Note that using target_waitstatus_to_string instead of the 'locally printed' > status kind strings means that debug trace that was using strings such as: > "EXITED" or "TARGET_WAITKIND_EXITED" > will now use what is printed by target_waitstatus_to_string e.g. > "exited". > > gdb/ChangeLog > 2019-03-30 Philippe Waroquiers > > * infrun.c (stop_all_threads): If debug_infrun, always > trace the wait status after wait_one, using > target_waitstatus_to_string and target_pid_to_str. > (handle_inferior_event): Replace various trace of > wait status kind by a single trace. > * gdb/gnu-nat.c (gnu_nat_target::wait): Replace local > wait status kind image by target_waitstatus_to_string. > * target/waitstatus.c (target_waitstatus_to_string): Fix > obsolete comment. Okay. Kevin