www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/01/14:12:12

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B672B74.4090808@gmail.com>
Date: Mon, 01 Feb 2010 19:28:52 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: dlclose not calling destructors of static variables.
References: <4B61732F DOT 4030804 AT gmail DOT com> <4B62DDE6 DOT 5070106 AT gmail DOT com> <4B62F118 DOT 8010305 AT gmail DOT com> <20100129184514 DOT GA9550 AT ednor DOT casa DOT cgf DOT cx> <4B66BF2F DOT 4060802 AT gmail DOT com> <20100201162603 DOT GB25374 AT ednor DOT casa DOT cgf DOT cx> <4B6710CE DOT 40300 AT gmail DOT com> <20100201174611 DOT GA26080 AT ednor DOT casa DOT cgf DOT cx> <20100201175123 DOT GB26080 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20100201175123.GB26080@ednor.casa.cgf.cx>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 01/02/2010 17:51, Christopher Faylor wrote:
> On Mon, Feb 01, 2010 at 12:46:11PM -0500, Christopher Faylor wrote:

>>> Cribbing from the gdb source code, it looks like they use BaseAddrees + 
>>> 0x1000 for the start point and then call GetModuleInformation to workout 
>>> the size of the module.
>> Yeah, duh.  "they" == "me".  I should have checked gdb for this since I've
>> already done this research once before.
>>
>> If you do find that this works, then I think this may fall into the
>> realm of a non-trivial patch so it may be best to just tell me what
>> you've found rather than provide a patch - unless you want to go through
>> the approval process with Red Hat.
>>
>> Or, you can just wait for me to adapt what's in gdb to cygwin.  I can do
>> tonight when I get back to a windows system.
> 
> Btw, it isn't entirely clear that GetModuleInformation will work with
> older versions of Windows NT so this may not be a complete solution.  We
> do use GetModuleInformation in Cygwin but it is not in anything as
> crucial as this.

  Can't we use the info in the dll struct?  It has pointers to the data and
bss section, we could take the max out of them and the data in the M_B_I
struct.  (Tell you what, I'll try it.)

    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019