Using gdb with Borland's free compiler?

Chris Johns cjohns@cybertec.com.au
Fri Oct 3 02:56:00 GMT 2003


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



More information about the Gdb mailing list