Patchwork [pushed] Fix more GDB build breakage on mingw32 (Re: [PATCH v5 2/3] Implement "set cwd" command on GDB)

login
register
mail settings
Submitter Pedro Alves
Date Oct. 6, 2017, 11:06 a.m.
Message ID <d226c815-bbcf-ab81-a5bd-2476a77908e4@redhat.com>
Download mbox | patch
Permalink /patch/23374/
State New
Headers show

Comments

Pedro Alves - Oct. 6, 2017, 11:06 a.m.
On 10/06/2017 11:54 AM, Pedro Alves wrote:

> Pushed as below.  Thanks.

Pushed this as well.

From a1b85d282f408dfd18a27539874846197f7e4044 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Fri, 6 Oct 2017 11:58:56 +0100
Subject: [PATCH] Fix more GDB build breakage on mingw32

With F23's mingw gcc 5.3.0, I'm seeing:

 i686-w64-mingw32-g++ -x c++ -std=gnu++11 -g3 -O0   -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../../src/gdb/../zlib -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib/import -Ibuild-gnulib/import   -I/home/pedro/src/expat/install-win32//include   -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 -c -o windows-nat.o -MT windows-nat.o -MMD -MP -MF ./.deps/windows-nat.o.Tpo ../../src/gdb/windows-nat.c
 ../../src/gdb/windows-nat.c: In function 'void windows_create_inferior(target_ops*, const char*, const string&, char**, int)':
 ../../src/gdb/windows-nat.c:2476:7: error: 'replace' is not a member of 'std'
	std::replace (expanded_infcwd.begin (), expanded_infcwd.end (),
	^

gdb/Changelog:
2017-10-06  Pedro Alves  <palves@redhat.com>

	* windows-nat.c: Include <algorithm>.
---
 gdb/ChangeLog     | 4 ++++
 gdb/windows-nat.c | 1 +
 2 files changed, 5 insertions(+)
asmwarrior - Oct. 6, 2017, 11:15 a.m.
On 10/6/2017 7:06 PM, Pedro Alves wrote:
> On 10/06/2017 11:54 AM, Pedro Alves wrote:
>
>> Pushed as below.  Thanks.
> Pushed this as well.
>
> From a1b85d282f408dfd18a27539874846197f7e4044 Mon Sep 17 00:00:00 2001
> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 6 Oct 2017 11:58:56 +0100
> Subject: [PATCH] Fix more GDB build breakage on mingw32
>
> With F23's mingw gcc 5.3.0, I'm seeing:
>
>  i686-w64-mingw32-g++ -x c++ -std=gnu++11 -g3 -O0   -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../../src/gdb/../zlib -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib/import -Ibuild-gnulib/import   -I/home/pedro/src/expat/install-win32//include   -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 -c -o windows-nat.o -MT windows-nat.o -MMD -MP -MF ./.deps/windows-nat.o.Tpo ../../src/gdb/windows-nat.c
>  ../../src/gdb/windows-nat.c: In function 'void windows_create_inferior(target_ops*, const char*, const string&, char**, int)':
>  ../../src/gdb/windows-nat.c:2476:7: error: 'replace' is not a member of 'std'
> 	std::replace (expanded_infcwd.begin (), expanded_infcwd.end (),
> 	^
>
> gdb/Changelog:
> 2017-10-06  Pedro Alves  <palves@redhat.com>
>
> 	* windows-nat.c: Include <algorithm>.
> ---
>  gdb/ChangeLog     | 4 ++++
>  gdb/windows-nat.c | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 0f92439..559c3b8 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,7 @@
> +2017-10-06  Pedro Alves  <palves@redhat.com>
> +
> +	* windows-nat.c: Include <algorithm>.
> +
>  2017-10-06  Yao Qi  <yao.qi@linaro.org>
>  
>  	* configure.tgt (i386_tobjs): New variable.
> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
> index 1ef38fb..98c32d8 100644
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -42,6 +42,7 @@
>  #include <sys/cygwin.h>
>  #include <cygwin/version.h>
>  #endif
> +#include <algorithm>
>  
>  #include "buildsym.h"
>  #include "filenames.h"


Hi, Pedro Alves, thanks for verifying the changes.

Aha, I also have this patch fixed in my local git repo, but I just forgot to submit it, because I have locally a lot of other changes. :-)

Thanks.

Yuanhui Zhang
Sergio Durigan Junior - Oct. 9, 2017, 9:58 p.m.
On Friday, October 06 2017, asmwarrior@gmail.com wrote:

> On 10/6/2017 7:06 PM, Pedro Alves wrote:
>> On 10/06/2017 11:54 AM, Pedro Alves wrote:
>>
>>> Pushed as below.  Thanks.
>> Pushed this as well.
>>
>> From a1b85d282f408dfd18a27539874846197f7e4044 Mon Sep 17 00:00:00 2001
>> From: Pedro Alves <palves@redhat.com>
>> Date: Fri, 6 Oct 2017 11:58:56 +0100
>> Subject: [PATCH] Fix more GDB build breakage on mingw32
>>
>> With F23's mingw gcc 5.3.0, I'm seeing:
>>
>>  i686-w64-mingw32-g++ -x c++ -std=gnu++11 -g3 -O0   -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../../src/gdb/../zlib -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib/import -Ibuild-gnulib/import   -I/home/pedro/src/expat/install-win32//include   -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 -c -o windows-nat.o -MT windows-nat.o -MMD -MP -MF ./.deps/windows-nat.o.Tpo ../../src/gdb/windows-nat.c
>>  ../../src/gdb/windows-nat.c: In function 'void windows_create_inferior(target_ops*, const char*, const string&, char**, int)':
>>  ../../src/gdb/windows-nat.c:2476:7: error: 'replace' is not a member of 'std'
>> 	std::replace (expanded_infcwd.begin (), expanded_infcwd.end (),
>> 	^
>>
>> gdb/Changelog:
>> 2017-10-06  Pedro Alves  <palves@redhat.com>
>>
>> 	* windows-nat.c: Include <algorithm>.
>> ---
>>  gdb/ChangeLog     | 4 ++++
>>  gdb/windows-nat.c | 1 +
>>  2 files changed, 5 insertions(+)
>>
>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>> index 0f92439..559c3b8 100644
>> --- a/gdb/ChangeLog
>> +++ b/gdb/ChangeLog
>> @@ -1,3 +1,7 @@
>> +2017-10-06  Pedro Alves  <palves@redhat.com>
>> +
>> +	* windows-nat.c: Include <algorithm>.
>> +
>>  2017-10-06  Yao Qi  <yao.qi@linaro.org>
>>  
>>  	* configure.tgt (i386_tobjs): New variable.
>> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
>> index 1ef38fb..98c32d8 100644
>> --- a/gdb/windows-nat.c
>> +++ b/gdb/windows-nat.c
>> @@ -42,6 +42,7 @@
>>  #include <sys/cygwin.h>
>>  #include <cygwin/version.h>
>>  #endif
>> +#include <algorithm>
>>  
>>  #include "buildsym.h"
>>  #include "filenames.h"
>
>
> Hi, Pedro Alves, thanks for verifying the changes.
>
> Aha, I also have this patch fixed in my local git repo, but I just forgot to submit it, because I have locally a lot of other changes. :-)

Sorry about the breakage.  I guess I forgot to recompile my local tree
with mingw after I implemented some improvements to the Windows support.
This reminds me that it's a good idea to have a mingw builder in our
BuildBot (just building, not testing).  I'll see about implementing
this.

Thank you and Pedro for catching and fixing the issues.

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0f92439..559c3b8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-10-06  Pedro Alves  <palves@redhat.com>
+
+	* windows-nat.c: Include <algorithm>.
+
 2017-10-06  Yao Qi  <yao.qi@linaro.org>
 
 	* configure.tgt (i386_tobjs): New variable.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 1ef38fb..98c32d8 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -42,6 +42,7 @@ 
 #include <sys/cygwin.h>
 #include <cygwin/version.h>
 #endif
+#include <algorithm>
 
 #include "buildsym.h"
 #include "filenames.h"