From patchwork Thu Apr 4 09:28:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 32161 Received: (qmail 15816 invoked by alias); 4 Apr 2019 09:28:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15540 invoked by uid 89); 4 Apr 2019 09:28:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-15.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=gr, gr=c3=bc=c3, LOADED, infrun?= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Apr 2019 09:28:57 +0000 Received: from svr-orw-mbx-05.mgc.mentorg.com ([147.34.90.205]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hByg2-0007RW-E6 from Thomas_Schwinge@mentor.com ; Thu, 04 Apr 2019 02:28:54 -0700 Received: from svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) by SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 4 Apr 2019 02:28:52 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) with Microsoft SMTP Server id 15.0.1320.4 via Frontend Transport; Thu, 4 Apr 2019 02:28:52 -0700 Received: by tftp-cs (Postfix, from userid 49978) id AD8BCC2322; Thu, 4 Apr 2019 02:28:51 -0700 (PDT) From: Thomas Schwinge To: Philippe Waroquiers , CC: Kevin Buettner Subject: Re: [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace In-Reply-To: <20190330095831.5616-1-philippe.waroquiers@skynet.be> References: <20190330095831.5616-1-philippe.waroquiers@skynet.be> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Thu, 4 Apr 2019 11:28:45 +0200 Message-ID: <87sguym84y.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Sat, 30 Mar 2019 10:58:31 +0100, Philippe Waroquiers wrote: > This patch [...] improves/factorises some wait kind traces. > --- a/gdb/gnu-nat.c > +++ b/gdb/gnu-nat.c > @@ -1647,15 +1647,9 @@ rewait: > inf_update_suspends (inf); > } > > - inf_debug (inf, "returning ptid = %s, status = %s (%d)", > + inf_debug (inf, "returning ptid = %s, %s", > target_pid_to_str (ptid).c_str (), > - status->kind == TARGET_WAITKIND_EXITED ? "EXITED" > - : status->kind == TARGET_WAITKIND_STOPPED ? "STOPPED" > - : status->kind == TARGET_WAITKIND_SIGNALLED ? "SIGNALLED" > - : status->kind == TARGET_WAITKIND_LOADED ? "LOADED" > - : status->kind == TARGET_WAITKIND_SPURIOUS ? "SPURIOUS" > - : "?", > - status->value.integer); > + target_waitstatus_to_string (&status).c_str ()); Thanks for that cleanup. I pushed the attached commit e9f8e3f109d57c119eaaa1e56378926f7f20863f "[GDB, Hurd] Fix build; 'target_waitstatus_to_string' call" to make it work. ;-) Grüße Thomas From e9f8e3f109d57c119eaaa1e56378926f7f20863f Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 4 Apr 2019 11:20:09 +0200 Subject: [PATCH] [GDB, Hurd] Fix build; 'target_waitstatus_to_string' call Recent commit c29705b71a8ec966478c0dc4712194a95291c6de removed an incomplete local implementation in favor of 'target_waitstatus_to_string' (thanks!), but introduced a small typing error: In file included from [...]/gdb/gnu-nat.c:24:0: [...]/gdb/gnu-nat.c: In member function 'virtual ptid_t gnu_nat_target::wait(ptid_t, target_waitstatus*, int)': [...]/gdb/gnu-nat.c:1652:43: error: cannot convert 'target_waitstatus**' to 'const target_waitstatus*' for argument '1' to 'std::__cxx11::string target_waitstatus_to_string(const target_waitstatus*)' target_waitstatus_to_string (&status).c_str ()); ^ [...]/gdb/gnu-nat.h:119:32: note: in definition of macro 'debug' __FILE__ , __LINE__ , ##args); } while (0) ^~~~ [...]/gdb/gnu-nat.c:1650:3: note: in expansion of macro 'inf_debug' inf_debug (inf, "returning ptid = %s, %s", ^~~~~~~~~ gdb/ * gnu-nat.c (gnu_nat_target::wait): Fix target_waitstatus_to_string call. --- gdb/ChangeLog | 5 +++++ gdb/gnu-nat.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aee0d967e1..4a49d32277 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-04-04 Thomas Schwinge + + * gnu-nat.c (gnu_nat_target::wait): Fix + target_waitstatus_to_string call. + 2019-04-01 Andrew Burgess * eval.c (evaluate_subexp_standard): Handle internal functions diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 654a652717..5eeac9270a 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -1649,7 +1649,7 @@ rewait: inf_debug (inf, "returning ptid = %s, %s", target_pid_to_str (ptid).c_str (), - target_waitstatus_to_string (&status).c_str ()); + target_waitstatus_to_string (status).c_str ()); return ptid; } -- 2.19.2