From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8393 invoked by alias); 21 Jun 2013 17:25:20 -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 8286 invoked by uid 89); 21 Jun 2013 17:25:18 -0000 X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,TW_CP autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 21 Jun 2013 17:25:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5LHPHi0005406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Jun 2013 13:25:17 -0400 Received: from barimba.redhat.com (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5LHPBT1021447; Fri, 21 Jun 2013 13:25:16 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 09/16] push last_sent_signal into struct remote_state Date: Fri, 21 Jun 2013 17:25:00 -0000 Message-Id: <1371835506-15691-10-git-send-email-tromey@redhat.com> In-Reply-To: <1371835506-15691-1-git-send-email-tromey@redhat.com> References: <1371835506-15691-1-git-send-email-tromey@redhat.com> X-SW-Source: 2013-06/txt/msg00613.txt.bz2 This moves the global last_sent_signal into remote_state. * remote.c (struct remote_state) : New field. (last_sent_signal): Remove. (new_remote_state, remote_resume, remote_wait_as): Update. --- gdb/remote.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 9d57c27..19767bc 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -390,6 +390,8 @@ struct remote_state the target know about program signals list changes. */ char *last_program_signals_packet; + + enum gdb_signal last_sent_signal; }; /* Private data that we'll store in (struct thread_info)->private. */ @@ -436,6 +438,7 @@ new_remote_state (void) result->buf_size = 400; result->buf = xmalloc (result->buf_size); result->remote_traceframe_number = -1; + result->last_sent_signal = GDB_SIGNAL_0; return result; } @@ -4909,8 +4912,6 @@ remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal) /* Tell the remote machine to resume. */ -static enum gdb_signal last_sent_signal = GDB_SIGNAL_0; - static int last_sent_step; static void @@ -4929,7 +4930,7 @@ remote_resume (struct target_ops *ops, if (!non_stop) remote_notif_process (¬if_client_stop); - last_sent_signal = siggnal; + rs->last_sent_signal = siggnal; last_sent_step = step; /* The vCont packet doesn't need to specify threads via Hc. */ @@ -6021,15 +6022,15 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) break; case '\0': - if (last_sent_signal != GDB_SIGNAL_0) + if (rs->last_sent_signal != GDB_SIGNAL_0) { /* Zero length reply means that we tried 'S' or 'C' and the remote system doesn't support it. */ target_terminal_ours_for_output (); printf_filtered ("Can't send signals to this remote system. %s not sent.\n", - gdb_signal_to_name (last_sent_signal)); - last_sent_signal = GDB_SIGNAL_0; + gdb_signal_to_name (rs->last_sent_signal)); + rs->last_sent_signal = GDB_SIGNAL_0; target_terminal_inferior (); strcpy ((char *) buf, last_sent_step ? "s" : "c"); -- 1.8.1.4