This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] GDBSERVER: Listen on a unix domain (instead of TCP) socket if requested.


On 2018-10-19 3:43 p.m., Sergio Durigan Junior wrote:
> On Friday, October 19 2018, John Darrington wrote:
> 
>> On Thu, Oct 18, 2018 at 04:18:48PM -0400, Sergio Durigan Junior wrote:
>>
>>      > +  bool is_unix = hint->ai_family == AF_UNIX;
>>      
>>      No need for a newline between the declarations of is_ipv6 and is_unix.
>>      
>>      Here, and everywhere else, AF_UNIX may be undefined if building GDB on a
>>      non-UNIX environment.  I'm afraid you may have to guard this code with
>>      "HAVE_SYS_UN_H".
>>      
>>
>> This is true.  But a quick experiment showed me that there are quite a
>> few other places in gdb which has this problem.
> 
> Which places?  There are some files that are not compiled on certain
> systems, so it's fine to have system-dependent code without the guards.
> I don't use proprietary OSes, so the way I test here is to compile GDB
> using a mingw compiler.  If it passes, then I assume things are OK.
> Your patch, for example, broke the compilation (because of
> AF_UNIX/AF_LOCAL).
> 
> Cheers,
> 

I just tried compiling with mingw and stumbled on this:

  CXX    common/netstuff.o
/home/simark/src/binutils-gdb/gdb/common/netstuff.c: In function ‘parsed_connection_spec parse_connection_spec(const char*, addrinfo*)’:
/home/simark/src/binutils-gdb/gdb/common/netstuff.c:148:18: error: ‘AF_LOCAL’ was not declared in this scope
       { "unix:", AF_LOCAL,  SOCK_STREAM },
                  ^~~~~~~~

What is the status on this?

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]