Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3E5F0B61.1040003@corpit.ru>
Date: Fri, 28 Feb 2003 10:10:25 +0300
From: Egor Duda <deo@corpit.ru>
Reply-To: Egor Duda <cygwin@cygwin.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020927 Debian/1.1-1
MIME-Version: 1.0
To: Ronald Landheer-Cieslak <ronald@landheer.com>
Cc: "Jon A. Lambert" <jlsysinc@alltel.net>, cygwin@cygwin.com,
   binutils@sources.redhat.com
Subject: Bug in dumper
References: <Pine.LNX.4.44.0302271156500.1192-100000@localhost.localdomain>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Ronald Landheer-Cieslak wrote:
>>Does dumper.exe work?

Well, i should have answered this, but unfortunately, i have no access 
to windows machine right now to debug, or even verify this.

>>Upon execution I see the following in the cygwin console:
>>  $ ./div.exe
>>        7 [main] div 2296 handle_exceptions: Error while dumping state (probably corrupted stack)
>>  Arithmetic exception (core dumped)
>>
>>In the cmd.exe console window that dumper.bat starts I see the following:
>>  C:\cygwin\home\jlambert>dumper.exe -d C:/cygwin/home/jlambert/div.exe 1884
>>  dumping process #1884 to div.exe.core
>>  setting bfd architecture: No error

Well, this is a strange line. This last line of dumper's output 
indicates than call to bfd_set_arch_mach(abfd, bfd_arch_i386, 0) havs 
returned non-zero status, which should indicate an error (if i 
understand things correctly), yet bfd_perror called immediately 
afterwards has printed "No error" message.

This means that either i'm wrong about my assumptions about 
bfd_set_arch_mach() and its return, or there's a bug in binutils. It 
should be quite easy to debug, though, for those who have a cygwin 
toolchain installed. Just build dumper with debug info (this will 
require building bfd alongside), start any innocent process, say, bash, 
get its pid and then run 'dumper -d c:/cygwin/bin/bash.exe <bash_pid>' 
under gdb. This should reveal what status is returned by 
bfd_set_arch_mach, and why.

egor.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

