Joel Brobecker wrote: > Thanks for the patch. A couple of of comments: > Thanks for taking a look! > It took me a long while to understand this loop. I realize this was > already implemented that way before, but I think something like the code > below is simpler. What do you think? > I completely agree. It looks much cleaner. Thanks. > if (argc - optind > 0) I just changed these to use the (optind < argc) idiom, which is already used in the file. > /* Any argument left on the command line is unexpected and will be > ignored. Inform the user. */ > for (; optind < argc; optind++) > fprintf_unfiltered (...); > I'm keeping the output format (ARG) or (ARG ...) if (optind < argc). There's a wrinkle. The 'int count' variable that was originally used in the loop, was also used to do a last resort stack alignment in captured_main's entry. #if defined (ALIGN_STACK_ON_STARTUP) i = (int) &count & 0x03; if (i != 0) alloca (4 - i); #endif ALIGN_STACK_ON_STARTUP isn't defined in any target/host anymore, and if it was, count is in the middle of the stack frame for long and nobody complained. We can safely remove it. It's mentioned in the gdbint manual, so that'll go too. Now with correct email in the ChangeLog entry ... Retested on i686-pc-linux-gnu. OK ? Eli, gdbint patch OK ? -- Pedro Alves