From patchwork Fri Oct 6 10:54:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 23369 Received: (qmail 25639 invoked by alias); 6 Oct 2017 10:54:33 -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 23600 invoked by uid 89); 6 Oct 2017 10:54:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Fri, 06 Oct 2017 10:54:31 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27F8F83F43; Fri, 6 Oct 2017 10:54:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 27F8F83F43 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1913B5F92B; Fri, 6 Oct 2017 10:54:26 +0000 (UTC) Subject: [pushed] Fix GDB build under msys+mingw gcc 32bit (Re: [PATCH v5 2/3] Implement "set cwd" command on GDB) To: asmwarrior , Sergio Durigan Junior References: <20170912042325.14927-1-sergiodj@redhat.com> <20170929225852.21872-1-sergiodj@redhat.com> <20170929225852.21872-3-sergiodj@redhat.com> <874lrg5goz.fsf@redhat.com> <6520ea6a-6be7-db93-1d3e-1b156bc95564@redhat.com> <87mv5841qt.fsf@redhat.com> <87y3osxj6i.fsf@redhat.com> <871smkxaco.fsf@redhat.com> <22dfe787-0c70-b2c1-c1b0-752d2e712f42@redhat.com> <83lgkrzd23.fsf@gnu.org> <87k20bwiis.fsf@redhat.com> <21e02d72-ed9c-5e63-5981-00ec92908257@gmail.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Fri, 6 Oct 2017 11:54:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <21e02d72-ed9c-5e63-5981-00ec92908257@gmail.com> On 10/06/2017 03:37 AM, asmwarrior wrote: > I see a build error when building GDB under msys+mingw gcc 32bit. > > g++ -x c++ -std=gnu++11 -g -O2 -I. -I../../../binutils-gdb/gdb/gdbserver -I../../../binutils-gdb/gdb/gdbserver/../common -I../../../binutils-gdb/gdb/gdbserver/../regformats -I../../../binutils-gdb/gdb/gdbserver/.. -I../../../binutils-gdb/gdb/gdbserver/../../include -I../../../binutils-gdb/gdb/gdbserver/../gnulib/import -Ibuild-gnulib-gdbserver/import -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -Werror -DGDBSERVER -c -o win32-low.o -MT win32-low.o -MMD -MP -MF .deps/win32-low.Tpo ../../../binutils-gdb/gdb/gdbserver/win32-low.c > ../../../binutils-gdb/gdb/gdbserver/win32-low.c: In function 'BOOL create_process(const char*, char*, DWORD, PROCESS_INFORMATION*)': > ../../../binutils-gdb/gdb/gdbserver/win32-low.c:566:48: error: 'get_inferior_cwd' was not declared in this scope > const char *inferior_cwd = get_inferior_cwd (); > ^ > make[4]: *** [win32-low.o] Error 1 > > It can be simply fixed by adding the header file: Pushed as below. Thanks. From b79f7801a2c555ee4ff4bc3050141e83158f66d4 Mon Sep 17 00:00:00 2001 From: Yuanhui Zhang Date: Fri, 6 Oct 2017 11:44:54 +0100 Subject: [PATCH] Fix GDB build under msys+mingw gcc 32bit I see a build error when building GDB under msys+mingw gcc 32bit: g++ -x c++ -std=gnu++11 -g -O2 -I. -I../../../binutils-gdb/gdb/gdbserver -I../../../binutils-gdb/gdb/gdbserver/../common -I../../../binutils-gdb/gdb/gdbserver/../regformats -I../../../binutils-gdb/gdb/gdbserver/.. -I../../../binutils-gdb/gdb/gdbserver/../../include -I../../../binutils-gdb/gdb/gdbserver/../gnulib/import -Ibuild-gnulib-gdbserver/import -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -Werror -DGDBSERVER -c -o win32-low.o -MT win32-low.o -MMD -MP -MF .deps/win32-low.Tpo ../../../binutils-gdb/gdb/gdbserver/win32-low.c ../../../binutils-gdb/gdb/gdbserver/win32-low.c: In function 'BOOL create_process(const char*, char*, DWORD, PROCESS_INFORMATION*)': ../../../binutils-gdb/gdb/gdbserver/win32-low.c:566:48: error: 'get_inferior_cwd' was not declared in this scope const char *inferior_cwd = get_inferior_cwd (); ^ make[4]: *** [win32-low.o] Error 1 It can be fixed by simply including the right header file. gdb/gdbserver/ChangeLog: 2017-10-06 Yuanhui Zhang * win32-low.c: Include "common-inferior.h". --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/win32-low.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 0bdeaba..5bcd717 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2017-10-06 Yuanhui Zhang + + * win32-low.c: Include "common-inferior.h". + 2017-10-04 Sergio Durigan Junior * inferiors.c (set_inferior_cwd): New function. diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index c11926f..f9c890f 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -33,6 +33,7 @@ #include #include #include "gdb_tilde_expand.h" +#include "common-inferior.h" #ifndef USE_WIN32API #include