From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22579 invoked by alias); 3 Oct 2003 02:56:16 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22571 invoked from network); 3 Oct 2003 02:56:14 -0000 Received: from unknown (HELO cybertec.com.au) (144.137.98.161) by sources.redhat.com with SMTP; 3 Oct 2003 02:56:14 -0000 Received: from cybertec.com.au (chris.ct.com.au [10.10.10.193]) by cybertec.com.au (8.11.6/8.11.6) with ESMTP id h932u1Y09524; Fri, 3 Oct 2003 12:56:03 +1000 Message-ID: <3F7CE541.7070107@cybertec.com.au> Date: Fri, 03 Oct 2003 02:56:00 -0000 From: Chris Johns Organization: http://www.cybertec.com.au/ User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Cagney CC: Christopher Faylor , gdb@sources.redhat.com Subject: Re: Using gdb with Borland's free compiler? References: <200309282250.h8SMorcf026975@duracef.shout.net> <3F783251.2030009@redhat.com> <3F7A053B.9060502@cybertec.com.au> <3F7AE95C.5020108@redhat.com> <3F7B9F28.4020103@cybertec.com.au> <20031002134452.GA32402@redhat.com> <3F7CAA18.9090103@cybertec.com.au> <3F7CB0D6.9060704@redhat.com> In-Reply-To: <3F7CB0D6.9060704@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00069.txt.bz2 Andrew Cagney wrote: > >> Headers in config to add mingw32 as a target plus configure.host, >> and configure.tgt change. > > > FYI, there are three largely orthogonal problems here: > How does readline fit in ? > - host support (so it can be run on mingw) > Missing fork. Struct problems. This should be largely handled by > configure.in. > Yes. Currently this is handled by a defined in defs.h, CANT_FORK. The file utils.c has a fork() call but no check. > - native support (so it can debug mingw programs) > The win32-nat.c changes. This need a win32 person to look at this. > > - architecture support (so it can handle mingw ISA/ABI issues) > tm-*.h *.mt, *-tdep.c. > Can mingw32-tdep.c have misc type functions such as gettimeofday if the mingw runtime does not support it ? > Note that, for the last one, GDB's been restructured so that the tm-*.h > file is no longer needed. If the patches still have a tm-*.h file then > `why' is something to investigate further. Ok. > >> Changes to configure.in. >> >> Change 'struct environ' to 'struct gdb_environ' as mingw has >> 'environ' in a system header file as a '#define'. > > > If nothing else, bug report this. Fixing it should be a no-op. > Will do. >> Change event-loop.c to support Win32 handles for mingw32. >> >> Added missing POSIX modes to gdb_stat.h plus minor changes in >> remote-fileio.c due to a different 'struct stat'. (*) >> >> Added support for ser-tcp over winsock2 for target tcp. (*) > > > As a ser-winsock2 file or as mods to ser-tcp? > I added ser-mingw.c and changed ser-tcp.c to remove references to ser-unix.c functions. I then added a call to a new funtion 'ser_platform_tcp_init (ops)' to _initialize_ser_tcp and added ser_platform_tcp_init to ser-unix.c. It could be ser-win32.c rather than ser-mingw.c. Looking at this again I wonder if net_open and net_close should be public (ser_tcp_open/ser_tcp_close) and _initialise_ser_tcp should be in ser-unix.c. Same for ser-pipe.c. This means configure selects either ser-unix.c or ser-mingw.c. The net_open code needs a mingw (win32?) specific call to start the winsock dll. Shame but I see no simple solution to this. -- Chris Johns, cjohns at cybertec . com . au