From patchwork Mon Nov 2 19:36:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 9508 Received: (qmail 30316 invoked by alias); 2 Nov 2015 19:43:15 -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 30305 invoked by uid 89); 2 Nov 2015 19:43:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 02 Nov 2015 19:43:13 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 2413AC1C74E4 for ; Mon, 2 Nov 2015 19:36:21 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA2JaAQ2009459 for ; Mon, 2 Nov 2015 14:36:20 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 09/11] [C++/mingw] handle_output_debug_string Date: Mon, 2 Nov 2015 19:36:08 +0000 Message-Id: <1446492970-21432-10-git-send-email-palves@redhat.com> In-Reply-To: <1446492970-21432-1-git-send-email-palves@redhat.com> References: <1446492970-21432-1-git-send-email-palves@redhat.com> Fixes: ../../../src/gdb/gdbserver/win32-low.c: In function 'int win32_kill(int)': ../../../src/gdb/gdbserver/win32-low.c:823:46: error: invalid conversion from 'int' to 'target_waitkind' [-fpermissive] struct target_waitstatus our_status = { 0 }; ^ handle_output_debug_string doesn't use the parameter for anything (it's an output parameter in the gdb version), so just remove it. gdb/gdbserver/ChangeLog: 2015-11-01 Pedro Alves * win32-low.c (handle_output_debug_string): Remove parameter. (win32_kill): Remove our_status local and adjust call to handle_output_debug_string. (get_child_debug_event): Adjust call to handle_output_debug_string. --- gdb/gdbserver/win32-low.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index 2b40ca3..b1a2e56 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -747,7 +747,7 @@ win32_attach (unsigned long pid) /* Handle OUTPUT_DEBUG_STRING_EVENT from child process. */ static void -handle_output_debug_string (struct target_waitstatus *ourstatus) +handle_output_debug_string (void) { #define READ_BUFFER_LEN 1024 CORE_ADDR addr; @@ -819,10 +819,7 @@ win32_kill (int pid) if (current_event.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; else if (current_event.dwDebugEventCode == OUTPUT_DEBUG_STRING_EVENT) - { - struct target_waitstatus our_status = { 0 }; - handle_output_debug_string (&our_status); - } + handle_output_debug_string (); } win32_clear_inferiors (); @@ -1572,7 +1569,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus) "for pid=%u tid=%x\n", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId)); - handle_output_debug_string (ourstatus); + handle_output_debug_string (); break; default: