delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Date: | Thu, 29 Jun 2000 23:37:54 -0400 |
Message-Id: | <200006300337.XAA23859@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | Motohiko DOT Nagano AT jp DOT sony DOT com |
CC: | cygwin AT sourceware DOT cygnus DOT com, binutils AT sourceware DOT cygnus DOT com |
In-reply-to: | <7840643F05B5D3119B9A0000F807175702BD85E0@SJP01014> |
(Motohiko DOT Nagano AT jp DOT sony DOT com) | |
Subject: | Re: Can gdb debug win32 native program? |
References: | <7840643F05B5D3119B9A0000F807175702BD85E0 AT SJP01014> |
Warning: cross-posted to cygwin and binutils. Remove at least one when replying! > bash-2.04$ objdump -p //E/WINNT/SYSTEM32/calc.exe > objdump: //E/WINNT/SYSTEM32/calc.exe: File format not recognized OK, I debugged it and I know why it's failing, but I don't have a fix. To make it short: 99% of all PE programs have the same sized structures at the beginning of the program file. Some don't. BFD tries hard to adjust to the varying sizes, but it appears that in your case it doesn't do it right, and ends up reading a structure from the wrong place in the file. If you care to debug it, look for pe_bfd_object_p() in bfd/peicode.h; the test that fails is in coff_bad_format_hook() in bfd/coffcode.h. However, I suspect I will be debugging this one myself :-( but not tonight. I had to scan my whole system32 directory to find a program that failed this way, too! -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |