Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3FE10A7B.9080208@kaffe.org> Date: Thu, 18 Dec 2003 03:01:31 +0100 From: Dalibor Topic User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Need tips debugging a crash porting an app to cygwin caused by sth overwriting a function References: <3FE0A59A DOT 6060802 AT kaffe DOT org> <20031217213508 DOT GE6296 AT redhat DOT com> <3FE0D154 DOT 4050205 AT kaffe DOT org> <20031217221440 DOT GA7817 AT redhat DOT com> <3FE0DB67 DOT 8090009 AT kaffe DOT org> <20031217225050 DOT GA8372 AT redhat DOT com> In-Reply-To: <20031217225050.GA8372@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Hi Christopher, Christopher Faylor wrote: > On Wed, Dec 17, 2003 at 11:40:39PM +0100, Dalibor Topic wrote: > >>I was thinking about defining a gdb command along the lines of >> >>define my-stepi-watch >>while (*(long *) findJarFiles == original_value) >>stepi >>end >> >>though I've never done that before, so I'm not sure if that would work ;) > > > It might work but I think you'd probably end up tracking the heat death > of the universe before you'd see a result. :-) Then you better prepare to die. ;) Actually, I've seen a result as soon as I let the macro lose. It turns out that someverhere between (1) (gdb) p *(long*) findJarFiles $1=something (gdb) b main (gdb) run break point in main reached (2)(gdb) p *(long *) findJarFiles $2=somethingElse (1) and (2) the object code of findJarFiles is changed, i.e. even before the program starts at all. *Now* I'm really puzzled. Any idea how to debug that? What could it be that's invoked before main that modifies object code? cheers, dalibor topic -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/