Can't build gdb for mingw32 if not native? :-(

Andrew STUBBS andrew.stubbs@st.com
Wed Sep 28 11:52:00 GMT 2005


Steve Folly wrote:
> 
> On 27 Sep 2005, at 22:18, Daniel Jacobowitz wrote:
> 
>> On Tue, Sep 27, 2005 at 10:12:40PM +0100, Steve Folly wrote:
>>
>>> Hi,
>>>
>>> I'm trying to build gdb 6.3 on host powerpc-apple-darwin8.2.0 for
>>> target i386-pc-mingw32msvc.
>>>
>>
>> GDB 6.3 doesn't support the mingw32 target.  In fact it doesn't  support
>> mingw32 as a host either.  Later versions will support it as a host  but
>> not target.
> 
> 
> The configure script in the gdb-6.3.tar.gz I downloaded seems to?

The top level configure script may do, but as Daniel says the GDB 
sources do not.

Look at www.mingw.org for GDB MinGW patches (GDB 6.3-1 last time I 
looked). These will get it to compile for MinGW, but, even if they can 
be made to cross compile, Daniel's point about remote debugging still 
stands. I can see why you wouldn't want to use Windows as a build 
platform, but I suggest that, unless you have a good reason not to, you 
debug the programs natively using the native MinGW GDB. You can probably 
download a binary from their website along with the rest of MinGW/MSYS.

Alternatively, the GDB in Cygwin (www.cygwin.com) is capable of 
debugging MinGW programs. Cygwin also has support for compiling them 
with 'gcc -mno-cygwin'. Note that the standard Cygwin install does not 
include developer tools, but the installation tool is quite easy to use.

HTH

Andrew



More information about the Gdb mailing list