This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Setting breakpoints before main


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?

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]