This is the mail archive of the
mailing list for the Cygwin project.
How to set breakpoints before mainCRTStartup?
- From: Dalibor Topic <robilad at kaffe dot org>
- To: Dalibor Topic <robilad at kaffe dot org>
- Cc: cygwin at cygwin dot com
- Date: Sat, 20 Dec 2003 20:12:02 +0100
- Subject: How to set breakpoints before mainCRTStartup?
- References: <3FE341DF.firstname.lastname@example.org>
Dalibor Topic wrote:
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?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html