Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
	<gdb-patches@sourceware.org>
Cc: Kevin Buettner <kevinb@redhat.com>
Subject: Re: [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace
Date: Thu, 04 Apr 2019 09:28:00 -0000	[thread overview]
Message-ID: <87sguym84y.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <20190330095831.5616-1-philippe.waroquiers@skynet.be>

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

Hi!

On Sat, 30 Mar 2019 10:58:31 +0100, Philippe Waroquiers <philippe.waroquiers@skynet.be> 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



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-GDB-Hurd-Fix-build-target_waitstatus_to_string-call.patch --]
[-- Type: text/x-diff, Size: 2172 bytes --]

From e9f8e3f109d57c119eaaa1e56378926f7f20863f Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
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  <thomas@codesourcery.com>
+
+	* gnu-nat.c (gnu_nat_target::wait): Fix
+	target_waitstatus_to_string call.
+
 2019-04-01  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* 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


  parent reply	other threads:[~2019-04-04  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30  9:58 Philippe Waroquiers
2019-04-01 16:32 ` Kevin Buettner
2019-04-01 19:05   ` Philippe Waroquiers
2019-09-11 17:05     ` Tom de Vries
2019-09-12 11:30       ` Kevin Buettner
     [not found]         ` <ed07a975-d5f9-76f2-863f-2d66593b49d9@suse.de>
2019-09-12 17:15           ` [PATCH, 8.3][gdb/testsuite] Mark watchthreads-reorder.exp FAIL as KFAIL Tom de Vries
2019-04-04  9:28 ` Thomas Schwinge [this message]
2019-04-05 21:21   ` [RFAv2] Fix internal error and improve 'set debug infrun 1'/target wait kind trace Philippe Waroquiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sguym84y.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=philippe.waroquiers@skynet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox