Patchwork [v5,2/3] Implement "set cwd" command on GDB

login
register
mail settings
Submitter asmwarrior
Date Oct. 6, 2017, 2:37 a.m.
Message ID <21e02d72-ed9c-5e63-5981-00ec92908257@gmail.com>
Download mbox | patch
Permalink /patch/23367/
State New
Headers show

Comments

asmwarrior - Oct. 6, 2017, 2:37 a.m.
On 10/4/2017 2:10 PM, Sergio Durigan Junior wrote:
> On Wednesday, October 04 2017, Eli Zaretskii wrote:
> 
>>> Cc: GDB Patches <gdb-patches@sourceware.org>, Eli Zaretskii <eliz@gnu.org>
>>> From: Pedro Alves <palves@redhat.com>
>>> Date: Tue, 3 Oct 2017 22:29:27 +0100
>>>
>>>> Well, Pedro kindly pinged me on IRC to let me know that I had totally
>>>> misinterpreted his request to move a paragraph from the "set cwd"
>>>> section on gdb.texinfo to the "cd command" section.  Anyway, here's the
>>>> updated patch.
>>>
>>> Thanks, this version looks good to me, but please give Eli a chance
>>> to take a look too.
>>
>> LGTM, thanks.
> 
> Thanks, pushed.
> 
> bc3b087de2401c65c02730d346e8bea4dc0504ae
> 

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:

 gdb/gdbserver/win32-low.c | 1 +
 1 file changed, 1 insertion(+)



Thanks

Yuanhui Zhang

Patch

diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c
index c11926f7c6..f9c890f164 100644
--- a/gdb/gdbserver/win32-low.c
+++ b/gdb/gdbserver/win32-low.c
@@ -33,6 +33,7 @@ 
 #include <psapi.h>
 #include <process.h>
 #include "gdb_tilde_expand.h"
+#include "common-inferior.h"
 
 #ifndef USE_WIN32API
 #include <sys/cygwin.h>