From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id D7745384800A for ; Fri, 4 Jun 2021 16:19:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D7745384800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x436.google.com with SMTP id u7so4434939wrs.10 for ; Fri, 04 Jun 2021 09:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9uABmS7R5dF8balc02JfNlr6J5viLjjPJLxI+ENY7FM=; b=HWxbrCqRIZcASQ/1IjdHJO57TUusBy90W2qkbd7WF2jzAbTi01eW/5WUTwRmHVg6mS if7ytSz2FMfemDk0AQGnvWIdl/Kr1EOs67vh07BQ6ZHjOIeFQiYHQy7ShJPxQESIq4kk E1Td4Ser9d9uFh887Sjf0QECl8XFi1+zt8+NJ+X0os/Cg5kNKEO1HcFXHQDfMSMVTvEk UszjiUbA8SqqF7Dz9hQFwixAk+PGvwqYp/c0AknKSmbJFq9ts+RweTaZXNqPPWY8SwNd T4VeH4l2ZFL1Jqg0kNUmaPsNJElP553yo8qu1iaBB7tNJg3dKTaTZ3ahgbrVgeSaqX52 a3CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9uABmS7R5dF8balc02JfNlr6J5viLjjPJLxI+ENY7FM=; b=IajODf3NA8CLWwxwMb86tDjFki1Gk3DioN6yCWJSXxh1GJQwR6uq7iHrhrOKd9SQKa RPlZmb5LfgKOX74B1szjaMSJG7hP5n0FOH7i+RXtHnSU6as9vL31Y0qGv+lxEJ+krsDY KsVPqrB0WXDcu0IpvJxQr6v8AfYpRblBg2iy/bdYexZaPJ59MGVdA8p2VgtZILTywSzB O2YUeIvgE193LCDK3O0NLRoQu93RC6eJBweyDhT3P4bGxjgB94tKv1WtZpbqqYAkPP1L ClLqpyL0HcFmN6ingTZcRoEbY6b3JYEdYoIUvkrbnRWhm0Za/SlLIAQRnr1i9zyx1Zq3 jCsQ== X-Gm-Message-State: AOAM5302FJOV7h1itP7DI6YbIpt92pQg+xLXCvj6R4eIYlYvE3S11KFL gm/RQjH+XWK6UO4Yx4ZnLAaltjcuFyWDQw== X-Google-Smtp-Source: ABdhPJyC4A3z8a4UOsgJuvrVlVgfg97+7ON8BiERmfNgoB8OaCWVU+ovLKveJQjQlMAwEFu+sNA/UA== X-Received: by 2002:a5d:64a3:: with SMTP id m3mr4725078wrp.172.1622823559592; Fri, 04 Jun 2021 09:19:19 -0700 (PDT) Received: from localhost (host109-151-46-70.range109-151.btcentralplus.com. [109.151.46.70]) by smtp.gmail.com with ESMTPSA id q5sm6063034wmc.0.2021.06.04.09.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 09:19:19 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PUSHED] gdb: add some additional debug output in remote.c Date: Fri, 4 Jun 2021 17:19:16 +0100 Message-Id: <20210604161916.410444-1-andrew.burgess@embecosm.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2021 16:19:31 -0000 I needed more debug output from: remote_target::select_thread_for_ambiguous_stop_reply I thought this would be useful for others too. gdb/ChangeLog: * remote.c (remote_target) : Add additional debug output. --- gdb/ChangeLog | 6 ++++++ gdb/remote.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gdb/remote.c b/gdb/remote.c index 9b465d77343..de04aab43dc 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7934,12 +7934,16 @@ ptid_t remote_target::select_thread_for_ambiguous_stop_reply (const struct target_waitstatus *status) { + REMOTE_SCOPED_DEBUG_ENTER_EXIT; + /* Some stop events apply to all threads in an inferior, while others only apply to a single thread. */ bool process_wide_stop = (status->kind == TARGET_WAITKIND_EXITED || status->kind == TARGET_WAITKIND_SIGNALLED); + remote_debug_printf ("process_wide_stop = %d", process_wide_stop); + thread_info *first_resumed_thread = nullptr; bool ambiguous = false; @@ -7959,6 +7963,10 @@ remote_target::select_thread_for_ambiguous_stop_reply ambiguous = true; } + remote_debug_printf ("first resumed thread is %s", + pid_to_str (first_resumed_thread->ptid).c_str ()); + remote_debug_printf ("is this guess ambiguous? = %d", ambiguous); + gdb_assert (first_resumed_thread != nullptr); /* Warn if the remote target is sending ambiguous stop replies. */ -- 2.25.4