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: <3FE49F02.2010904@kaffe.org> Date: Sat, 20 Dec 2003 20:12:02 +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: Dalibor Topic CC: cygwin AT cygwin DOT com Subject: How to set breakpoints before mainCRTStartup? References: <3FE341DF DOT 90800 AT kaffe DOT org> In-Reply-To: <3FE341DF.90800@kaffe.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Dalibor Topic wrote: > Hi all, > > in my attempts to fix an ugly bug in kaffe on Cygwin, the bug I'm trying > to squish turned out to be triggered by something that happens *before* > main is called. > > The opcode at the start of the function in question is apparently > modified before the program actually calls main. So when I break on main > in gdb, and print the value of the first opcode of the function before I > run the program, and after it breaks at main, the first opcode of the > function in question is different, which leads to a crash as soon as the > function is called. > > Since I'd like to know what modifes that opcode, I hope to be able to > set a breakpoint in gdb on the code that is executed before main in Cygwin. > > Any idea how to do that, i.e. where to put the breakpoint? Are there > some docs on what happends before main() on cygwin that I could look up > for reference while trying to hunt down this bug? It turns out that the bug happens even before mainCRTStartup. Has anyone seen something like that before? 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/