Hi all, Pierre, Here's the much smaller patch I mentioned at gdb@. This version is about as small as it can get. First the prologue is analysed and skipped, then line info is used to get at the first line of user code in the function. If the function is called "main" (humm, I shall move that into the callback, as I believe the place where __main/__gccmain is emitted is configurable on the gcc side), call a gdbarch method that skips the __main call. Works OK as long as nothing is scheduled into before the __main call. That means that it should work OK at -O0, which is enough for fixing the runto_main problems in the testsuite. Then again, debugging code with .stabs debug info at anything but -O0 is not pleasant anyway. Last time I looked at the results, it uncovered other more serious problems, so it was a win just for that fact. I'm starting an overnight testrun on Cygwin, as the last time I did that was a couple of months back. Any comments? Suggestions for a better gdbarch callback name? -- Pedro Alves